Hi
I am trying to get a normal dispalced moving average indicator (as per attached picture ) which are :
Blue line Period=3 Displaced =3
Red line Period=7 Displaced =5
Do adv how I can modified the formula as shown below:
periods:=Input("Mov Avg periods",6,2600,13);
slowMA:= Ref(Mov(C,periods,S),+3);
fastMA:= Ref(Mov(C,5,E),+3);
shift:= 0.9* Min(slowMA, LOW);
up:=If(fastMA>slowMA,slowMA,shift);
dn:=If(fastMA<slowMA,slowMA,shift);
{Plot - use points only line-style for best effect}
up; {green}
dn; {red}
shift; {colour me the same as the chart background colour}
rgds