Dear Nicolas,
Although it seems that this not possible to do, I think that I may have found a way round it, but need your help to streamline the code.
I have managed to get this working reasonably well, is there any way that a loop can be created ?
I hope the below makes a modicum of sense.
TIA
Robert
bi= intradaybarindex
i=11 (39/416)………the tick ratio
if bi=i then
b=b1[11]…………..the indicator being called from a higher tick timeframe
endif
if bi=(i*2) then
b=b1[11]
endif
if bi=(i*3) then
b=b1[11]
endif
if bi=(i*5) then
b=b1[11]
endif
etc…etc…probably need a day’s worth of data points.
Hi Robert, I’m sorry but what is the full purpose of your code and your question? Thank you.
Hi Nicolas,
The idea is to try and get an indicator from the 416 tick chart into the 39 tick chart . Although I know that this is not really possible at the moment, I still want to try!!
I have an indicator that works well in both time frames but wanted to see them both at work in the smaller.
The idea is to call the info for every 11 ticks on the 39, which be roughly 1 tick on the 416.
I need your help to streamline the code, is there anyway that a loop can be created that would count units of 11 (i.e the 39/416 ratio)?
As at the moment I am having to do it the long way round…see above.
I would be grateful if you could shed any light on this.
Many thanks,
Robert
Just my 2 cents on real life experiance and info. Excetuting any code below 1 min TF becomes unstable when placing orders. PRT cannot follow the status of the orders and it will stop the code.
I have raised question here
Cheers Kasper
If I understood correctly, you could just increment a factor each time you call your “higher timeframe” value and also put it in your conditional statement, like this:
//define first time factor
once factor=1
if bi=(i*factor) then
b=b1[11]
factor=factor+1
endif
Hope I’m on the right track! 🙂