Skip to content
All library documents

Consecutive Candle Strategy with TradingView-to-MetaTrader Alerts

Article Strategy library · Author: Peter_O

Summary

This document presents a simple directional strategy that counts consecutive higher or lower closing prices. After the chosen run length is reached, it enters long after rising closes or short after falling closes. The example uses three bars for each direction. It also adds alerts on bar close so an external connector can forward signals from TradingView to a broker’s MetaTrader platform, where orders may be executed.

The document explains the alert-routing workflow and notes that alert configuration must listen for calls from the script. It offers no performance results or risk-adjusted backtest evidence. The post advises researching the instrument, settings, and timeframe independently and states that profitable results are not guaranteed. The strategy description itself does not define stop loss or take profit rules; those are mentioned as possible extensions. Its usefulness is therefore mainly as an example of a basic price-sequence signal and alert-based execution setup, rather than evidence of a validated trading edge.

Key ideas

  • The strategy goes long after a specified run of higher closes and short after a run of lower closes.
  • The example sets both consecutive-bar thresholds to three.
  • Alerts are sent when a signal occurs at bar close and can be routed to MetaTrader.
  • The document provides no evidence that the signal is profitable across instruments or timeframes.
  • Risk controls such as stop loss and take profit are not specified in the example strategy.

Tags

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