Saya ingin bantuan dengan meletakkan logik dengan betul untuk pembukaan pesanan .... Apakah amalan terbaik untuk membuka pesanan jika harga mencecah garisan? (tambahan pula, dengan Slip)
=============================
Faktor Pembukaan Perintah:
Kod dimasukkan ke int I;//Bar index int Counted_bars;/Bilangan bar yang dikira Counted_bars = IndiorCounted ();/Bilangan pub yang dikira I = Bars-Counted_bars-1;//Indeks awal tidak terkira semasa (igt; = 0)/Gelung untuk pub yang tidak terkira dua MA_Line = iCustom (NULL, jangka masa, MA StdDev, MA_Period, 1, 6, 0, 0, I); double S_Line1 = iCustom (NULL, jangka masa, MA StdDev, MA_Period, 1, 6, 2, 0, 1, I); double S_Line2 = iCustom (NULL, jangka masa, MA StdDev, MA_Period, 1, 6, 2, 0, 2, I); double S_Line3 = iCustom (NULL, jangka masa, MA StdDev, MA_Period, 1, 6, 2, 0, 3, I); double S_Line4 = iCustom (NULL, jangka masa, MA StdDev, MA_Period, 1, 6, 2, 0, 4, I); double U_StopLoss = iCustom (NULL, jangka masa, MA StdDev, MA_Period, 1, 6, 2, 0, 5, I); double L_StopLoss = iCustom (NULL, jangka masa, MA-StdDev, MA_Period, 1, 6, 2, 0, 5, I); double B_Line1 = iCustom (NULL, jangka masa, MA-StdDev, MA_Period, 1, 6, 0, 1, I); double B_Line2 = iCustom (NULL, jangka masa, MA-StdDev, MA_Period, 1, 6, 0, 2, I); double B_Line3 = iCustom (NULL, jangka masa, MA-StdDev, MA_Period, 1, 6, 2, 0, 3, I); double B_Line4 = iCustom (NULL, jangka masa, MA-StdDev, MA_Period, 1, 6, 2, 0, 4, I); double StochBuyLine = iStochastic (Symbol (), 0,14,3,3,1,1,0, I); double StochSellLine = iStochastic (Symbol (), 0,14,3,3,1,1,1, I); Saya--;
Logik memerlukan pemeriksaan dan nasihat:
Kod sisipan jika (boleh dikerjakan) lain dipecahkan; harus CurrentPrice lt; MA_Line jika StochBuyLinegt; StochSellLine StochBuyLinelt; = 10 CurrentPrice = B_Line4 OpenBuyOrder @ Line4LotSize lain jika StochBuyLinegt; StochSellLine StochBuyLinelt; = 10 CurrentPrice = B_Line3 OpenBuyOrder @ Line3LotSize lain jika StochBuyLinegt; StochSellLine StochBuyLinelt; = 10 CurrentPrice = B_Line2 OpenBuyOrder @ Line2LotSize lain jika StochBuyLinegt; StochSellLine StochBuyLinelt; = 10 CurrentPrice = B_Line1 OpenBuyOrder @ Line1LotSize lain jika StochSellLinegt; StochBuyLine StochSellLinegt; = 90 CurrentPrice = B_Line4 OpenBuyOrder @ Line4LotSize lain jika StochSellLine StochSellLinegt; = 90 CurrentPrice = B_Line3 OpenBuyOrder @ Line3LotSize lain jika StochSellLinegt; StochBuyLine StochSellLinegt; = 90 CurrentPrice = B_Line2 OpenBuyOrder @ Line2LotSize Else if StochSellLinegt; StochBuyLine StochSellLinegt; = 90 CurrentPrice = B_Line1 OpenBuyOrder @ Line1LotSize # 91; ribbon = quot # 93; # 91;font # 93;