Forums › ProRealTime English forum › ProOrder support › [beta-testing] multi timeframe support for automatic trading, ideas are welcome! › Reply To: [beta-testing] multi timeframe support for automatic trading, ideas are welcome!
08/16/2018 at 11:00 AM
#78355
BARINDEX always keeps track of the bars in the lowest TF (the one used to launch a strategy, or default TF), so we need to set up variables to count bars on higher TFs as time goes by.
To avoid this overhead I suggest that, mirroring the TIMEFRAME syntax, also BARINDEX accepts a TF within parenthesis, like:
1 2 3 |
BarIndex (10 seconds) BarIndex (1 hours) Barindex (Monthly) |
and that referencing past bars would still be allowed:
1 2 3 4 |
BarIndex (4 hours)[0] //or just BarIndex (4 hours) BarIndex (4 hours)[1] . . |