best trader: i want to move button with price i am unable to make it work can someone please help. sorry i am new to mql oncalculate i am calling objectmove but its not working.
-
Buttons are fixed to (x,y) pixel coordinates, not to prices. That is why your move does not work.
// ObjectMove(buttonId, 0, Time[0],0); int x,y; ChartTimePriceToXY(0,0, Time[0], Open[0], x, y); ObjectSetInteger(0, buttonID, OBJPROP_CORNER, CORNER_LEFT_UPPER); ObjectSetInteger(0, buttonID, OBJPROP_XDISTANCE, x); ObjectSetInteger(0, buttonID, OBJPROP_YDISTANCE, y);
-
You don't have to continuously move the button. Place it in the upper right/lower right of the chart and just leave it there.
How To Ask Questions The Smart Way. (2004)
The XY Problem
William Roeder #:
Thankyou!!!! i got it.....
-
Buttons are fixed to (x,y) pixel coordinates, not to prices. That is why your move does not work.
-
You don't have to continuously move the button. Place it in the upper right/lower right of the chart and just leave it there.
How To Ask Questions The Smart Way. (2004)
The XY Problem
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
hi
i want to move button with price i am unable to make it work can someone please help. sorry i am new to mql oncalculate i am calling objectmove but its not working.
Thanks!!