Ok....I want to make my order execution bulletproof.
I want to be sure that my EA executed all 4 trades.
I want this to keep firing orders untill all 4 is out there!
I coded something like this;
this is at top of code.....
bool TRADE1B=true;
bool TRADE2S=true;
bool TRADE3S=true;
bool TRADE4B=true;
Than after int start() i call function TradeBSSB();
if (( blahblahblahhh=blahblahblahhh )) {TRADE_BSSB();} //this will happen only when there are no trades at all.....
so.....if TRADE_BSSB() puts only one trade due to some broker issue, this function will not be called until num of trades are zero!!!
Than after int start() next function is;
//+------------------------------------------------------------------+
int TRADE_BSSB()
{
if(TRADE1B==TRUE)
{
OrderSend(Symbol_1,OP_BUYSTOP, S1_Lots, LongEntryLevel1, 2, NULL, NULL, "TRADE_1B", magic, NULL, LimeGreen); TRADE1B=false;
}
if(TRADE2S==TRUE)
{
OrderSend(Symbol_2,OP_SELLSTOP, S2_Lots, ShortEntryLevel2, 2, NULL, NULL, "TRADE_2S", magic, NULL, FireBrick); TRADE2S=false;
}
if(TRADE3S==TRUE)
{
OrderSend(Symbol_3,OP_SELLSTOP, S3_Lots, ShortEntryLevel3, 2, NULL, NULL, "TRADE_3S", magic, NULL, FireBrick); TRADE3S=false;
}
if(TRADE4B==TRUE)
{
OrderSend(Symbol_4,OP_BUYSTOP, S4_Lots, LongEntryLevel4, 2, NULL, NULL, "TRADE_4B", magic, NULL, LimeGreen); TRADE4B=false;
}
if (OrdersTotal()<4) {TRADE_BSSB();} //Will this part of code loop through TRADE_BSSB() untill all orders are traded??????
return(0);
}
Will this work!??? Bassicaly I want the TRADE_BSSB() function
to loop until all trades are traded!
Thanks
I want to be sure that my EA executed all 4 trades.
I want this to keep firing orders untill all 4 is out there!
I coded something like this;
this is at top of code.....
bool TRADE1B=true;
bool TRADE2S=true;
bool TRADE3S=true;
bool TRADE4B=true;
Than after int start() i call function TradeBSSB();
if (( blahblahblahhh=blahblahblahhh )) {TRADE_BSSB();} //this will happen only when there are no trades at all.....
so.....if TRADE_BSSB() puts only one trade due to some broker issue, this function will not be called until num of trades are zero!!!
Than after int start() next function is;
//+------------------------------------------------------------------+
int TRADE_BSSB()
{
if(TRADE1B==TRUE)
{
OrderSend(Symbol_1,OP_BUYSTOP, S1_Lots, LongEntryLevel1, 2, NULL, NULL, "TRADE_1B", magic, NULL, LimeGreen); TRADE1B=false;
}
if(TRADE2S==TRUE)
{
OrderSend(Symbol_2,OP_SELLSTOP, S2_Lots, ShortEntryLevel2, 2, NULL, NULL, "TRADE_2S", magic, NULL, FireBrick); TRADE2S=false;
}
if(TRADE3S==TRUE)
{
OrderSend(Symbol_3,OP_SELLSTOP, S3_Lots, ShortEntryLevel3, 2, NULL, NULL, "TRADE_3S", magic, NULL, FireBrick); TRADE3S=false;
}
if(TRADE4B==TRUE)
{
OrderSend(Symbol_4,OP_BUYSTOP, S4_Lots, LongEntryLevel4, 2, NULL, NULL, "TRADE_4B", magic, NULL, LimeGreen); TRADE4B=false;
}
if (OrdersTotal()<4) {TRADE_BSSB();} //Will this part of code loop through TRADE_BSSB() untill all orders are traded??????
return(0);
}
Will this work!??? Bassicaly I want the TRADE_BSSB() function
to loop until all trades are traded!
Thanks
forexflash