I've written a strategy where I've turned on IntraBarOrderGeneration using the code below, however within this strategy I'm trying to place a limit order and it looks like if I don't get filled on the next tick with IOG then the order is cancelled.
[IntraBarOrderGeneration = True];
Is there a way to persist the limit order for a certain time or number of bars (I'm currently using 1 minute bars) whilst still using IOG?
Thanks.
Persisting IntraBarOrderGeneration (IOG) limit orders.
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Persisting IntraBarOrderGeneration (IOG) limit orders.
IntraBarOrderGeneration was designed to use with market orders.I've written a strategy where I've turned on IntraBarOrderGeneration using the code below, however within this strategy I'm trying to place a limit order and it looks like if I don't get filled on the next tick with IOG then the order is cancelled.
[IntraBarOrderGeneration = True];
Is there a way to persist the limit order for a certain time or number of bars (I'm currently using 1 minute bars) whilst still using IOG?
Thanks.
Turn it off if you want otherwise.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Persisting IntraBarOrderGeneration (IOG) limit orders.
A limit order will be kept at broker if the script continues to send it.
The order will be modified or cancelled and resent again depending on the security type and broker.
Please let us know what symbol are you trading and who is your broker.
The order will be modified or cancelled and resent again depending on the security type and broker.
Please let us know what symbol are you trading and who is your broker.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Persisting IntraBarOrderGeneration (IOG) limit orders.
IB broker supports order modification.
It looks like your script does not send the order on the next recalculation.
Please also make sure that the Order confirmation is disabled (Format->Strategy properties->Auto trading tab).
It looks like your script does not send the order on the next recalculation.
Please also make sure that the Order confirmation is disabled (Format->Strategy properties->Auto trading tab).
Re: Persisting IntraBarOrderGeneration (IOG) limit orders.
I can get a Limit order to persist after it has been generated using IBOG. Suggest possibility that your condition for generating the order ends on tick after it has been generated. But at this time not sure what to suggest to overcome that in to make the order persist.
Re: Persisting IntraBarOrderGeneration (IOG) limit orders.
hi all,
regarding the iog, i've also got a problem, if i turn on IOG in the strategy, when i do the backtesting, will the system simulate in a way that it read every tick to see whether the buy signal trigger in the middle of the bar, or it only runs at the close of the bar?
the reason i have this question is that when i use the playback function of multicharts, it will only playback one bar each time, but not simulating the real situation and playback every tick, so i wonder if the IOG function can work in the backtesting procedure.
thanks
regarding the iog, i've also got a problem, if i turn on IOG in the strategy, when i do the backtesting, will the system simulate in a way that it read every tick to see whether the buy signal trigger in the middle of the bar, or it only runs at the close of the bar?
the reason i have this question is that when i use the playback function of multicharts, it will only playback one bar each time, but not simulating the real situation and playback every tick, so i wonder if the IOG function can work in the backtesting procedure.
thanks
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Persisting IntraBarOrderGeneration (IOG) limit orders.
In realtime with IOG enabled the script is calculated tick by tick.
Without IOG on history-the script is calculated on the bar close.
With IOG enabled on history-the script is calculated four times on OHLC.
In Backtesting you can use Bar magnifier
(Strategy Properties -> the Backtesting tab -> Backtesting Precision section -> select Use Bar Magnifier).
The Bar Magnifier backtest feature is important for precise backtesting.
Bar magnifier can be considered as a replay of the way a bar was formed.
The user can choose a replay frequency that is based on number of ticks or
number of minutes.
With IOG and Bar Magnifier enabled the script will be calculated on the close of each bar of detailed data series selected in bar magnifier + high/low of the main data series.
Also you can read about this feature in the Help section of Multicharts.
Without IOG on history-the script is calculated on the bar close.
With IOG enabled on history-the script is calculated four times on OHLC.
In Backtesting you can use Bar magnifier
(Strategy Properties -> the Backtesting tab -> Backtesting Precision section -> select Use Bar Magnifier).
The Bar Magnifier backtest feature is important for precise backtesting.
Bar magnifier can be considered as a replay of the way a bar was formed.
The user can choose a replay frequency that is based on number of ticks or
number of minutes.
With IOG and Bar Magnifier enabled the script will be calculated on the close of each bar of detailed data series selected in bar magnifier + high/low of the main data series.
Also you can read about this feature in the Help section of Multicharts.