거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Telegram에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
라이브러리

CPlotManager (Auto Buffer and Plot Manager) - MetaTrader 5용 라이브러리

조회수:
170
평가:
(2)
게시됨:
업데이트됨:
\MQL5\Include\ \MQL5\indicators\
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

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); }


Sanity Check



The Playground Series v1 to V4 - A combination of trading concepts 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

News Spread Risk Dashboard (Spike and Gap Monitor) News Spread Risk Dashboard (Spike and Gap Monitor)

A compact on-chart dashboard that monitors live spread behavior, tracks rolling Min/Max/Avg, and warns on abnormal spread spikes (news, low liquidity, rollover) using adaptive or fixed thresholds with optional alerts.

Session Daylight Gradient — Ambient Forex Session Overlay 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 MACD Signals

Indicator edition for new platform.