5 mins chart with IOG enabled

Questions about MultiCharts .NET and user contributed studies.
lewisthegood
Posts: 21
Joined: 08 Mar 2021
Been thanked: 1 time

5 mins chart with IOG enabled

Postby lewisthegood » 22 Mar 2022

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.

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: 5 mins chart with IOG enabled

Postby ABC » 22 Mar 2022

lewisthegood ,

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) { }
Regards,

ABC

lewisthegood
Posts: 21
Joined: 08 Mar 2021
Been thanked: 1 time

Re: 5 mins chart with IOG enabled

Postby lewisthegood » 23 Mar 2022

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)?

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: 5 mins chart with IOG enabled

Postby ABC » 23 Mar 2022

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
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)?

lewisthegood
Posts: 21
Joined: 08 Mar 2021
Been thanked: 1 time

Re: 5 mins chart with IOG enabled

Postby lewisthegood » 23 Mar 2022

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.


Return to “MultiCharts .NET”