forex software

Create and Test Forex Strategies

forex software

strategies:demo-05-trailing-stop-limit

Demo 05 Trailing Stop Limit

Demo 05 Trailing Stop Limit

Author's Description

This strategy tests the “Trailing Stop Limit” exit. It sets 20 pips Trailing Stop and 100 pips Take Profit.

Long Position

Long Entry at bar opening Ask price.
Initial Stop Loss = Bid - 20 * Point
Take Profit = Bid + 100 * Point

Short Position

Short Entry at bar opening Bid price.
Initial Stop Loss = Ask + 20 * Point
Take Profit = Ask - 100 * Point

The Stop Loss starts trailing when the position made 20 pips profit.
The Stop Limit is constant.

The “Trailing Stop Limit” function works even if you switch off Forex Strategy Trader. That is because its logic is released in the Expert Adviser. If you stop the Expert, the Stop Loss will not trail anymore and will be fixed at the current level.

Generated Description

Opening (Entry Signal)

Open a new long position at the beginning of the bar when the following logic condition is satisfied:

the Accelerator Oscillator* (Simple, Median, 34, 5, 5) rises. Open a new short position at the beginning of the bar when the following logic condition is satisfied:

the Accelerator Oscillator* (Simple, Median, 34, 5, 5) falls.

Closing (Exit Signal)

Close an existing long position at the Trailing Stop level or at the constant Take Profit level. Initial Stop Loss: 20 pips; Take Profit: 100 pips.

Close an existing short position at the Trailing Stop level or at the constant Take Profit level. Initial Stop Loss: 20 pips; Take Profit: 100 pips.

Handling of Additional Entry Signals

Entry signal in the direction of the present position:

  • No averaging is allowed. Cancel any additional orders which are in the same direction.

Entry signal in the opposite direction:

  • No modification of the present position is allowed. Cancel any additional orders which are in the opposite direction.

Trading Size

Always trade a constant number of lots.

  • Opening of a new position - 1 lot.

Permanent Protection

The strategy doesn't use a Permanent Stop Loss.

The strategy doesn't use a Permanent Take Profit.


* Use the indicator value from the previous bar for all asterisk-marked indicators!