Me gustaría obtener ayuda para ubicar la lógica correctamente para la apertura de pedidos ... ¿Cuál es la mejor práctica para abrir una orden si el precio llega a una línea? (adicionalmente, con Slippage)
==========================
Factores para la apertura de pedidos:
Código insertado int I;/Índice de barras int Counted_bars;/Número de barras contadas Counted_bars = IndiorCounted ();/Número de publicaciones contadas I = Bars-Counted_bars-1;/Índice de la inicial sin contar while (igt; = 0)/Loop para las publicaciones no contadas 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, 2, 0, 1, I); double S_Line2 = iCustom (NULL, timeframe, MA StdDev, MA_Period, 1, 6, 2, 0, 2, I); double S_Line3 = iCustom (NULL, timeframe, MA StdDev, MA_Period, 1, 6, 2, 0, 3, I); double S_Line4 = iCustom (NULL, timeframe, MA StdDev, MA_Period, 1, 6, 2, 0, 4, I); double U_StopLoss = iCustom (NULL, timeframe, MA StdDev, MA_Period, 1, 6, 2, 0, 5, I); double L_StopLoss = iCustom (NULL, timeframe, MA-StdDev, MA_Period, 1, 6, 2, 0, 5, I); double B_Line1 = iCustom (NULL, timeframe, MA-StdDev, MA_Period, 1, 6, 0, 1, I); double B_Line2 = iCustom (NULL, timeframe, MA-StdDev, MA_Period, 1, 6, 0, 2, I); double B_Line3 = iCustom (NULL, timeframe, MA-StdDev, MA_Period, 1, 6, 2, 0, 3, I); double B_Line4 = iCustom (NULL, timeframe, 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); YO--;
Lógica que necesita inspección y consejo:
Código insertado if (Tradeable) else break; debe CurrentPrice lt; MA_Line si StochBuyLinegt; StochSellLine StochBuyLinelt; = 10 CurrentPrice = B_Line4 OpenBuyOrder @ Line4LotSize Else si StochBuyLinegt; StochSellLine StochBuyLinelt; = 10 CurrentPrice = B_Line3 OpenBuyOrder @ Line3LotSize Else si StochBuyLinegt; StochSellLine StochBuyLinelt; = 10 CurrentPrice = B_Line2 OpenBuyOrder @ Line2LotSize Else si StochBuyLinegt; StochSellLine StochBuyLinelt; = 10 CurrentPrice = B_Line1 OpenBuyOrder @ Line1LotSize Else si StochSellLinegt; StochBuyLine StochSellLinegt; = 90 CurrentPrice = B_Line4 OpenBuyOrder @ Line4LotSize Else si StochSellLine StochSellLinegt; = 90 CurrentPrice = B_Line3 OpenBuyOrder @ Line3LotSize Else si StochSellLinegt; StochBuyLine StochSellLinegt; = 90 CurrentPrice = B_Line2 OpenBuyOrder @ Line2LotSize Else si StochSellLinegt; StochBuyLine StochSellLinegt; = 90 CurrentPrice = B_Line1 OpenBuyOrder @ Line1LotSize # 91; ribbon = quot # 93; # 91;font # 93;