Ziad El:
I am trying desperately to start my arrows from right lower corner, but MQL is insisting on referring all to CORNER_LEFT_UPPER...
Whatever I do, the arrow is drawn 30 pixels away from upper left corner...
Any help, please?
Ok I Got it myself... ChartXYToTimePrice() always refer to upper left corner,
so I have to use
int h = (int) ChartGetInteger(0,CHART_HEIGHT_IN_PIXELS,0);
int w = (int) ChartGetInteger(0,CHART_WIDTH_IN_PIXELS ,0);
and the recalculate new x_ and y_ before asking for ChartXYToTimePrice()
as:
int x_ = w-x;
int y_ = h-y;
ObjectSetInteger(0, "old", OBJPROP_CORNER, corner ); ObjectCreate (0, "old", OBJ_ARROW, 0, T, P );Create the object first, then set properties.
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 am trying desperately to start my arrows from right lower corner, but MQL is insisting on referring all to CORNER_LEFT_UPPER...
Whatever I do, the arrow is drawn 30 pixels away from upper left corner...
Any help, please?