did you try ObjectMove() to repositionate after chart event
void OnChartEvent(const int id,const long &lparam,const double &dparam,const string &sparam){ //... ObjectMove(... }
This work for me:
void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) { if (id == CHARTEVENT_CHART_CHANGE) { int width = ChartGetInteger(0, CHART_WIDTH_IN_PIXELS, 0); int nuevaPos = width - 70; ObjectSetInteger(0, InpName, OBJPROP_XDISTANCE, nuevaPos); ChartRedraw(); } }
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 want to ask you the proper way to get a object (in example a Button) repositionate after changing the size of the chart.
Thanks