[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Decremental trailing stop ela coding



PureBytes Links

Trading Reference Links

Could someone help me code in TS easy language this adaptive trailing stop ?

Here are the rules :

Length1 input

1 for the day of entry and next day :
Exit below the lowest low of the last Length1 days
2 starting the second day after entry :
Length1 is decremented by .3 (and rounded) if two conditions are met :
- today's close is >= yesterday's close
and
- today's close is >= close 3 days ago
3 Length1 is decremented as above until it gets down to 5

Erik