Download MetaTrader 5

how to check if a manually try to open a positon meet a condition

To add comments, please log in or register
Join MQL5 Cloud Network. Improve your rating!
Laurentiu Sorin Tene
692
Laurentiu Sorin Tene 2014.08.17 17:31 

I want to manually send order to open position. BUT I want that orders to be checked if meet one/more condition(s) and ONLY AFTER to be placed on market.

I was thinking to build an EA that runs on a chart but I do not know how to check if a request to open a position was send to server and ONLY after that to place the order on market.

Something like "man in the middle": The order that I send manually to be FIRST processed by my EA and the EA to place it on market. 

So, please give me some advices / suggestions how to code this (what functions to use etc...)  

Alain Verleyen
Moderator
30722
Alain Verleyen 2014.08.17 20:38  
tenlau:

I want to manually send order to open position. BUT I want that orders to be checked if meet one/more condition(s) and ONLY AFTER to be placed on market.

I was thinking to build an EA that runs on a chart but I do not know how to check if a request to open a position was send to server and ONLY after that to place the order on market.

Something like "man in the middle": The order that I send manually to be FIRST processed by my EA and the EA to place it on market. 

So, please give me some advices / suggestions how to code this (what functions to use etc...)  

Build an EA that places some buttons on your chart(BUY, SELL for example). When you click on this button check you conditions and if they are meet, place your order.
Laurentiu Sorin Tene
692
Laurentiu Sorin Tene 2014.08.17 20:45  
angevoyageur:
Build an EA that places some buttons on your chart(BUY, SELL for example). When you click on this button check you conditions and if they are meet, place your order.

Thank you for your reply !

It is really very logically your suggestion ( I have to confess that I did not think about it). But seems too complicate for me to code this. Does anyone has a simpler solution ? 

Alain Verleyen
Moderator
30722
Alain Verleyen 2014.08.17 20:58  
tenlau:

Thank you for your reply !

It is really very logically your suggestion ( I have to confess that I did not think about it). But seems too complicate for me to code this. Does anyone has a simpler solution ? 

You can use any other form of input to initiate your "manual" trade, but I doubt you can find something simpler. What do you find difficult ?

Laurentiu Sorin Tene
692
Laurentiu Sorin Tene 2014.08.17 21:18  
angevoyageur:

You can use any other form of input to initiate your "manual" trade, but I doubt you can find something simpler. What do you find difficult ?

To code an EA that display buttons that have BUY/SELL functions. 
To add comments, please log in or register