I think the idea behind your question is the possibility to confirm an automated trade by a click.
So no order is places after you have confirmed it by a click on a button.
I would do it like this:
if(Indicator shows in the right direction)
{
PlaySound("ok.wav"); // you must be informed, if the button appears on the screen
int answer = MessageBox("Shall order be placed ?","Expert Advisor XYZ",MB_YESNO); // 6 is yes, 7 is no
if(answer==6)
{ int ticket = OrderSend("EURGBP",OP_BUY,1.0,Bid,0,0,0,"XYZ",123,0,clrBlue); }
}
I think the idea behind your question is the possibility to confirm an automated trade by a click.
So no order is places after you have confirmed it by a click on a button.
I would do it like this:
if(Indicator shows in the right direction)
{
PlaySound("ok.wav"); // you must be informed, if the button appears on the screen
int answer = MessageBox("Shall order be placed ?","Expert Advisor XYZ",MB_YESNO); // 6 is yes, 7 is no
if(answer==6)
{ int ticket = OrderSend("EURGBP",OP_BUY,1.0,Bid,0,0,0,"XYZ",123,0,clrBlue); }
}
this is awesome. Has gotten me started. Now I'm looking for ways to change the labels of the two buttons from Yes No to Buy Sell... any ideas?
And can it be specific to that chart window?
thanks again... great start.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Can someone share with me simple code for mql4 to have a clickable button on a forex chart that when clicked places a market order?
If not the code, where to go to research.
All my searches send me to mql5.