stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Order Modify Error 1?
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1425
Page 1 of 1
Author:  remix919 [ Fri Jan 25, 2013 12:26 pm ]
Post subject:  Order Modify Error 1?

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;
                  }
               }
            }
Author:  remix919 [ Fri Jan 25, 2013 2:18 pm ]
Post subject:  Re: Order Modify Error 1?

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?
Author:  fxdaytrader [ Fri Jan 25, 2013 2:38 pm ]
Post subject:  Re: Order Modify Error 1?

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. ;)
Author:  remix919 [ Fri Jan 25, 2013 2:41 pm ]
Post subject:  Re: Order Modify Error 1?

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?
Author:  fxdaytrader [ Fri Jan 25, 2013 2:53 pm ]
Post subject:  Re: Order Modify Error 1?

I think so :)
All times are UTC Page 1 of 1