[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Code for Pivot Line



PureBytes Links

Trading Reference Links

Here is my attempt at coding the "Pivots".
It showed interesting results on a ESM2 15min.
Thanks for the idea.

Eric Svendsen

Var: Hi(0), Lo(0), M(0), Q(0);

if D <> D[1] then
begin
 Hi = C;
 Lo = C;
end;

if C > Hi then Hi = C;
if C < Lo then Lo = C;

M = (Hi + Lo) / 2;

Q = Hi - Lo;
if C < M then Q = Q * 0.25
else Q = Q * 0.75;
Q = Lo + Q;

Plot1(M, "M");
Plot2(Q, "Q");
Plot3(Lo, "Lo");
Plot4(Hi, "Hi");