Is there anyway to make CurrentBar = something else?
So when calculate bar on close is set to true, the second to last bar (Close) is CurrentBar right?
And when calculate on bar close is set to false, the Close is CurrentBar right?
Now is there anyway to make CurrentBar = another bar? meaning I could effectively call Close as CurrentBar.
Is this possible.
In other words, can I make an indicator disregard the the last x number of bars, and start calculating currentbar from x candle,
Effectively what I want to do is shift the logic from close to be close (meaning currentbar has shifted 3) and also everything that follows, so close effectively means close if I have candle logic.
Currentbar is automatically set by the platform when a new bar is added to the series.
You need to create your own variable, which you can call 'offset'.
you then assign this variable with a positive or negative value, whatever you like the offset to be
and when you refer to a bar, you add/substract this from your index.
I understand you can do this, I'm currently trying to figure:
the MAX function will start looking for the Max value of a given period. High, 10)
This is will start at High and look 10 bars back for the highest high.
and the HighestBar will give me the bar integer that produced that High.
However, if I use the Max function with high, 10)
It will start at High and look 10 bars from that point.
Now, how do I get the bar integer for that?
HighestBar only starts indexing from the currentbar, which is 
I can easily attain the value from the HighestBar int.
So I eliminated using the MAX function, so changing the CurrentBar would be ideal,
and not have to use the MAX function.
Last edited by kidvic; February 12th, 2016 at 02:12 AM.