Page 1 of 1

The use of the Backset Function ?

Posted: Sun May 08, 2016 2:49 pm
by henry1224
In Metastock formula one could use a Prev function to get the value from a previous bar if a condition was not met.

In Edgerater, could I use the BACKSET(Cond,f,N) function to do the same thing?

Re: The use of the Backset Function ?

Posted: Sun May 08, 2016 3:24 pm
by Chris White
There is no equivalent of the PREV function at the moment. BACKSET will not do the same thing but perhaps you don't need PREV? What is it you are trying to do?

Re: The use of the Backset Function ?

Posted: Sun May 08, 2016 3:44 pm
by henry1224
this is a formula from Metastock

Factor:= Input("Factor", 1.00,10.00,3.00);
Pd:= Input("ATR Periods", 1,200,10);
Up:= MP() + (factor * ATR(Pd));
Dn:= MP() - (factor * ATR(Pd));
Td:= If(Cross(C, LLV(Up, 13)), 1, If(Cross(HHV(Dn, 13), C), -1, PREV));
DNX:= If(Dn = HighestSince(1, Cross(Td, 0), Dn), Dn, PREV);
Upx:= If(Up = LowestSince(1, Cross(0, Td), Up), Up, PREV);
ST:= If(Td = 1, DNX, If(Td =- 1, UPX, PREV));
ST


The last four variables use the Prev function to keep the old value in play till a new event

thanks for the help

Re: The use of the Backset Function ?

Posted: Thu Jul 14, 2016 11:05 am
by nibor200
Henry,

Did you ever get a workaround for "PREV" ?

Thanks,
Ed S.