Do a Trade with "One Click Trading"

 

Hi everyone!

I would like to know if it is possible using the library ( user32.dll ) to be able to make market entries by making the Expert press the Buy/Sell in the graph window, as shown in the image.

Instead of doing an OrderSend() within the code to have it press the Buy or Sell in "One CLick Trading", a bit like disabling or enabling autoTrading directly from the code.

I hope I made myself clear!

Files:
screen.png  4 kb
 
It's certainly possible with WinAPI, but why would you need to do that ?
 
Alain Verleyen # :
It's certainly possible with WinAPI, but why would you need to do tha

I need it because I was asked by a client that his operations are not identified as carried out by an expert advisor.


I know that in theory putting a MagicNumber = 0 would suffice, but I'm not so sure about that.


I found this include which I enclose where many functions are shown, I tried to test others but I can only make Limit or stop orders but no market operations.

Files:
aswincmd.mqh  20 kb
 

Please post in English only on this forum.

You can use automatic translation tool if needed.

Thanks.
 
Stefano Cocconi #:

I need it because I was asked by a client that his operations are not identified as carried out by an expert advisor.


I know that in theory putting a MagicNumber = 0 would suffice, but I'm not so sure about that.

Effectively, the broker knows if an order is sent by an Expert Advisor or manually. Nothing related to the magic number.

I found this include which I enclose where many functions are shown, I tried to test others but I can only make Limit or stop orders but no market operations.

You will struggle to find the good way to do it. I would suggest to check if it has not already by done (Forum, Codebase...).