OK, I have finalised the new Slopemeter code.
The new input pipdiff = 1.5.
This is now the [U]default value[/U] for all 15 min pairs, and is changed from the original value of 3.
All the credit for designing this new version goes to [B]Ken DoubleU.[/B]
He is becoming a giant here in a very short time.
Thanks heaps for the help Ken!!
So now, [B][U]please delete the old code[/U][/B] and instal this new one…
indicator AA_BB_slope_meter ;
input pipdiff = 1.5;
draw zeroline(“zeroline”, solid_line, black,2),
entry_long(“long”, solid_line, green,2),
entry_short(“short”, solid_line, red,2),
res(“slopemeter”, solid_line, blue,2);
vars i(number), avg(series), pip_fctr(number);
begin
if close[back(close)] <10 then
pip_fctr := 0.0001
else
pip_fctr := 0.01;
zeroline := makeseries (front(close), back(close), 0);
entry_long := makeseries (front(close), back(close), pip_fctr * pipdiff );
entry_short := makeseries (front(close), back(close), -1*pip_fctr * pipdiff );
avg := sma(close,20);
for i := front(close) + 20 + 1 to back(close) do
res[i] := avg[i] - avg[i-1];
end.
[B]END OF POST.[/B]