Hello,
I have an issue regarding the use of Stop and Limit order in the IOG enable, in which it works perfectly fine when the IOG is disable,
As suppose I would like to set a buy order with a stop price as the following:
Buy Next Bar AT 100 STOP <-- in which I intend to have an buy order at 100 or higher when the current level is at 80 only
This works fine with the IOG mode disable and buy order would be waiting at 100 to get executed; however, with the IOG enable the order simply filled at the current level of 80 instead of waiting until the price hit 100. For the property setting, I enable the extended backtesting mode, and backtesting precision to use bar magnifier at 1 tick.
The same issue applied to sell order with both Limit and STOP orders.
Please explain me how I can get the desire backtest result with any particular settings.
Thank you.
Backtest requirement of STOP or LIMIT Order in IOG mode
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Backtest requirement of STOP or LIMIT Order in IOG mode
Hello henrywl,
A buy stop order cannot be filled at lower price. If you have the following code, it should not execute the order at 80 in backtesting:
If it indeed happens, please come to our live chat during working hours (6:30 am – 2:45 pm EST) to let our operators connect to your computer remotely and help you: http://messenger.providesupport.com/mes ... pport.html
If you have a code like this:
Where "X" is a variable, please print this variable at every code calculation to find out why it changes to a different value. You can find an example here.
Please read this article to learn how script is calculated and orders are executed with your setup.
A buy stop order cannot be filled at lower price. If you have the following code, it should not execute the order at 80 in backtesting:
Code: Select all
Buy Next Bar AT 100 STOP;
If you have a code like this:
Code: Select all
Buy Next Bar AT X STOP;
Please read this article to learn how script is calculated and orders are executed with your setup.