Trading Systems and Money Management : A Guide to Trading and Profiting in Any Market

(やまだぃちぅ) #1
End;
If StopLoss > 0 Then Begin
If Close < EntryPrice * LongLoss Then
ExitLong ("L.C-Loss") on Close;
If Close > EntryPrice * ShortLoss Then
ExitShort ("S.C-Loss") on Close;
End;
If EntryPrice > 0 Then Begin
{***** The Stop Loss *****}
If StopLoss > 0 Then Begin
ExitLong ("L-Loss") Next Bar at EntryPrice * LongLoss Stop;
ExitShort ("S-Loss") Next Bar at EntryPrice * ShortLoss Stop;
End;
{***** The Trailing Stop *****}
If TrailingStop > 0 Then Begin
ExitLong ("L-Trail") Next Bar at Close * LongTrailing Stop;
ExitShort ("S-Trail") Next Bar at Close * ShortTrailing Stop;
End;
{***** The Profit Protector *****}
If ProfitStop > 0 Then Begin
TrueLength = BarsSinceEntry + 1;
LongProfit = (Highest(Close, TrueLength) - EntryPrice) * TrueProfitStop;
ShortProfit = (EntryPrice - Lowest(Close, TrueLength)) * TrueProfitStop;
ExitLong ("L-Prft") Next Bar at EntryPrice + LongProfit Stop;
ExitShort ("S-Prft") Next Bar at EntryPrice - ShortProfit Stop;
End;
{***** The Profit Target *****}
If TargetStop > 0 Then Begin
ExitLong ("L-Trgt") Next Bar at EntryPrice * LongTarget Limit;
ExitShort ("S-Trgt") Next Bar at EntryPrice * ShortTarget Limit;
End;
If BarsSinceEntry >= TrueSlowBar Then Begin
{***** The Slow-trade Stop *****}
If TrueSlowBar > 0 and OpenPositionProfit < 0 Then Begin
ExitLong ("L-Slow") on Close;
ExitShort ("S-Slow") on Close;

CHAPTER 20 Adding Exits 251

Free download pdf