Hi, Please could someone help me. I'm using an EA and it won't place a trade if there is a reqoute. How do I get it to accept the reqoute?
Why do indicators not work/work? Why is Forex not truly random? 129 replies
do automated trading systems work or... 21 replies
MIG makes constant reqoutes 1 reply
MIG making reqoutes again 2 replies
How Do Forex Futures Work? 1 reply
DislikedHi, Please could someone help me. I'm using an EA and it won't place a trade if there is a reqoute. How do I get it to accept the reqoute?Ignored
void SendOrder(){
int ticket=0;
int err=0;
int c = 0;
int Attempts = 100;
for(c = Attempts ; c >= 0; c--){
HealthCheck(); // check to make sure EA is running correctly
RefreshRates();
ticket=OrderSend(O_Symbol,O_Type,O_Lots,O_OpenPrice,O_Slippage,O_StopLoss,O_TakeProfit,O_String,O_Magic,O_Exp,O_Color);
if (ticket > 0) {Print(" Order Symbol : "O_Symbol," Order Type : "O_Type," Lots : "O_Lots," Open Price : "O_OpenPrice," Slippage : "O_Slippage," Stop Loss : "O_StopLoss," Take Profit : "O_TakeProfit," "O_String," Order Magic : "O_Magic," Order Exp : "O_Exp," Order Color : "O_Color," Open Time : "OrderOpenTime()," EA Took ",GetTickCount() - TickStart," milliseconds" );break;}
err=GetLastError();
if(err==0 || err==2 || err==4 ||err==6 || err==8 || err==9 || err==64 || err==128 || err==132 || err==133 || err==137 || err==139 || err==141 || err==146){ //Sleep and retry errors
Print("....................... Sleep And Retry Error Code= ", err," "ErrorDescription(err));
Sleep(10);
continue;
}
if(err==135 || err==136 || err== 138){ // price change errors
Print ("..................Invalid Price " O_String + " ..............");
WindowScreenShot("S_REQUOTE_"+Month()+"_D"+Day()+"_H"+Hour()+"_M"+Minute()+"_S"+Seconds()+".gif",1440,900);
Print("....................... Price Error Code= ", err," "ErrorDescription(err));
start();//restart and make sure that new price meets our entry criteria
break;
}
else{ // other errors
Print(".......................Error Code= ", err," "ErrorDescription(err));
break;
}
}
}
Dislikedslippage helps avoid a requote.
If you do get a requote with an EA, just wait for the next signal. No need to chast after the market.Ignored