I'm no expert, but your exit strategy in EasyLanguage for TS might go somethting like this:
Input:
InitalStopValue(20);
Variables:
MyStop(0),
Target1(false),
Target2(false),
Target3(false);
// Place Your Buy Condition Here
{ Entry Code }
// Exit strategy for long trades
If (MarketPosition = 1 ) Then
Begin
If ( OpenpositionProfit < 25 ) Then
MyStop = InitalStopValue;
If ( OpenPositionProfit >= 25 ) And ( Target1 = false ) Then
Begin
MyStop = EntryPrice;
Target1 = true;
End;
If ( OpenPositionProfit >= 40 ) And ( Target2 = false ) Then
Begin
MyStop = EntryPrice + 5;
Target2 = true;
End;
If ( OpenPositionProfit >= 50 ) And ( Target3 = false ) Then
Begin
MyStop = EntryPrice + 8;
Target3 = true;
End;
If ( OpenPositionProfit >= 75 ) Then
Begin
Sell("20pt Target") next bar at EntryPrice+20 limit;
MyStop = EntryPrice + 10;
End;
// Sell on MyStop
Sell("Stop") next bar at MyStop stop;
End;
// Reset target flags once position is closed
If ( MarketPosition = 0 ) Then
Begin
Target1 = false;
Target2 = false;
Target3 = false;
End;