How to tell if a position exited due to an exit signal, protective stop, or entry reversal

Trading Strategies in NeuroShell Trader can exit an existing position in three different ways:

1) When the exit conditions become true and an exit order is placed

2) When a protective stop is hit.

3) When “Long/Short entries exit existing short/long positions” option is selected and the opposite entry condition becomes true causing a position reversal.

Sometimes it is useful to know which exit method was utilized to exit a position. The indicators below can be used to determine, on the bar on which the exit occurred, which exit method was utilized. These indicators utilize the trading strategy entry and exit output signals as well as the Bars Since Exit Filled/Activated indicators to determine which method was utilized.

EXIT SIGNAL EXITS:

Indicator that signals a Long Position was exited due to exit conditions being true:

Lag( And2 (Long Exit Signal: Trading Strategy, Not(Short Entry Signal: Trading Strategy) ), 1)

Indicator that signals a Short Position was exited due to exit conditions being true:

Lag( And2 (Short Exit Signal: Trading Strategy, Not(Long Entry Signal: Trading Strategy) ), 1)

PROTECTIVE STOP EXITS:

Indicator that signals that a Long Position was exited due to a protective stop being hit:

And3( A=B(Lag(Position(Trading Strategy),1),1), A=B(BarsSinceExitFill(Trading Strategy,1),0), A>B(BarsSinceExitAct(Trading Strategy,1),1) )

Indicator that signals that a Short Position was exited due to a protective stop being hit:

And3( A=B(Lag(Position(Trading Strategy),1),-1), A=B(BarsSinceExitFill(Trading Strategy,1),0), A>B(BarsSinceExitAct(Trading Strategy,1),1) )

ENTRY REVERSAL:

Indicator that signals that a Long Position was exited due to the Short Entry condition(s) causing a reversal:

Lag( And2 (Long Exit Signal: Trading Strategy, Short Entry Signal: Trading Strategy ), 1)

Indicator that signals that a Short Position was exited due to Long Entry condition(s) causing a reversal:

Lag( And2 (Short Exit Signal: Trading Strategy, Long Entry Signal: Trading Strategy ), 1)

Was this article helpful?

Related Articles