Order Modify Error 1?

Post Reply
User avatar
remix919
Trader
Posts: 91
Joined: Wed Jan 23, 2013 2:42 am
Location: Some Road in the USA

Order Modify Error 1?

Post by remix919 »

I'm trying to use a trailing stop and it seems to work fine except every now and then I'll get the error Order Modify Error 1, but then it will continue to set the trailing stop perfectly fine, then some more errors, then continues fine. Any idea what I did wrong?

Code: Select all

            if(UseTrailingStop && TrailingStop > 0) {                 
               if((OrderOpenPrice() - Ask) > (Point * TrailingStop)) {
                  if((OrderStopLoss() > (Ask + Point * TrailingStop)) || (OrderStopLoss() == 0)) {
                     OrderModify(OrderTicket(), OrderOpenPrice(), Ask + Point * TrailingStop, OrderTakeProfit(), 0, DarkOrange);
                     if (!EachTickMode) BarCount = Bars;
                     continue;
                  }
               }
            }
EA's are the best way to trade. Why? Because they take the emotion out of trading.
User avatar
remix919
Trader
Posts: 91
Joined: Wed Jan 23, 2013 2:42 am
Location: Some Road in the USA

Re: Order Modify Error 1?

Post by remix919 »

I just played around with the strategy tester and noticed I only get this error when it tries to trade high lot sizes nearing my maximum equity, so maybe it's got something to do with that?
EA's are the best way to trade. Why? Because they take the emotion out of trading.
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Re: Order Modify Error 1?

Post by fxdaytrader »

It could depend on the stop-/freezelevels of your broker ...

The most important thing is that you set the initial stoploss and make sure that it is set. ;)
User avatar
remix919
Trader
Posts: 91
Joined: Wed Jan 23, 2013 2:42 am
Location: Some Road in the USA

Re: Order Modify Error 1?

Post by remix919 »

fxdaytrader wrote:It could depend on the stop-/freezelevels of your broker ...

The most important thing is that you set the initial stoploss and make sure that it is set. ;)
Ok, thanks for the advice :) I'm using Oanda, but does the broker's settings effect the strategy tester on Empty4?
EA's are the best way to trade. Why? Because they take the emotion out of trading.
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Re: Order Modify Error 1?

Post by fxdaytrader »

I think so :)
Post Reply

Return to “Coders Hangout”