注文のために論理を正しく設定するのに助けが必要です...。価格がラインに当たった場合、注文を開くベストプラクティスは何ですか? (また、スリッパと)
=================
注文のための変数:
挿入されたコードint i;/バーインデックスint Counted_bars;/カウントされたバーの数Counted_bars = IndiorCounted();/カウントされたバーの数i = Bars-Counted_bars-1;/最初にカウントされていないwhile(igt; = 0)のインデックス//カウントされていないバーのループ{double MA_Line = iCustom(NULL、タイムフレーム、MA StdDev、MA_Period、1、6、0、0、i);ダブルS_Line1 = iCustom(NULL、タイムフレーム、MA StdDev、MA_Period、1、6、0、1、i);ダブルS_Line2 = iCustom(NULL、タイムフレーム、MA StdDev、MA_Period、1、6、0、2、i);ダブルS_Line3 = iCustom(NULL、タイムフレーム、MA StdDev、MA_Period、1、6、0、3、i);ダブルS_Line4 = iCustom(NULL、タイムフレーム、MA StdDev、MA_Period、1、6、0、4、i);ダブルU_StopLoss = iCustom(NULL、タイムフレーム、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、タイムフレーム、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 = iSchchastic(記号()、0,14,3,3,1,1,0、i); double StochSellLine = iSchchastic(シンボル()、0,14,3,3,1,1,1、i);私 - ; }
レビューとアドバイスを必要とする論理:
挿入されたコードif(Tradeable)else break;もし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}}エルス{ならStochSellLinegt; StochBuyLine StochSellLinegt; = 90 CurrentPrice = B_Line4 {OpenBuyOrder @ Line4LotSize}そうであればStochSellLine StochSellLinegt; = 90 CurrentPrice = B_Line3 {OpenBuyOrder @ Line3LotSize}そうでなければStochSellLinegt; StochBuyLine StochSellLinegt; = 90 CurrentPrice = B_Line2 {OpenBuyOrder @ Line2LotSize}そうでなければStochSell #93;}#91;font#93;#91;#93;#93;