Skip to content
All library documents

Automating the PIRANHA Bollinger Band Reversal Strategy in MQL5

Article MQL5 articles

Summary

The article outlines an MQL5 Expert Advisor for the PIRANHA strategy, a volatility-based approach that treats closes beyond Bollinger Bands as potential reversal signals. It describes selling when a bar closes above the upper band and buying when it closes below the lower band, anticipating a pullback or rebound. The strategy section specifies a 12-period band with two standard deviations, while the risk example places a stop loss 100 points from entry and a take profit 50 points away.

The article explains the moving-average and standard-deviation basis of Bollinger Bands and walks through coding and testing the automated rules in MetaTrader 5. Its band discussion also gives a separate 20-period SMA example, creating some ambiguity about the exact indicator configuration used throughout. The conclusion mentions testing and parameter optimization, but the supplied text reports no performance statistics, cost assumptions, or out-of-sample evidence; the reversal premise therefore remains a hypothesis to validate.

Key ideas

  • The strategy treats a close above the upper Bollinger Band as a possible sell signal and a close below the lower band as a possible buy signal.
  • The stated strategy settings use a 12-period Bollinger Band with two standard deviations.
  • The risk example places stop loss and take profit levels at different fixed distances from entry.
  • The article describes coding the entry rules as an MQL5 Expert Advisor and using the platform tester.
  • The text reports no measured trading results, and its separate 20-period band example leaves implementation details ambiguous.

Tags

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