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

Dashboard Panel - MetaTrader 5용 라이브러리

Hayk Babayan
Hayk Babayan
Algorithmic trader. I build and test Expert Advisors for MetaTrader 5 with one rule: a strategy has to prove itself on data it has never seen before I trust it.
조회수:
60
평가:
(1)
게시됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Most EAs show their state with Comment() or a pile of label objects. Both are hard to read, flicker, and look out of place on modern screens. DashboardPanel.mqh draws the whole card on one CCanvas bitmap, with smooth rounded corners and proper fonts, and it takes a few lines of code.

DashboardDemo card on an XAUUSD chart

What it does

  • Title and subtitle, and a status pill (for example LIVE, PAUSED, LOCKED) in green, amber, red, grey or your accent colour.
  • Text rows: a label on the left and a value on the right. Each value can be coloured by its meaning: normal, dim, good, warn, bad or accent.
  • Progress bars with a value, for example daily loss used, margin used, or progress to a target.
  • Separator lines between groups.
  • Light and dark themes. In automatic mode the card follows the chart background.
  • Anti-aliased rounded corners and bars, drawn pixel by pixel. Sizes follow the Windows display scaling, so the card stays sharp on high-DPI screens.
  • Fast: the card redraws only when a value changes. A full redraw of a 300x300 card takes about 3 ms.
  • A click on the header folds the card down to its title bar and back.
  • Any chart corner.

Example

#include "DashboardPanel.mqh"
CDashboardPanel panel;
int r_equity,r_loss;

int OnInit()
  {
   panel.Create("my_card",12,24,300);
   panel.SetTitle(_Symbol,"My EA");
   r_equity=panel.AddText("Equity");
   r_loss  =panel.AddBar("Daily loss used");
   EventSetTimer(1);
   return(INIT_SUCCEEDED);
  }

void OnTimer()
  {
   panel.SetText(r_equity,DoubleToString(AccountInfoDouble(ACCOUNT_EQUITY),2));
   panel.SetBar(r_loss,0.35,"35%",DASH_WARN);
   panel.SetStatus("LIVE",DASH_GOOD);
   panel.Redraw();
   ChartRedraw();
  }

void OnChartEvent(const int id,const long &lparam,const double &dparam,const string &sparam)
  {
   panel.OnEvent(id,lparam,dparam,sparam);   // fold/unfold on a header click
  }

void OnDeinit(const int reason)
  {
   panel.Destroy();
  }

Example indicator

DashboardDemo shows an account and symbol card: balance, equity, floating and closed-today P/L, open positions, spread, margin used and where the price is inside today's range. It updates every second. Put DashboardPanel.mqh in the same folder as the indicator.

Broker Clock Broker Clock

Broker server time, UTC and the local time of London, Frankfurt, New York, Tokyo and Sydney, with daylight saving time on any date, live and in the Strategy Tester.

Market Structure Visualizer - HH HL LH LL BOS CHoCH Market Structure Visualizer - HH HL LH LL BOS CHoCH

Free non-repainting MT5 market structure indicator that identifies confirmed HH, HL, LH and LL swings, plots BOS and CHoCH structure breaks, and includes close/wick confirmation, dashboard bias and optional alerts.

LotFromRisk: position size from risk, stop and commission LotFromRisk: position size from risk, stop and commission

An include file for calculating the size of a position to be opened. It turns a risk figure (percent of the balance, percent of the equity or money), a stop and a commission per lot into a lot size whose loss at the stop never goes over that risk. The lot is always rounded down to the volume step and a risk below the minimum volume returns 0 lots with a reason.

MACD Signals MACD Signals

Indicator edition for new platform.