SuperTrend formula

Does anybody know the formula of SuperTrend? It is used in ProRealtime's Probuilder software. I think it is developed by O Seban. I need the codes for TradeStation. thanks..


Did you finally find the code in Pro real time coding. I tested the code in PRT on weekly but result is not that terrific. What's your experience?
What is the underlying phylosophy of supertrend ?

Kind regards and good trading

Norman
[email protected]
 
Re: Pro Realtime Super Trend

Hi everyone,

Does anyone have the Pro Realtime Super Trend coded for excel. I have seen versions coded for Metastock, but I would like to do some bulk backtesting on historic tick data.

Thanks

Do you have the code for supertrend in metastock?

Regards
 
Here are 2 Supertrend formulas for Metastock:

SuperTrend:

Factor:=Input("Factor",1.00,10.00,3.00);
Pd:=Input("ATR Periods",1,100,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);
SuperTrend:=If(Td=1,Dnx,If(Td=-1,Upx,PREV));
SuperTrend;

---------------------------------------------------------------------------------------------

SuperTrend -2:

Mult:= Input("ATR Multiplier",0.1,3,1);
Nb:= Input("NbPeriods",1,8,8);
x:= Input("Price:[1](H+L)/2 [2]Close",1,2,1);
TruRan:= Wilders(ATR(1),Nb)*Mult;
HiLimit:=If(x=1,(H+L)/2-TruRan,C-TruRan);
LoLimit:=If(x=1,(H+L)/2+TruRan,C+TruRan);
LB:=If(HiLimit>=PREV AND HiLimit<C,HiLimit,If(C<PREV,HiLimit-0.1,PREV));
UB:=If(LoLimit<PREV AND LoLimit>C,LoLimit,If(C>PREV,LoLimit+0.1,PREV));
Trend:=If(UB>Ref(UB,-1),1,If(LB<Ref(LB,-1),-1,PREV));
Super:=If((Trend=1 AND Ref(Trend,-1)=-1) OR (Trend=1 OR Trend=0),LB,UB);
Super;
 
Here are the easylanguage formulas of the Function and Indicator: Supertrend, which can be used to create a Strategy and then make backtests:

 
Top