|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
help me fix my ea
Hello
the idea is this : only 1 trade per symbol allowed. i use to do it like this: int total = OrdersTotal(); if(total != 0 ) { return(0); // dont trade } else trade but the problem is that i have other open position from manual trades\other EA i need that the ea will open only 1 trade per symbol. please help, thanks! Last edited by pooshkin : 12-11-2006 at 03:32 PM. |
|
|||
|
ok, i have 666 as magic number to trades that open in the ea
is this code any good? Code:
if(OrderSelect(ticket, SELECT_BY_TICKET) == true) // open trades
{
if(OrderMagicNumber() == 666){
return(0);} // no trades
}
else
trade
|
|
|||
|
Again, do a search, I am sure you will find Coder's Guru's lessons. There is nothing better than learning how to do it right.
I am providing you with a subroutine that will count the number of trades for a given symbol and a given magicnumber. You can call that to find the number of trades, and if it is equal to or less than a certain number, you can place your trades. PHP Code:
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|