Metastock Indicator Formula |
Trailing Stoploss ATR |
Formula: |
PDay := Input("Day of Month" ,1,31,1);
PMonth := Input("Month" ,1,12,1);
PYear := Input("Year",2000,2010,2002);
PATR := Input("Multiple of ATR",1,10,2);
TSE1 := BarsSince(DayOfMonth() = PDay AND Month() = PMonth
AND Year() = PYear);
TSE2 := HighestSince(1,TSE1=0,H ) ;
TSE3 := TSE2 - PATR*ATR(15);
HighestSince(1 ,TSE1 = 1 ,TSE3 )
|
|
|