Thanks Iván,
code:
Express LW_Proxy_Index_COT
Vars
Numeric
i;
Series
CoT,
xrange,
xOmC,
span,
OmC;
Input
$Period(1, 500, 50),
$Multiplicator(1, 500, 50);
Calculation
SetYscaleFormat(“%9.2f”);
If IsFirstBar() then
begin
for i = 0 to FinalBarIndex()
begin
span[-i] = h[-i] – l[-i];
OmC[-i] = o[-i] – c[-i];
end
MovingAverage(OmC, xOmC, $Period);
MovingAverage(span, xrange, $Period);
end
Cot = xOmC/(xRange*$Multiplicator)+$Multiplicator;
Interpretation
begin
end
plot(CoT, lightblue, 1);//@@@cs:279245-3426050-147030_cs@@@
This would produce a proxy COT graph but I’d need one step more and that’s to make a momentum indicator out of the indicator above.
Regards,
Ed