OnChartEvent() and CHARTEVENT_CHART_CHANGE should be used.
//+------------------------------------------------------------------+ //| ChartEvent function | //+------------------------------------------------------------------+ void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) { //--- if(id==CHARTEVENT_CHART_CHANGE) Draw(); } //+------------------------------------------------------------------+
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have created a canvas
And then I have drawn primitives
I want to bind this canvas to the main chart because I have a problem when I try to do a vertical scale or a horizontal scroll. My primitives don't move with the main chart. How to fix it ?