Skip to content
All library documents

Consecutive-Close Direction Strategy with TradingView Alert Routing

Article TradingView scripts

Summary

This simple strategy counts consecutive closes that rise or fall. Reaching the configured count submits a long or short strategy entry, respectively, and sends an alert at bar close. The accompanying explanation describes forwarding those alerts through a connector to a broker’s MetaTrader platform for execution, with alerts configured to use function calls. It presents an example of linking a TradingView signal to an external execution workflow.

The strategy contains no described entry filters beyond the consecutive-close count and no stop-loss, profit target, or other trade management in the shown logic. The document offers no backtest evidence or profitability claim; it explicitly leaves market, timeframe, and settings selection to further research. Alert delivery and broker execution are separate operational steps, so the script’s signal logic alone does not establish that a live order will be filled as intended.

Key ideas

  • The strategy counts consecutive rising or falling closes and enters in the corresponding direction when the configured count is met.
  • Long and short alerts are emitted once per bar close alongside the strategy entries.
  • The described workflow forwards TradingView alerts to MetaTrader through an external connector.
  • The shown strategy does not specify stop-loss, take-profit, or additional signal filters.
  • No performance evidence is supplied, and instrument, timeframe, and parameter choices require independent research.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.