dlewisfl Posted December 9, 2010 Report Share Posted December 9, 2010 There's no way to set the background color of a text object (OBJ_LABEL or OBJ_TEXT) that I can find. A workaround would be to draw an OBJ_RECTANGLE with background property set true. This is all well and good when these objects are in a fixed location on the chart. I want to be able to specify screen loaction in the EA parameters to move the box/text objects - the problem is that text objects use pixel offsets for placement and rectangle object uses a time/price to determine screen location. Does anyone have an algorithm to convert time/price to pixels (or vice-versa)? Can it even be done using only MQL4 syntax? I don't see any built-in functions/properties to get it done. Thanks! Quote Link to comment Share on other sites More sharing options...
dlewisfl Posted December 14, 2010 Author Report Share Posted December 14, 2010 In case anyone is interested, I found a way to do this by using two OBJ_LABEL objects. The first contains the text I want displayed, the second uses the Webdings font 'g' character which is shaded rectangle that takes the entire character space. You can either set the Webdings object to a large font size for one large box or set a string of 'g's which gives you more flexibility in box shape. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.