Schnelle Erfahrungen mit programmatisierten Transaktionen, die für Neulinge nur eine Minute lang notwendig sind
Denkst du, dass Visualisierungsprogrammierung hilfreich ist?
{"xml":"<xml xmlns=\"https://developers.google.com/blockly/xml\">\n <variables>\n <variable id=\"opm1F)[XXt8TnZe.Y`4*\">当前行情</variable>\n <variable id=\"bwb?U1_yiX:~*3ccn.jt\">当前资产</variable>\n <variable id=\"fhT;l76])[r2v]cu@PGp\">币总市值</variable>\n <variable id=\"Y$k.q~c}[N*0Gype+oDd\">资产差</variable>\n </variables>\n <block type=\"ext_Loop_Interval\" id=\"2_5}1ZFn9CEx-Ku/nt?1\" x=\"18\" y=\"14\">\n <statement name=\"INPUT_0\">\n <block type=\"variables_set\" id=\"(B9Do#l;+D*nzbkOE7ui\">\n <field name=\"VAR\" id=\"opm1F)[XXt8TnZe.Y`4*\">当前行情</field>\n <value name=\"VALUE\">\n <block type=\"ext_exchange_GetTicker\" id=\"ed4pQ5oBu2b7tcmGm;u@\">\n <field name=\"INPUT_0\">0</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\" id=\"(]L|NHCAwCbRY9cG2B)d\">\n <field name=\"VAR\" id=\"bwb?U1_yiX:~*3ccn.jt\">当前资产</field>\n <value name=\"VALUE\">\n <block type=\"ext_exchange_GetAccount\" id=\"K9rAY_hc:KHlI4G.3:%2\">\n <field name=\"INPUT_0\">0</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\" id=\"mzoZW%xi$Yy1rf@ct3TY\">\n <field name=\"VAR\" id=\"fhT;l76])[r2v]cu@PGp\">币总市值</field>\n <value name=\"VALUE\">\n <block type=\"math_arithmetic\" id=\"i@R^,niuw-Xloo00KLoc\">\n <field name=\"OP\">MULTIPLY</field>\n <value name=\"A\">\n <shadow type=\"math_number\" id=\"atz4^?:~jgWKC+azU11$\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"ext_TickerOf\" id=\"8*hu;x;u||=Vb#4u|fcP\">\n <field name=\"INPUT_0\">Last</field>\n <value name=\"INPUT_1\">\n <block type=\"variables_get\" id=\"5jiBBlF6c9QiocG|,sBB\">\n <field name=\"VAR\" id=\"opm1F)[XXt8TnZe.Y`4*\">当前行情</field>\n </block>\n </value>\n </block>\n </value>\n <value name=\"B\">\n <shadow type=\"math_number\" id=\"RYQCcA!,^sCR0ybqK1UO\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"ext_AccountOf\" id=\",vWh_Wz3uZ*xcX2=:-($\">\n <field name=\"INPUT_0\">Stocks</field>\n <value name=\"INPUT_1\">\n <block type=\"variables_get\" id=\"5~H0;Fg5wJ|Gt8D1mlCw\">\n <field name=\"VAR\" id=\"bwb?U1_yiX:~*3ccn.jt\">当前资产</field>\n </block>\n </value>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"variables_set\" id=\"hbs1DlJ7LsOnyrGY0$hs\">\n <field name=\"VAR\" id=\"Y$k.q~c}[N*0Gype+oDd\">资产差</field>\n <value name=\"VALUE\">\n <block type=\"math_arithmetic\" id=\"lgUPZBFGU-,q5/6^MyIK\">\n <field name=\"OP\">MINUS</field>\n <value name=\"A\">\n <shadow type=\"math_number\" id=\"W[{%5}h:Urd66={r{$}|\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"variables_get\" id=\"[[]52H*;ugs7VIkOG(KQ\">\n <field name=\"VAR\" id=\"fhT;l76])[r2v]cu@PGp\">币总市值</field>\n </block>\n </value>\n <value name=\"B\">\n <shadow type=\"math_number\" id=\".)z$~`awZjhy[0jH~w#i\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"ext_AccountOf\" id=\"L858}xOAg:H5ghqE)r!v\">\n <field name=\"INPUT_0\">Balance</field>\n <value name=\"INPUT_1\">\n <block type=\"variables_get\" id=\"bZ`6[;K?Kcta)yoonA5|\">\n <field name=\"VAR\" id=\"bwb?U1_yiX:~*3ccn.jt\">当前资产</field>\n </block>\n </value>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"controls_if\" id=\"bHMNS]7^XGv8uIj!7mV)\">\n <mutation elseif=\"1\"></mutation>\n <value name=\"IF0\">\n <block type=\"logic_compare\" id=\"WUX%5bGB@W9]^ZJ7N4Kb\">\n <field name=\"OP\">GT</field>\n <value name=\"A\">\n <block type=\"variables_get\" id=\"A9IuZ8B}BKi+oKj{^b6G\">\n <field name=\"VAR\" id=\"Y$k.q~c}[N*0Gype+oDd\">资产差</field>\n </block>\n </value>\n <value name=\"B\">\n <block type=\"math_arithmetic\" id=\"*I#f0wAu(bbti|$/s`kY\">\n <field name=\"OP\">MULTIPLY</field>\n <value name=\"A\">\n <shadow type=\"math_number\" id=\"]?`N@FpK;pbGCNZ%S5rk\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"ext_AccountOf\" id=\"1k~;0),1`UBe/kS/j7C,\">\n <field name=\"INPUT_0\">Balance</field>\n <value name=\"INPUT_1\">\n <block type=\"variables_get\" id=\"r|-reGD;$7~U^LHk1pEu\">\n <field name=\"VAR\" id=\"bwb?U1_yiX:~*3ccn.jt\">当前资产</field>\n </block>\n </value>\n </block>\n </value>\n <value name=\"B\">\n <shadow type=\"math_number\" id=\"a1?ZF!cM{Rtt8YnSARLj\">\n <field name=\"NUM\">0.05</field>\n </shadow>\n </value>\n </block>\n </value>\n </block>\n </value>\n <statement name=\"DO0\">\n <block type=\"ext_Log\" id=\"Qc}LQw@T6:rtYLoEJZ|A\">\n <value name=\"VALUE\">\n <block type=\"ext_Trade\" id=\"f+iy@8FMAqP@XhF:SVi8\">\n <field name=\"INPUT_0\">Sell</field>\n <value name=\"INPUT_1\">\n <shadow type=\"math_number\" id=\"=oOIMb|iB0sbiML8uvkK\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"ext_N\" id=\"xoLcKwiU,CA%2h~seEAK\">\n <value name=\"INPUT_0\">\n <shadow type=\"math_number\" id=\"h+wbX]Y@{6j|m,}PIn^j\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"math_arithmetic\" id=\"]`jR7]yP6DWp*u~F[NO,\">\n <field name=\"OP\">DIVIDE</field>\n <value name=\"A\">\n <shadow type=\"math_number\" id=\"yK#HpSy8[o,!#py0Q$U1\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"math_arithmetic\" id=\"6-H-dlq@R5mP*@6K)eV@\">\n <field name=\"OP\">DIVIDE</field>\n <value name=\"A\">\n <shadow type=\"math_number\" id=\"YK`Se]H~B1-jH,^aWj5p\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"variables_get\" id=\"1WXx-(Vf_EQ%.4xwdg3q\">\n <field name=\"VAR\" id=\"Y$k.q~c}[N*0Gype+oDd\">资产差</field>\n </block>\n </value>\n <value name=\"B\">\n <shadow type=\"math_number\" id=\"Zcun)[a(E$V9;_z,/7El\">\n <field name=\"NUM\">2</field>\n </shadow>\n </value>\n </block>\n </value>\n <value name=\"B\">\n <shadow type=\"math_number\" id=\"`{h}x:,c$2$:QTYzW.mY\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"ext_TickerOf\" id=\"Fd{UtGo79IL@5q^@-0a0\">\n <field name=\"INPUT_0\">Buy</field>\n <value name=\"INPUT_1\">\n <block type=\"variables_get\" id=\"OW.tji2|N3N+w)=Tj-RS\">\n <field name=\"VAR\" id=\"opm1F)[XXt8TnZe.Y`4*\">当前行情</field>\n </block>\n </value>\n </block>\n </value>\n </block>\n </value>\n <value name=\"INPUT_1\">\n <shadow type=\"math_number\" id=\"ql+8Lcm3{S#67g):0lB;\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n </block>\n </value>\n </block>\n </value>\n </block>\n </statement>\n <value name=\"IF1\">\n <block type=\"logic_compare\" id=\"mNgfW_rMOL!tyVQ9gIO*\">\n <field name=\"OP\">LT</field>\n <value name=\"A\">\n <block type=\"variables_get\" id=\"v?2/Y-X={HtE{ikH:PhQ\">\n <field name=\"VAR\" id=\"Y$k.q~c}[N*0Gype+oDd\">资产差</field>\n </block>\n </value>\n <value name=\"B\">\n <block type=\"math_arithmetic\" id=\".cSBOTTN9^vs.m/q8WzS\">\n <field name=\"OP\">MULTIPLY</field>\n <value name=\"A\">\n <shadow type=\"math_number\" id=\"]?`N@FpK;pbGCNZ%S5rk\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"ext_AccountOf\" id=\"(UZoBKXBcXFu/sF9)~@[\">\n <field name=\"INPUT_0\">Balance</field>\n <value name=\"INPUT_1\">\n <block type=\"variables_get\" id=\"=/Y~8cGTUr5yG2zThwm_\">\n <field name=\"VAR\" id=\"bwb?U1_yiX:~*3ccn.jt\">当前资产</field>\n </block>\n </value>\n </block>\n </value>\n <value name=\"B\">\n <shadow type=\"math_number\" id=\"SjkKBk?htB}:0OOavFdX\">\n <field name=\"NUM\">-0.05</field>\n </shadow>\n </value>\n </block>\n </value>\n </block>\n </value>\n <statement name=\"DO1\">\n <block type=\"ext_Log\" id=\"]6QE+AJuCGJcJ!mM79Aw\">\n <value name=\"VALUE\">\n <block type=\"ext_Trade\" id=\"0I(RwOKo^!Aa,,U,7bUQ\">\n <field name=\"INPUT_0\">Buy</field>\n <value name=\"INPUT_1\">\n <shadow type=\"math_number\" id=\"=oOIMb|iB0sbiML8uvkK\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"ext_N\" id=\"cC/pIj)]o5dZtUXcuWW6\">\n <value name=\"INPUT_0\">\n <shadow type=\"math_number\" id=\"tF7B^Y~~dqljm4j)(ay4\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"math_arithmetic\" id=\"0%k4hie-y))L1%i/+pm5\">\n <field name=\"OP\">DIVIDE</field>\n <value name=\"A\">\n <shadow type=\"math_number\" id=\"yK#HpSy8[o,!#py0Q$U1\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"math_arithmetic\" id=\",D]OH)D##:[SL!m.Y=If\">\n <field name=\"OP\">DIVIDE</field>\n <value name=\"A\">\n <shadow type=\"math_number\" id=\"YK`Se]H~B1-jH,^aWj5p\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"variables_get\" id=\"PYESS@O{0h3*hIQloZs*\">\n <field name=\"VAR\" id=\"Y$k.q~c}[N*0Gype+oDd\">资产差</field>\n </block>\n </value>\n <value name=\"B\">\n <shadow type=\"math_number\" id=\"q1+D-kt.!6b[+.Y43Uu^\">\n <field name=\"NUM\">-2</field>\n </shadow>\n </value>\n </block>\n </value>\n <value name=\"B\">\n <shadow type=\"math_number\" id=\"`{h}x:,c$2$:QTYzW.mY\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"ext_TickerOf\" id=\"l5Nt[6yf,t,A)g]Y=^P+\">\n <field name=\"INPUT_0\">Sell</field>\n <value name=\"INPUT_1\">\n <block type=\"variables_get\" id=\"%zW)lwo8ZB-[bkM,4fPy\">\n <field name=\"VAR\" id=\"opm1F)[XXt8TnZe.Y`4*\">当前行情</field>\n </block>\n </value>\n </block>\n </value>\n </block>\n </value>\n <value name=\"INPUT_1\">\n <shadow type=\"math_number\" id=\"t|}4L?~Z/Pam|e#tZ9,I\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n </block>\n </value>\n </block>\n </value>\n </block>\n </statement>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n <value name=\"INPUT_1\">\n <shadow type=\"math_number\" id=\"B!_::#726BEt/6-?!Ui!\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n </block>\n</xml>","javascript":"/*backtest\nstart: 2023-01-01 00:00:00\nend: 2023-08-16 00:00:00\nperiod: 1d\nbasePeriod: 1h\nexchanges: [{\"eid\":\"Binance\",\"currency\":\"BTC_USDT\"}]\n*/\nfunction main() {\n var _E5_BD_93_E5_89_8D_E8_A1_8C_E6_83_85, _E5_BD_93_E5_89_8D_E8_B5_84_E4_BA_A7, _E5_B8_81_E6_80_BB_E5_B8_82_E5_80_BC, _E8_B5_84_E4_BA_A7_E5_B7_AE;\n\n\nwhile(true){ _E5_BD_93_E5_89_8D_E8_A1_8C_E6_83_85 = _C(exchanges[0].GetTicker);\n _E5_BD_93_E5_89_8D_E8_B5_84_E4_BA_A7 = _C(exchanges[0].GetAccount);\n _E5_B8_81_E6_80_BB_E5_B8_82_E5_80_BC = _E5_BD_93_E5_89_8D_E8_A1_8C_E6_83_85.Last * _E5_BD_93_E5_89_8D_E8_B5_84_E4_BA_A7.Stocks;\n _E8_B5_84_E4_BA_A7_E5_B7_AE = _E5_B8_81_E6_80_BB_E5_B8_82_E5_80_BC - _E5_BD_93_E5_89_8D_E8_B5_84_E4_BA_A7.Balance;\n if (_E8_B5_84_E4_BA_A7_E5_B7_AE > _E5_BD_93_E5_89_8D_E8_B5_84_E4_BA_A7.Balance * 0.05) {\n Log((function(){var r = $.Sell(_N((_E8_B5_84_E4_BA_A7_E5_B7_AE / 2) / _E5_BD_93_E5_89_8D_E8_A1_8C_E6_83_85.Buy, 5)); return r ? r.amount : 0; })());} else if (_E8_B5_84_E4_BA_A7_E5_B7_AE < _E5_BD_93_E5_89_8D_E8_B5_84_E4_BA_A7.Balance * -0.05) {\n Log((function(){var r = $.Buy(_N((_E8_B5_84_E4_BA_A7_E5_B7_AE / -2) / _E5_BD_93_E5_89_8D_E8_A1_8C_E6_83_85.Sell, 5)); return r ? r.amount : 0; })());}\n\nSleep(1*1000);}\n}"}
BamsmenDas ist eine sehr gute Funktion, und ich bin bereit, es den Schülern zu erzählen, wenn sie anfangen zu programmieren.
NachthimmelEs ist nicht schlecht, wenn Kinder Quantität beibringen, weil sie nicht richtig aufgewachsen sind Ich bin hier, weil ich ein Mal Salami auf der BITMEX gespielt habe.
- Ja, das ist gut.Bitte füllen Sie die Brennbänder bb so schnell wie möglich aus.
Zhuanqian"Es ist ein bisschen beschreibend, ist eine verrückte Figur, verrückte Beobachtung, lehrt Kinder Quantität und ist schlecht aufgewachsen".
WulaIch möchte Sie fragen, ob diese Funktion Futures unterstützt.
Leichte WolkenDas ist so viel Spaß.
JkyeiDanke, das ist gut. Ich hoffe, ich mache noch eine Commodity-Futures.
- Ja. Ich weiß.Unterstützung, die einige strategische Gedanken erst mit visuellen Implementierungen testen und dann mit Code verbessern kann.
q23250Das ist großartig!
JkyeiGut, bahnbrechend. Kann man visualisieren, dass es auf einem Touchscreen-System funktioniert, wenn es möglich ist, eine riesige Anzahl von Benutzern?
Schneemann- Gut.
KmmkkUnterstützen Sie!
BankenDas ist ein Schlagzeug!
NullUnterstützt wird auch die Kommoditäts-Futures-Lösung, bei der man die eingebaute Handelskategorie wählen kann.
NullDas ist ein Touchscreen-basierter Editor, der vollständig auf dem Bildschirm funktioniert.