Hi All,
I have been trying to convert a system I am using on VT-Trader (Which I think
is similar to Metastock code) to Amibroker but I am unable to get my head
around the looping stuff in regards to the PREV function. I just cannot get it
to work the way it should. I have tried everything but no matter what I do it
doesn't work right and grinds my computer to a halt.
Can anyone please help me?
This is the VT code
{RGM Master Trading System}
RGM_Power_Line_Setup:= (Wilders(ATR(30),24)*2.824);
RGM_Power_Line:= If(BarCount()>(30+24),
If(Ref(C,-1)>PREV(0) AND C>PREV(0),Max(PREV(0),C-RGM_Power_Line_Setup),
If(Ref(C,-1)<PREV(0) AND C<PREV(0),Min(PREV(0),C+RGM_Power_Line_Setup),
If(Cross(C,PREV(0)),C-RGM_Power_Line_Setup,
If(Cross(PREV(0),C),C+RGM_Power_Line_Setup,
If(C=PREV(0),PREV(0),PREV(0)))))),
NULL);
Thank You