Print("Setting the stop order at " + (Close[2] - ( 1 * TickSize)) );
Print("The current price is " + Close[0]);
Print("Currant ask is " + GetCurrentAsk());
Print("The time is " + Time[0]);
entryOrder = EnterShortStop(1, (Close[2] - ( 1 * TickSize)), "MyStrat");
When this code executes, the current prices is 2134.25, and the EnterStopOrder is 2132.75. So, the EnterStopOrder is 1.5 points under the current price when executed. The debugging output is:
Setting the stop order at 2132.75
The current price is 2134.25
Currant ask is 2134.5
The time is 9/20/2016 10:00:00 AM
However, when the price does drop to my order price, at 2132.75, I get the error:
Market Replay Connection. By stop or buy stop limit orders can't be place below the market, affected Order: BuyToCover 1 Stop @ 2128.75
I'm made a video capture of this at: https://youtu.be/oZizaamVo4k
Your help? Thanks,
Comment