Batuhan:
In this function, I'm getting error # 130 at the "else" section (underlined) of the OrderModify().
What is wrong here?
Thanks a lot.
bazı firmalar Stop ve Hedef li emirleri kabul etmiyorlar. onun için önce Sl ve Tp siz emir açıp sonra OrderModify ile düzenlemeniz gerekir.
int targetRaw = 400;// 40 pip demek double target = NormalizeDouble(targetRaw / Point,MarketInfo(Symbol(),MODE_DIGITS)); //NormalizeDouble((double)targetRaw / 10000.0, 5); double Pips=100;// 10 Pips void Sell_Order(double price, double stopLoss, double takeProfit) { double trade_price = NormalizeDouble(price,MarketInfo(Symbol(),MODE_DIGITS) ); double trade_stopLoss = NormalizeDouble(stopLoss,MarketInfo(Symbol(),MODE_DIGITS)); double trade_takeProfit = NormalizeDouble(takeProfit,MarketInfo(Symbol(),MODE_DIGITS)); int ticket = 0; if(((trade_price - Bid)/Point)>Pips) { ticket = OrderSend(NULL, OP_SELLLIMIT, volume, trade_price, 10, trade_stopLoss, trade_takeProfit); } else { ticket = OrderSend(NULL, OP_SELL, volume, Ask, 10, trade_stopLoss, trade_takeProfit); } if(ticket < 0) { Log_On_Chart("Birinci tür kısa işleme girilemedi: #" + IntegerToString(GetLastError()), redRow); } else { if(OrderSelect(ticket, SELECT_BY_TICKET)) { Log_On_Chart("Birinci tür kısa işleme girildi: " + DoubleToString(OrderOpenPrice(), 5), redRow); trade_takeProfit = OrderOpenPrice() - target; if(OrderModify(ticket, 0, trade_stopLoss, trade_takeProfit, 0)) { Log_On_Chart("Birinci tür kısa işlemin stop noktası: " + DoubleToString(trade_stopLoss, 5), redRow); Log_On_Chart("Birinci tür kısa işlemin hedef noktası: " + DoubleToString(trade_takeProfit, 5), redRow); } else { Log_On_Chart("Birinci tür kısa işlemin hedef noktası güncellenemedi: #" + IntegerToString(GetLastError()), redRow); } } else { Log_On_Chart("Birinci tür kısa işlem seçilemedi: #" + IntegerToString(GetLastError()), redRow); } } }
Thanks Mehmet.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
In this function, I'm getting error # 130 at the "else" section (underlined) of the OrderModify().
What is wrong here?
Thanks a lot.