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?
The use of the Backset Function ?
Moderator: Chris White
-
- Posts: 212
- Joined: Mon Nov 29, 2010 9:21 pm
Re: The use of the Backset Function ?
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 ?
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
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 ?
Henry,
Did you ever get a workaround for "PREV" ?
Thanks,
Ed S.
Did you ever get a workaround for "PREV" ?
Thanks,
Ed S.