Download MetaTrader 5

Please help with - Do not initiate a trade until the opposite trade meets TP or SL

To add comments, please log in or register
Kamran Sheikh
12
Kamran Sheikh  

Hello

I want to add a condition to my EA. I want it not to open a new buy until the short is either stooped out or meets the take profit criteria. Similarly, I want my EA to not initiate a sell until the already open buy meet either the stop loss or take profit condition. 

I am using Molanis Strategy Builder, as I do not have any programming knowledge. They sent me a link with a code  http://www.molanis.com/forum/viewtopic.php?f=6&t=5975&p=11074&hilit=opened+position+mql+icon+number+of+opened+position#p11074

 I would really help if someone could please help me with this problem.

 

Many thanks 

molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming • View topic - MA Strategy Question
  • www.molanis.com
Author Message Hello Everyone, I am trying to build a strategy that uses Moving Averages. My strategy functions OK in MT4 terminal but does something I would like to eliminate. When a trade is open and the signal changes the EA will close the open trade and execute a trade based on the new opposite signal. Can someone tell me how to configure...
Martyn Tinsley
124
Martyn Tinsley  
Kamran Sheikh:

Hello

I want to add a condition to my EA. I want it not to open a new buy until the short is either stooped out or meets the take profit criteria. Similarly, I want my EA to not initiate a sell until the already open buy meet either the stop loss or take profit condition. 

I am using Molanis Strategy Builder, as I do not have any programming knowledge. They sent me a link with a code  http://www.molanis.com/forum/viewtopic.php?f=6&t=5975&p=11074&hilit=opened+position+mql+icon+number+of+opened+position#p11074

 I would really help if someone could please help me with this problem.

 

Many thanks 

I don't know Molanis that well, so someone please correct me if I am wrong, but I suspect you might need to code this, which you have already said you don't feel able to do. I store my open trade details in arrays, and so check to see if there is already an open trade as a criteria before my EA is allowed to open a new trade. You could also do it by iterating through all of the open trades in the order pool using OrderSelect(). It might be worth you investing the time to learn MQL4/5 - you get so much more flexibility that you get from UI based strategy builders.
To add comments, please log in or register