I'm using 5 mins chart with IOG enabled. Is it possible to have the condition calculated in every bar close/open instead of every tick while orders can be sent intra-bar (IOG)?
e.g. Order will be sent on only on bar close if RSI > 70 (condition), and able to take profit on intra-bar.
5 mins chart with IOG enabled
- ABC
- Posts: 722
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 410 times
- Contact:
Re: 5 mins chart with IOG enabled
lewisthegood ,
you can for example evaluate your conditions at the end of the bar by evaluating them dependent of the bar status.
Regards,
ABC
you can for example evaluate your conditions at the end of the bar by evaluating them dependent of the bar status.
Code: Select all
if (Bars.Status == EBarState.Close)
{
}
ABC
-
- Posts: 21
- Joined: 08 Mar 2021
- Been thanked: 1 time
Re: 5 mins chart with IOG enabled
thanks for the advice. It is possible to have the the particular part of the script calculated on each 5 min bar (Calculate on each bar close), and particular part to calculate on every tick( IOG enabled)?
- ABC
- Posts: 722
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 410 times
- Contact:
Re: 5 mins chart with IOG enabled
lewisthegood,
your script would get executed with every tick (if IOG is enabled), but using the bar status check you can make sure that certain parts of the code are only executed on bar close. I would suggest testing this and for example writing a message to the output on bar close.
Regards,
ABC
your script would get executed with every tick (if IOG is enabled), but using the bar status check you can make sure that certain parts of the code are only executed on bar close. I would suggest testing this and for example writing a message to the output on bar close.
Regards,
ABC
thanks for the advice. It is possible to have the the particular part of the script calculated on each 5 min bar (Calculate on each bar close), and particular part to calculate on every tick( IOG enabled)?
-
- Posts: 21
- Joined: 08 Mar 2021
- Been thanked: 1 time
Re: 5 mins chart with IOG enabled
but if I have IOG enabled, the RSI/MACD would calculated on every tick which is not desired (I need them to calculated on every bar instead of every tick), and allow the order to in-and-out intra-bar.