|Top Previous Next|
Store and reference values in grid Columns
Where x is an integer 1 to 999 representing column number and n is an integer representing number of days ago.
COL1 = STOC[21,5] ' Entered on the Resources page this would
' assign to Grid column 1, the 5-day exponential moving average
' of a 21-day stochastic indicator.
IF COL1 > 80 AND COL1 < 80 THEN BUYOPEN
' Here we reference the value stored earlier in column 1.
' Entered on the Entry Logic page this would put you in a long
' trade if the above-mentioned Stochastic value was below 80, 2
' days ago and then crossed above 80 yesterday.
IF COL1 < COL1 AND COL1 < COL1 THEN_
COL8 = 1 ELSE IF COL8 > 0 THEN_
COL8 = COL8 + 1
' This routine looks for a high pivot in the stochastic line
' whose values reside in column 1.
' When it spots a pivot it resets the counter it keeps in column 8.
' On non-pivot days it checks to see if the counter has already
' started and if so increments it by one.
' Any COL8 value greater than 0 represents the number of days that
' have elapsed since the pivot.