High and Low values for the last 3-4 candles

aggy

Active Member
#1
Hi all,

can anyone please provide me the afl code which plots "HIGH and LOW values of last 3-4 candles" for intraday purpose only.


thanks in advance
 

colion

Active Member
#2
You can start with this from the Users Guide:

Ref
- reference past/future values of the array Trading system toolbox

SYNTAX Ref( ARRAY, period )

RETURNS ARRAY

FUNCTION References a previous or subsequent element in a ARRAY. A positive period references "n" periods in the future; a negative period references "n" periods ago. The function accepts periods parameter that can be constant as well as time-variant (array).

EXAMPLE The formula "ref( CLOSE, -14 )" returns the closing price 14 periods ago. Thus, you could write the 14-day price rate-of-change (expressed in points) as "C - ref( C, -14 )." The formula "ref( C, 12 )" returns the closing price 12 periods ahead (this means looking up the future)
 

Similar threads