Metastock Indicator Formula |
TRAILING STOP LOSS FORMULA LONG |
TRAILING STOP LOSS IS 25% BELOW OF THE STOCK PRICE. IF SOMENONE WANTS A DIFFERENT PERCENTAGE THEN HE HAS TO MODIFY ACCORDINGLY THE VARIABLES TSE3 AND THE IF STATEMENT |
Formula: |
PDay := Input("Day of Month" ,1,31,1);
PMonth := Input("Month" ,1,12,1);
PYear := Input("Year",1985,2010,2007);
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*25/100;
TSE4:=HighestSince(1 ,TSE1 = 0,TSE3 );
If(TSE1=0,TM-(TM*25/100),Max(TM-(TM*25/100),TSE4)); |
|
|