Download MetaTrader 5
To add comments, please log in or register
Publish your article and win recognition from thousands of traders!
jean-simon 2015.03.11 02:13 



I want to program an object (horizontal line) that I can move. It will be like a takeprofit, but instead of closing the trade, the trailing stop will start. I am able to program this part.


The problem is, I want the actual takeprofit generated automatically by the system on the chart(The orange dot-line bar) to not enter in conflict with my object. When the two are superposed and I click on them,  I want my object to be selected prior to the normal takeprofit(Using ZORDER doesn't work as the takeprofit generated automatically is not considered as an object). By default, my object is selected after the takeprofit. If it is not possible, I would like to know in last resort how to delete the takeprofit bar peremenently(Having a takeprofit, but not represented on chart). 


So far, the only important part of my code concerning this is the creation of the objects(This code works and doesn't need to be reviewed, I'm putting it here just for info): 


   ObjectCreate(0,"pricebuy",OBJ_HLINE, 0, 0, buyprice);





Thank you! 

Keith Watford
Keith Watford 2015.03.11 05:02  

Click tools\options\chart

There you can either de-select show trade levels or select drag with the alt key.

You should be able to move your horizontal lines then. 

jean-simon 2015.03.11 21:34  

omg so simple



To add comments, please log in or register