Two methods need to be applied:
//+------------------------------------------------------------------+ //| CChart Current Properties.mq5 | //| Copyright © 2020, Vladimir Karputov | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright © 2020, Vladimir Karputov" #property link "https://www.mql5.com" #property version "1.00" #property script_show_inputs //--- #include <Charts\Chart.mqh> //--- CChart m_chart; // object of CTrade class //--- input parameters input int Input1=9; //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { //--- m_chart.Attach(); m_chart.AutoScroll(true); m_chart.ColorBackground(clrBlack); m_chart.ShowGrid(false); m_chart.Mode(CHART_CANDLES); m_chart.Shift(true); m_chart.ShowPeriodSep(true); m_chart.ShowLineAsk(true); m_chart.ShowLineBid(true); m_chart.Scale(2); m_chart.ColorBarUp(clrCrimson); m_chart.ColorBarDown(clrBlue); m_chart.ColorCandleBear(clrBlue); m_chart.ColorCandleBull(clrCrimson); m_chart.Detach(); } //+------------------------------------------------------------------+
Properties |
|
Assigns the current chart to the class instance | |
Detaches chart from the class instance |

- www.mql5.com
Two methods need to be applied:
Properties |
|
Assigns the current chart to the class instance | |
Detaches chart from the class instance |
isn't there any way rather than attach and detach methods before and after my chart properties ....i don't like the way it closes a chart when i made a change on the chart timeframe .... Basically when Init and deinit event occurs
isn't there any way rather than attach and detach methods before and after my chart properties ....i don't like the way it closes a chart when i made a change on the chart timeframe .... Basically when Init and deinit event occurs
i found out what was wrong it works well thank you ..your method works as well
isn't there any way rather than attach and detach methods before and after my chart properties ....i don't like the way it closes a chart when i made a change on the chart timeframe .... Basically when Init and deinit event occurs
Pay attention to which program you are working in: in an Expert Advisor or in a script.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Folks ..
I have been trying to use the standard Library for chart.. Using this code
It Doesn't work what's wrong here