//+------------------------------------------------------------------+ //| CtrlPanelComment.mqh | //| Copyright 2021, MetaQuotes Ltd. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #ifndef CTRL_PANEL_SET_INFO_MQH #define CTRL_PANEL_SET_INFO_MQH //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ class CCtrlPanelSetInfo: public CCtrlPanelComment { public: CCtrlPanelSetInfo(){}; CCtrlPanelSetInfo(const string param); ~CCtrlPanelSetInfo() {}; virtual void CreatePanelItems(); virtual void OnTickCalculateEvent(); }; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ CCtrlPanelSetInfo::CCtrlPanelSetInfo(const string param):CCtrlPanelComment(param) { } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void CCtrlPanelSetInfo::CreatePanelItems() { _panel.SetText(0,GenerateHeader(), _color_caption ); _panel.SetText(1,GenerateSetInfo(), _color_text ); _panel.SetText(2,GenerateSetInfo2(), _color_text ); _panel.SetText(3,GenerateAccountInfo(), _color_text ); _panel.SetText(4,GenerateStopInfo(), _color_text ); _panel.SetText(5,GenerateNoFirtsOrderByDrawdownInfo(), _color_text ); _panel.SetText(6,GenerateMultyInfo(), _color_text ); _panel.SetText(7,CTRL_PANEL_CAPTION_SELL_GRID, _color_sell ); _panel.SetText(8,GenerateGridWorkInfo(short_hd), _color_text ); _panel.SetText(9,GenerateGridParamInfo(short_hd), _color_text ); _panel.SetText(10,CTRL_PANEL_CAPTION_BUY_GRID, _color_buy ); _panel.SetText(11,GenerateGridWorkInfo(long_hd), _color_text ); _panel.SetText(12,GenerateGridParamInfo(long_hd), _color_text ); _panel.SetText(13,GenerateBlockTradeInfo(), _color_err ); } void CCtrlPanelSetInfo::OnTickCalculateEvent() { CCtrlPanelComment::OnTickCalculateEvent(); TComment *item=_panel.GetList().GetNodeAtIndex(13); if (item==NULL) return; string s=GenerateBlockTradeInfo(); if (StringCompare(s,item.text)) { _panel.SetText(13,s, _color_err ); _readyForUpdate=true; } }; #endif //+------------------------------------------------------------------+