ฉันต้องการความช่วยเหลือในการตั้งค่าตรรกะอย่างถูกต้องสำหรับการเปิด order ... การปฏิบัติที่ดีที่สุดในการเปิดคำสั่งซื้อคืออะไรถ้าราคากระทบยอดขาย? (ยังมี Slippage)
=============================
ตัวแปรสำหรับการเปิดบัญชี:
แทรกรหัส int i;/แถบดัชนี int Counted_bars;จำนวนแถบที่นับ Counted_bars = IndiorCounted ();/จำนวนบาร์ที่นับ i = บาร์ - Counted_bars-1;/ดัชนีของครั้งแรกที่นับไม่ได้ขณะที่ (igt; = 0)/ห่วงสำหรับบาร์ไม่มีการนับ {double MA_Line = iCustom (NULL, timeframe, MA StdDev, MA_Period, 1, 6, 0, 0, i); double S_Line1 = iCustom (NULL, timeframe, MA StdDev, MA_Period, 1, 6, 0, 1, i); double S_Line2 = iCustom (NULL, timeframe, MA StdDev, MA_Period, 1, 6, 0, 2, i); double S_Line3 = iCustom (NULL, timeframe, MA StdDev, MA_Period, 1, 6, 0, 3, i); double S_Line4 = iCustom (NULL, timeframe, MA StdDev, MA_Period, 1, 6, 0, 4, i); double U_StopLoss = iCustom (NULL, timeframe, MA StdDev, MA_Period, 1, 6, 0, 5, i); double L_StopLoss = iCustom (NULL, ระยะเวลา, MA-StdDev, MA_Period, 1, 6, 0, 5, i); double B_Line1 = iCustom (NULL, timeframe, MA-StdDev, MA_Period, 1, 6, 0, 1, i); double B_Line2 = iCustom (NULL, ระยะเวลา, MA-StdDev, MA_Period, 1, 6, 0, 2, i); double B_Line3 = iCustom (NULL, ระยะเวลา, MA-StdDev, MA_Period, 1, 6, 0, 3, i); double B_Line4 = iCustom (NULL, ระยะเวลา, MA-StdDev, MA_Period, 1, 6, 0, 4, i); double StochBuyLine = iStochastic (สัญลักษณ์ (), 0,14,3,3,1,1,0, i); double StochSellLine = iStochastic (สัญลักษณ์ (), 0,14,3,3,1,1,1, i); ผม--; }
ลอจิกต้องการทบทวนและให้คำแนะนำ:
แทรกรหัสถ้า (Tradeable) อื่นทำลาย; ถ้า CurrentPrice lt; MA_Line {ถ้า StochBuyLinegt; StochSellLine StochBuyLinelt; = 10 CurrentPrice = B_Line4 {OpenBuyOrder @ Line4LotSize} อื่นถ้า StochBuyLinegt; StochSellLine StochBuyLinelt; = 10 CurrentPrice = B_Line3 {OpenBuyOrder @ Line3LotSize} อื่นถ้า StochBuyLinegt; StochSellLine StochBuyLinelt; = 10 CurrentPrice = B_Line2 {OpenBuyOrder @ Line2LotSize} อื่นถ้า StochBuyLinegt; StochSellLine StochBuyLinelt; = 10 CurrentPrice = B_Line1 {OpenBuyOrder @ Line1LotSize}} else {ถ้า StochSellLinegt; StochBuyLine StochSellLinegt; = 90 CurrentPrice = B_Line4 {OpenBuyOrder @ Line4LotSize} อื่นถ้า StochSellLine StochSellLinegt; = 90 CurrentPrice = B_Line3 {OpenBuyOrder @ Line3LotSize} Else if StochSellLinegt; StochBuyLine StochSellLinegt; = 90 CurrentPrice = B_Line2 {OpenBuyOrder @ Line2LotSize} อื่น ๆ ถ้า StochSell Linegt; StochBuyLine StochSellLinegt; = 90 CurrentPrice = B_Line1 {OpenBuyOrder @ Line1LotSize} # 91; font = quot # 93;} # 91;font # 93;