GumRai:
And it is bad. I propose many times to add finction like OrdersTotal(int type=-1,int magic=-1)
There is no standard function called TotalOrdersCount()
Loop through the orders and check OrderMagicNumber(), if it is 0, then the trade was placed manually. This will, of course only work if all trades placed by EAs use a magic number that !=0
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I want my EA to only place up to 3 trades, and only once 1 manual trade is already open.
Currently I have set up an external variable of TotalTrades and set this to 3. This is limiting the max trades to 3. I can't seem to work out how to set the requirement of 1 trade already open though.
I effectively want 1< & <TotalTrades but can't seem to get his working.
Any help would be greatly appreciated.
My current if statement is as below:
if( TotalOrdersCount()<TotalTrades ) {