hi every one
I write an expert that put 3 buttons : SELL BUY CLOSE
I want to put these 3 buttons into a panel or window that I can drag them together
can any one help me
Best regards
Neda
ouush ! that is not easy :) but here's you go ...
- www.mql5.com
Uses a draggable rectangle. See Dragging Rectangle label like a window interface. What class to use ? - Rectangles - MQL4 and MetaTrader 4 - MQL4 programming forum #4
ouush ! that is not easy :) but here's you go ...
your links are for MT5 I use MT4
do you have reference for MT4?
My GUI/Trade Assistant EA (for MT4): 'Money Manager Graphic Tool' indicator by 'takycard' - Risk Management - Articles, Library comments - MQL5 programming forum - Page 6 #55
Uses a draggable rectangle. See Dragging Rectangle label like a window interface. What class to use ? - Rectangles - MQL4 and MetaTrader 4 - MQL4 programming forum #4
hi
Thanks for reply I saw your expert that was complicated for me I really cant understand I just want to put below buttons in box that I can drag them can you guide me in easy way?
int b1() { int chart_ID=0; string name="BUY"; if(!ObjectCreate(0,name,OBJ_BUTTON,0,0,0)) { Print(__FUNCTION__, ": failed to create the button! Error code = ",GetLastError()); return(false); } ObjectSetInteger(chart_ID,name,OBJPROP_XDISTANCE,570); ObjectSetInteger(chart_ID,name,OBJPROP_YDISTANCE,38); ObjectSetInteger(chart_ID,name,OBJPROP_XSIZE,60); ObjectSetInteger(chart_ID,name,OBJPROP_YSIZE,36); ObjectSetInteger(chart_ID,name,OBJPROP_CORNER,0); ObjectSetString(chart_ID,name,OBJPROP_TEXT,"BUY"); ObjectSetString(chart_ID,name,OBJPROP_FONT,"Arial"); ObjectSetInteger(chart_ID,name,OBJPROP_FONTSIZE,12); ObjectSetInteger(chart_ID,name,OBJPROP_COLOR,clrWhite); ObjectSetInteger(chart_ID,name,OBJPROP_BGCOLOR,clrGreen); ObjectSetInteger(chart_ID,name,OBJPROP_BORDER_COLOR,clrBlack); ObjectSetInteger(chart_ID,name,OBJPROP_BACK,false); ObjectSetInteger(chart_ID,name,OBJPROP_STATE,false); ObjectSetInteger(chart_ID,name,OBJPROP_SELECTABLE,false); ObjectSetInteger(chart_ID,name,OBJPROP_SELECTED,false); ObjectSetInteger(chart_ID,name,OBJPROP_HIDDEN,false); ObjectSetInteger(chart_ID,name,OBJPROP_ZORDER,0); //+------------------------------------------------------------------+ //| Button SELL | //+------------------------------------------------------------------+ string name1="SELL"; if(!ObjectCreate(0,name1,OBJ_BUTTON,0,0,0)) { Print(__FUNCTION__, ": failed to create the button! Error code = ",GetLastError()); return(false); } ObjectSetInteger(chart_ID,name1,OBJPROP_XDISTANCE,675); ObjectSetInteger(chart_ID,name1,OBJPROP_YDISTANCE,38); ObjectSetInteger(chart_ID,name1,OBJPROP_XSIZE,60); ObjectSetInteger(chart_ID,name1,OBJPROP_YSIZE,36); ObjectSetInteger(chart_ID,name1,OBJPROP_CORNER,0); ObjectSetString(chart_ID,name1,OBJPROP_TEXT,"SELL"); ObjectSetString(chart_ID,name1,OBJPROP_FONT,"Arial"); ObjectSetInteger(chart_ID,name1,OBJPROP_FONTSIZE,12); ObjectSetInteger(chart_ID,name1,OBJPROP_COLOR,clrWhite); ObjectSetInteger(chart_ID,name1,OBJPROP_BGCOLOR,clrRed); ObjectSetInteger(chart_ID,name1,OBJPROP_BORDER_COLOR,clrBlack); ObjectSetInteger(chart_ID,name1,OBJPROP_BACK,false); ObjectSetInteger(chart_ID,name1,OBJPROP_STATE,false); ObjectSetInteger(chart_ID,name1,OBJPROP_SELECTABLE,false); ObjectSetInteger(chart_ID,name1,OBJPROP_SELECTED,false); ObjectSetInteger(chart_ID,name1,OBJPROP_HIDDEN,false); ObjectSetInteger(chart_ID,name1,OBJPROP_ZORDER,0); }
your links are for MT5 I use MT4
do you have reference for MT4?
In future please put your topic in the correct "MQL4 and Metatrader 4" section.
I will move the topic there.
Please edit your post and use the code button (Alt+S) when pasting code.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi every one
I write an expert that put 3 buttons : SELL BUY CLOSE
I want to put these 3 buttons into a panel or window that I can drag them together
can any one help me
Best regards
Neda