สวัสดีทุกคน,
ฉันพยายามที่จะรหัส EA ที่จัดการกับความก้าวหน้า d'alembert (สำหรับทุกสิ่งที่ไม่ทราบความก้าวหน้า d'alembert:
http://www.bettingexpert.com/casino/...lembert-system)
แผนเริ่มต้นด้วยจำนวน 0.01 lots และ SL13 pipsTP 14 pips
ทุกครั้งที่ปิดการค้าขายกับการสูญเสียการค้าใหม่จะเปิดขึ้นทันทีโดยมีจำนวนเพิ่มอีก 0.01 รายการและหลังการซื้อขายชนะการค้าถัดไปจะเปิดขึ้นทันทีโดยมีจำนวน 0.01 lots น้อยกว่าจำนวนที่มากจนมาถึง 0.01 lots
ตัวอย่าง:
1. สูญเสียการค้า 0.01
2. ขาดทุน 0.02 การค้า
3. ขาดทุนจากการค้า 0.03
4. ขาดทุนจากการค้า 0.04
5. การค้าจำนวนมากชนะ
6. การค้า 0.04 ชนะจำนวนมาก
7. การค้า 0.03 ล็อตชนะ
8. การค้า 0.02 ชนะจำนวนมาก
9. การค้าจำนวน 0.01 ชนะ
นี่เป็นรหัสแรกของฉันที่ลองใช้ แต่ไม่ได้ใช้ในเครื่องมือทดสอบกลยุทธ์ :-(
ใครสามารถช่วย?
แทรกรหัส/ --------------------------------------------- --------------------- /| A4.mq4 |/| สงวนลิขสิทธิ์© 2010, MetaQuotes Software Corp. |/| http://www.metaquotes.net |/ ----------------------------------------------- ------------------- ลิขสิทธิ์ # ลิขสิทธิ์© 2010, MetaQuotes Software Corp. # property link http://www.metaquotes.net/ ---- -------------------------------------------------- ------------ /| พารามิเตอร์อินพุตภายนอก/ ----------------------------------------------- ------------------- extern int MagicNumber_101 = 101000; int ภายนอก SL = 13; int ภายนอก TP = 14; double dXPoint = 1;/ ----------------------------------------------- ------------------- /| ฟังก์ชันเริ่มต้นของผู้เชี่ยวชาญ |/ ----------------------------------------------- ------------------- int init () {//----/---- return (0); }/ ---------------------------------------------- -------------------- /| ฟังก์ชัน deinitialization/ ----------------------------------------------- ------------------- int deinit () {//----/---- return (0); }/ ---------------------------------------------- -------------------- /| ฟังก์ชันเริ่มต้นของผู้เชี่ยวชาญ |/ ----------------------------------------------- ------------------- int start () {double Lotsize = 0.01; if (OrdersHistoryTotal () gt; = 1) {OrderSelect (OrdersHistoryTotal () - 1, SELECT_BY_POS); Lotsize = OrderLots (); } ถ้า (OrderProfit () lt; 0 OrdersHistoryTotal () gt; = 1) {Lotsize = Lotsize 0.01; } if (OrderProfit () gt; 0 OrdersHistoryTotal () gt; = 1 Lotsizegt; = 0.02) {Lotsize = Lotsize - 0.01; (), (2), Bid-SL * Point, Bid TP * Point, (2), Bid (1) ซื้อ MagicNumber_101,0, CLR_NONE); } Sleep (120000); if (OrdersTotal () == 0 Minute () == 00) {OrderSelect (OrdersHistoryTotal () - 1, SELECT_BY_POS); หาก OrderProfit () gt; 0 OrderType () == OP_BUY) {OrderSend (Symbol (), OP_BUY, 0.01, MarketInfo (Symbol (), MODE_ASK), 2, Bid-SL * Point, Bid TP * Point, ซื้อ , MagicNumber_101,0, CLR_NONE); } Sleep (120000); } OrderSend (Symbol (), OP_SELL, 0.01, MarketInfo (Symbol (), MODE_BID () () () () () หากมีการสั่งซื้อ (OrdersTotal () == 0 นาที () == 00) {if (OrderProfit () gt; 0 OrderType () == OP_SELL ), 2, ถาม SL * Point, ถาม-TP * จุดขาย MagicNumber_101,0, CLR_NONE); } Sleep (120000); } ถ้า (OrdersTotal () == 0 นาที () == 00) {if (OrderProfit () lt; 0 OrderType () == OP_SELL) {OrderSend (สัญลักษณ์ () OP_BUY, 0.01, MarketInfo (สัญลักษณ์ () MODE_ASK), 2, Bid-SL * Point, การเสนอราคา TP * จุด, ซื้อ, MagicNumber_101,0, CLR_NONE); } Sleep (120000); } OrderSend (Symbol (), OP_SELL, 0.01, MarketInfo (Symbol (), MODE_BID () (ถ้ามี) ), 2, ถาม SL * Point, ถาม-TP * จุดขาย MagicNumber_101,0, CLR_NONE); } Sleep (120000); } return (0); }
โปรดอย่าแสดงความคิดเห็นเช่น Blow your account away ... blabla
เพียงแค่แบ่งปันกลยุทธ์การซื้อขาย
ความนับถือ.