Trailing Stoploss Long for Metastock
Trailing stoploss below the price using percent not ATR or any other method.
Indicator / Formula
Copy & Paste Friendly
{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
Leave Comment
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
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