Trailing Stoploss Long for Metastock
Trailing stoploss below the price using percent not ATR or any other method.
Submitted by kaiji over 3 years ago
Similar Formulas
- Trailing Stoploss ATR
- ATR Trailing Stop Loss II
- adx with stochastics signals
- Price Action Indicator (PAIN)
- Moving Average of Only One Day of a the Week
- ADX/PDI/MDI v2.0
Formula
{Credit goes to Christos Siannas with modifications by me}
PDay := Input("Day of Month" ,1,31,1);
PMonth := Input("Month" ,1,12,1);
PYear := Input("Year",1985,2010,2007);
PPercent := Input("Percent Below" ,1,40,25);
TM:=Input("PRICE:",0,15000,1);
TSE1 := BarsSince(DayOfMonth() = PDay AND Month() = PMonth AND Year() = PYear);
TSE2 := HighestSince(1,TSE1=0,C) ;
TSE3 := TSE2 - TSE2*PPercent/100;
TSE4:=HighestSince(1 ,TSE1 = 0,TSE3 );
If(TSE1=0,TM-(TM*PPercent/100),Max(TM-(TM*PPercent/100),TSE4));
3 Comments
I no longer use Metastock so I can’t test it but this is an indicator and goes into the indicator builder. What sort of error did you get?
I already can put the formula at indicator builder.
I think I already know what the problem.
the problem I can not set the parameter.
that why line is not appear.
thank you very much for your kindness
Please login here to leave a comment.
thank you.please let me know, because I am a new user in metastock,is this explorer or EA or indicator. please help me, how to enter your formula in metastock.I already try to put in explorer and indicator builder ,but did not work. thank you for your help