I've been studying and coding EAs and scripts for a few weeks so I'm fairly new to MQL language. I felt a necessity to code an EA that creates a close button for every open position directly on the chart and at the right most corner of the screen, near the price level of each particular position. This button should close that particular position (One-Click close without confirmation).
I'm putting a screenshot of what I want. I've created it using Photoshop. Now I don't want to do it via .dll or other external libraries. I want to use the native mq4 button object.
I'd be obliged if experience guys could instruct me or give me some guide as to how am I to put those small buttons so that they stick to their position level.
Well, make sure that you anchor the button to
and the x co=ordinate is 0
Then you just have to set and move the y co-ordinate
:-0 I was puzzled by it if you didn't tell me this. I was thinking of finding a way to calculate screen's width in pixels to put the button at that x coordinate and I was thinking what if the EA is run on a wider screen. Your valuable suggestion solves this problem. I've to improve the way I think when coding :-)