True High and True Low

Hi,

Does Amibroker have a function for inputting into a formula the True High and/or the True Low?

True Highs are defined as the higher of either the current bar’s high or the previous bar’s close.
True lows are defined as the lower of either the current bar’s low or the previous bar’s close.

If Amibroker does not have a built in afl function for the True High and/or the True Low
any suggestions on how to code it?

Thank you,

Abbie

As I see it, it is either lower/higher, or not, lower/higher than the previous low/high. Have you looked at the functions LLV/HHV in the function library?
http://www.amibroker.com/guide/afl/hhv.html
http://www.amibroker.com/guide/afl/llv.html

Jim

How about this:

TrueHigh = max(H, Ref(C,-1));
TrueLow = min(L, Ref(C,-1));

Matt

2 Likes