Code: Select all
Inputs:
Double price(close),
Double bxo(0.2),
Double sxo(-0.04),
Double length(14);
Variables:
Double num(0),
Double denom(0),
Double PM(0),
Double accuD(0),
Double accuN(0);
For N = 1 to length - 1 begin
accuN = accuN + (price - getValue(price, N, length)) / Sqrt[N];
end;
For P = 1 to length - 1 begin
accuD = accuD + Sqrt[D];
end;
PM = (num / denom) * 7;
SetPlotColor(1, PMColor);
SetPlotWidth(1,2);
plot1(PM, "PM");