Download MetaTrader 5
To add comments, please log in or register
Sell your CPU capacity and earn money!
sakda8
7
sakda8 2016.08.01 07:25 

How to open 3-4 strategies(EA) in 1 currency pair and 1 trade account?

Does anyone have  an idea on opening  4 strategies(EA)  for 1 currency pair simultaneously ?

Here's is my code for opening peding order

    if(OrdersTotal() == 0)

               {

               //Open buy Order

               ticket1 = OrderSend(Symbol(),OP_BUYSTOP,lot,High[1],slippage,sl_level,tp_level,"This is Buy Order");

               } 

The current code will open only 1 pending order which won't work for overlapping trade. Please help. Thank you 

sammy511
3
sammy511 2016.08.01 07:57  
Hi, Do you mean 3-4 EA in one currency, one period and in one account ?

If so, I suggest that you should look at magic number. 
honest_knave
969
honest_knave 2016.08.01 09:14  
sakda8:

How to open 3-4 strategies(EA) in 1 currency pair and 1 trade account?

Does anyone have  an idea on opening  4 strategies(EA)  for 1 currency pair simultaneously ?

Open Metatrader and sign in to your 1 trade account.

Open 4 charts of the same currency pair.

Apply a different EA to each chart.

Ensure each EA only manages its trades by the use of Magic Numbers.

If you want the EAs to "talk to each other", consider using Global Variables of the Client Terminal.

whroeder1
13640
whroeder1 2016.08.01 13:25  

sakda8: How to open 3-4 strategies(EA) in 1 currency pair and 1 trade account?

    if(OrdersTotal() == 0)
  1. Don't paste code
    Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. Not using magic numbers and using OrdersTotal directly and not a filtered OrderSelect loop means your code is incompatible with every EA (including itself on other charts and manual trading.) Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 forum
  3. Once you fix those you can either combine strategies into one EA on one chart or keep them separate and open multiple charts.
/
To add comments, please log in or register