In default mode, i know that the script is calculated at the close of the bar, and "Bars.Close[0]" event means the close of the current bar.
In IOG mode, i know that the script is calculated on each tick, but I need to confirm that "Bars.Close" in IOG mode means the close of the each tick instead of the close of the bar? For example in IOG mode, Bars.Close[0] - Bars.Close[1] will return the close of the current tick minus the close of the previous tick....? If that is correct, I just want to find a solution to calculate "Bars.Close[0] - Bars.Close[1]" for the close of the bars, instead of the close of each tick in IOG mode.
"Bars.Close" event in IOG mode
- ABC
- Posts: 723
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 410 times
- Contact:
Re: "Bars.Close" event in IOG mode
lewisthegood,
Bars.Close[1] will always be the value of the closing tick for the previous bar - the behavior is the same whether or not IOG is enabled.
Regards,
ABC
Bars.Close[1] will always be the value of the closing tick for the previous bar - the behavior is the same whether or not IOG is enabled.
Regards,
ABC
-
- Posts: 21
- Joined: 08 Mar 2021
- Been thanked: 1 time
Re: "Bars.Close" event in IOG mode
Is there a way to calculate the script at bar close (to check the conditions for sending orders) , but calculate the script with IOG mode once a trade is opened to take profit/ cut loss?
- ABC
- Posts: 723
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 410 times
- Contact:
Re: "Bars.Close" event in IOG mode
lewisthegood,
you could for example compute parts of your logic depending on Bars.Status and only evaluate the code block for the closing tick.
Regards,
ABC
you could for example compute parts of your logic depending on Bars.Status and only evaluate the code block for the closing tick.
Regards,
ABC