PDA

View Full Version : Err: order can`t be placed above the market


vitaleg
08-30-2010, 01:54 PM
Hello.

Please explain me the situation - I have a couple of strategies runned in strategies tab. I`ve checked it an found that 3 of them were closed with an error: Sell stop or stop limit orders can`t be placed above the market. What is the problem?

NinjaTrader_RyanM
08-30-2010, 02:04 PM
Hello Vitalieg,

These strategies are submitting invalid orders. You will have to change so that sell stop or stop/limit orders are placed below the market. If you'd like to place orders in this area, then you would want to use limit orders.

vitaleg
08-30-2010, 02:10 PM
Actually I do not understand. I have just added a stop losses to the strategy. Some copies works ok, some closes with this error.

NinjaTrader_RyanM
08-30-2010, 02:25 PM
Please share the code snippets that are submitting these orders.

vitaleg
08-31-2010, 07:45 AM
Sure. I tried to realize the trailstop.

NinjaTrader_RyanM
08-31-2010, 08:14 AM
Hello Vitaleg,

You're using calculation mode price, so it's possible to submit at the wrong side of the market, leading to the messages you're getting.

I suggest using print statements to check the value of your stop losses. Variables lower, higher, and trailstop should all be checked to make sure they are what you expect.

Additional debugging help is available here:
http://www.ninjatrader.com/support/forum/showthread.php?t=3418

vitaleg
08-31-2010, 08:16 AM
Thank you.