Demasiadas llaves. Código insertado void OpenMarketOrders () {double MA_Line = iCustom (NULL, 0, MA StdDev, MA_Period, 1, 6, 0, 0,0); double S_Line1 = iCustom (NULL, 0, MA StdDev, MA_Period, 1, 6, 0, 1,0); doble S_Line2 = iCustom (NULL, 0, MA StdDev, MA_Period, 1, 6, 0, 2,0); doble S_Line3 = iCustom (NULL, 0, MA StdDev, MA_Period, 1, 6, 0, 3,0); double S_Line4 = iCustom (NULL, 0, MA StdDev, MA_Period, 1, 6, 0, 4,0); double U_StopLoss = iCustom (NULL, 0, MA StdDev, MA_Period, 1, 6, 0,5,0); double L_StopLoss = iCustom (NULL, 0, MA-StdDev, MA_Period, 1, 6, 0,5,0); double B_Line1 = iCustom (NULL, 0, MA-StdDev, MA_Period, 1, 6, 0, 1,0); double B_Line2 = iCustom (NULL, 0, MA-StdDev, MA_Period, 1, 6, 0, 2,0); double B_Line3 = iCustom (NULL, 0, MA-StdDev, MA_Period, 1, 6, 0, 3,0); double B_Line4 = iCustom (NULL, 0, MA-StdDev, MA_Period, 1, 6, 0, 4,0); double StochBuyLine = iStochastic (Symbol (), 0,14,3,3,1,1,0,0); double StochSellLine = iStochastic (Symbol (), 0,14,3,3,1,1,1,0); int line1trades = 0, line2trades = 0, line3trades = 0, line4trades = 0; boleto int; if (Tradeable == true) {if (Ask lt; MA_Line) {if (line4tradeslt; 1 StochBuyLinegt; = StochSellLine StochBuyLinelt; = 10 ((Open # 91; 0 # 93; lt; B_Line4 Close # 91; 0 # 93; gt; = B_Line4) || (Abrir # 91; 0 # 93; gt; B_Line4 Cerrar # 91; 0 # 93; lt; = B_Line4))) {ticket = OrderSend (Symbol (), OP_BUY, LotSize * 6, Ask , 3, 0, 0, Coach Line4Buy, MagicNumber, 0, Green); line4trades = 1; } if (line3tradeslt; 1 StochBuyLinegt; = StochSellLine StochBuyLinelt; = 10 ((Open # 91; 0 # 93; lt; B_Line3 Close # 91; 0 # 93; gt; = B_Line3) || (Open # 91; 0 # 93 ; gt; B_Line3 Cerrar # 91; 0 # 93; lt; = B_Line3))) {ticket = OrderSend (Symbol (), OP_BUY, LotSize * 3, Ask, 3, 0, 0, Coach Line3Buy, MagicNumber, 0, Verde ); line3trades = 1; } if (line2tradeslt; 1 StochBuyLinegt; = StochSellLine StochBuyLinelt; = 10 ((Open # 91; 0 # 93; lt; B_Line2 Close # 91; 0 # 93; gt; = B_Line2) || (Open # 91; 0 # 93 ; gt; B_Line2 Cerrar # 91; 0 # 93; lt; = B_Line2))) {ticket = OrderSend (Symbol (), OP_BUY, LotSize * 2, Ask, 3, 0, 0, Coach Line2Buy, MagicNumber, 0, Verde ); line2trades = 1; } if (line1tradeslt; 1 StochBuyLinegt; = StochSellLine StochBuyLinelt; = 10 ((Abrir # 91; 0 # 93; lt; B_Line1 Cerrar # 91; 0 # 93; gt; = B_Line1) || (Abrir # 91; 0 # 93 ; gt; B_Line1 Close # 91; 0 # 93; lt; = B_Line1))) {ticket = OrderSend (Symbol (), OP_BUY, LotSize, Ask, 3, 0, 0, Coach Line1Buy, MagicNumber, 0, Green); line1trades = 1; }} else {if (line4tradeslt; 1 StochSellLinegt; = StochBuyLine StochSellLinegt; = 90 ((Open # 91; 0 # 93; lt; S_Line4 Close # 91; 0 # 93; gt; = S_Line4) || (Open # 91; 0 # 93; gt; S_Line4 Close # 91; 0 # 93; lt; = S_Line4))) {ticket = OrderSend (Symbol (), OP_SELL, LotSize * 6, Bid, 3, 0, 0, Coach Line4Sell, MagicNumber, 0, rojo); line4trades = 1; } if (line3tradeslt; 1 StochSellLinegt; = StochBuyLine StochSellLinegt; = 90 ((Open # 91; 0 # 93;lt; S_Line3 Cerrar # 91; 0 # 93; gt; = S_Line3) || (Abrir # 91; 0 # 93; gt; S_Line3 Cerrar # 91; 0 # 93; lt; = S_Line3))) {ticket = OrderSend (Symbol (), OP_SELL, LotSize * 3, Pujar , 3, 0, 0, Coach Line3Sell, MagicNumber, 0, Red); line3trades = 1; } if (line2tradeslt; 1 StochSellLinegt; = StochBuyLine StochSellLinegt; = 90 ((Open # 91; 0 # 93; lt; S_Line2 Close # 91; 0 # 93; gt; = S_Line2) || (Open # 91; 0 # 93 ; gt; S_Line2 Cerrar # 91; 0 # 93; lt; = S_Line2))) {ticket = OrderSend (Symbol (), OP_SELL, LotSize * 2, Bid, 3, 0, 0, Coach Line2Sell, MagicNumber, 0, Red ); line2trades = 1; } if (line1tradeslt; 1 StochSellLinegt; = StochBuyLine StochBuyLinegt; = 90 ((Open # 91; 0 # 93; lt; S_Line1 Close # 91; 0 # 93; gt; = S_Line1) || (Open # 91; 0 # 93 ; gt; S_Line1 Cerrar # 91; 0 # 93; lt; = S_Line1))) {ticket = OrderSend (Symbol (), OP_SELL, LotSize, Bid, 3, 0, 0, Coach Line1Sell, MagicNumber, 0, Red); line1trades = 1; }}}}