Rejoignez notre page de fans
- Vues:
- 105
- Note:
- Publié:
- Mise à jour:
-
Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance
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.
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. In your main indicator, strip your `#property` section down to just the totals:
#property indicator_plots 31 #property indicator_buffers 78
2. Include the file:
#include <helper_plots.mqh>
3. In OnInit(), you simply instantiate the manager and add your plots. If you want to change the Z-order (layering), just cut and paste the line higher or lower.
int OnInit() { CPlotManager pm; // 1. Add Candles (Automatically handles the 4 data buffers + 1 color buffer) int pi_candles = pm.AddColorCandles(BufO, BufH, BufL, BufC, BufColor, "Candles"); // 2. Add Arrows (Automatically handles codes and shifts) pm.AddArrow(BufBuy, "Buy Signal", 233, 10, clrLime); // 3. Add Calculations (Hidden buffers) pm.AddCalc(BufCalc1); // 4. Check if your #property counts match your actual usage pm.SanityCheck(78, 31); return(INIT_SUCCEEDED); }


The Playground Series v1 to V4 - A combination of trading concepts
The Playground EA series was created for experimentation with Fair Value Gaps (FVGs) and liquidity concepts
OB Trader Order Block Strategy tester
This EA Uses Ict's smart money concept - "Order Blocks" - to place trades
Session Daylight Gradient — Ambient Forex Session Overlay
A lightweight chart overlay that paints a smooth “daylight” gradient across Pacific, Asia, London, and New York sessions—plus optional session separators, event labels, and “sunray” highlights for scheduled news. Includes UTC/Broker/PC time modes and a manual DST shift.
MACD Signals
Indicator edition for new platform.