tradeking313
Member
Im trying to get a plot code which states for example:
The previous sixth 15 min bar high is the highest bar within 6 bars ago and 6 bars after...intraday chart on the 15 min chart. I attached a picture of it..As of can see 10.43 is the highest bar..
I would like to condense my code that has the high bar to be highest with 6 bars ago than the six bars behind it instead of writing it this
def LPP15 = H15[6] >= H15[1] and H15[6] >= H15[2] and H15[6] >= H15[3] and H15[6] >= H15[4] and H15[6] >= H15[7] and H15[6] >= H15[8] and H15[6] >= H15[9] and H15[6] >= H15[10] and H15[6] >= H15[11] and H15[6] >= H15[12] ;
Plot Data: LP15 is true;
The previous sixth 15 min bar high is the highest bar within 6 bars ago and 6 bars after...intraday chart on the 15 min chart. I attached a picture of it..As of can see 10.43 is the highest bar..
I would like to condense my code that has the high bar to be highest with 6 bars ago than the six bars behind it instead of writing it this
def LPP15 = H15[6] >= H15[1] and H15[6] >= H15[2] and H15[6] >= H15[3] and H15[6] >= H15[4] and H15[6] >= H15[7] and H15[6] >= H15[8] and H15[6] >= H15[9] and H15[6] >= H15[10] and H15[6] >= H15[11] and H15[6] >= H15[12] ;
Plot Data: LP15 is true;
Last edited: