Is it possible to program?

Back to topics list To post a new topic, please log in or register
avatar
2
noblefr 2015.03.11 03:13
 

Hello,

 

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);

   ObjectSetInteger(0,"pricebuy",OBJPROP_COLOR,clrMaroon);

   ObjectSetInteger(0,"pricebuy",OBJPROP_SELECTABLE,true);

   ObjectSetInteger(0,"pricebuy",OBJPROP_SELECTED,true); 

 

Thank you! 

avatar
Moderator
3418
GumRai 2015.03.11 06: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. 

avatar
2
noblefr 2015.03.11 22:34 #
 

omg so simple

 

thanks! 

Back to topics list  

To add comments, please log in or register