We’ve all been there (I think). You’re coding a complex indicator with 70+ buffers and 30+ plots. You decide to move a "Filling" background behind a "Candle" plot, and suddenly you have to manually re-number 50 lines of SetIndexBuffer calls.

It’s monotonous, error-prone, and a massive headache trying to calculate if "Plot 5" starts at "Buffer 12" or "Buffer 16" because of color buffers.

I wrote a wrapper class ("CPlotManager") to automate this hierarchy.

  • No more manual counting.
  • No more massive "#property" lists defining every color and width.
  •  Manage complex color palettes (like Color Candles) with a single array.
  • Covers all plots available in MQL5

You just "Add" plots in the order you want them drawn. The class handles the math, the buffer binding, and the styling automatically.

How to Use

  1. Include helper_plots.mqh.

  2. Set your #property totals (give yourself plenty of room).

  3. In OnInit, instantiate the manager and just "Add" what you need.

Review the demo code for full implementation.