Exit plugins system

Exit Plugins in Pine Algo - add external exit signal sources, set position-closing conditions, and automate the final step of your trading strategy.

Pine Algo

Pine Algo umożliwia rozwijanie i optymalizowanie strategii automatycznych w PineScript na platformie TradingView.

The Exit Plugins section in the Pine Algo [psyll] strategy is used to extend the logic for closing positions and controlling position opening through additional filters and confirmations. It works similarly to Entry Plugins, with the difference that it manages the exit timing and blocks openings.

This feature allows precise control over when the strategy should close a position - not only based on the main signal but also on external market conditions such as trend reversal, moving average crossover, volume decline, or confirmation from auxiliary indicators.

How it works

Each exit plugin (Plugin 1 and Plugin 2) can be independently activated and configured. The strategy evaluates their logical state, and only when the specified conditions are met will the Exit signal be executed.

This allows the user to:

  • enforce position closing only when additional filter conditions are met,
  • avoid premature exits during short-term price corrections,
  • synchronize exit logic with other Pine indicators (e.g., volume, trend, momentum).

Settings

Each plugin has the same configuration parameters:

  • Enabled - toggles the plugin on or off. When disabled, the filter does not affect the strategy’s decision.
  • Source - the data source used as the logical input for the filter. It can be a signal from a Pine Algo Plugin, another indicator, or any source from the TradingView input list.
  • Reverse - reverses the plugin’s logic. For example, if the plugin generates a logical value of 1 (exit signal), enabling Reverse will make the strategy interpret it as a refusal to close - and vice versa.