Download MetaTrader 5
To add comments, please log in or register
No PC at hand? Communicate with friends using your mobile phone!
kuolung
36
kuolung 2015.10.14 04:49 

how do I add a button on the chartwindow

can do some thing like "Buy" "Sell"

peter.MT4Web
158
peter.MT4Web 2015.10.14 16:51  

You have to add Objects.


  int iChartID = ChartID ( );
 
  ObjectCreate (iChartID, "ButtonSell", OBJ_BUTTON, iSubWindow, 0, 0);
  ObjectSetInteger (iChartID, "ButtonSell", OBJPROP_XDISTANCE, 10);
  ObjectSetInteger (iChartID, "ButtonSell", OBJPROP_YDISTANCE, 10);
  ObjectSetInteger (iChartID, "ButtonSell", OBJPROP_XSIZE, 50);
  ObjectSetInteger (iChartID, "ButtonSell", OBJPROP_YSIZE, 25);
  ObjectSetString (iChartID, "ButtonSell", OBJPROP_TEXT, "SELL");

/
To add comments, please log in or register