don't trade if spread is high...pls assistance
Spread = MarketInfo(Symbol(),MODE_SPREAD);
if(ma=="BUY" && rsi=="BUY" && Spread<=MaximumSpread && ... && ...)
OpenBuy();
...
...
...
chudanever: this code is not working
|
|
Pls I need assistance on this code,if spread high is...return...No trade..But the problem is
return (0) is added on the EA code it will not open any order again,but is I remove it
Will start working again without regulating the high spread,this is the code..Any corrects pls.thanks
double Spread = Ask-Bid;
if(Spread >= 5 * digit (5digit broker calculated here)
{ return(0);
}
double Spread=MarketInfo(Symbol(),MODE_SPREAD);
Print("Spread "+DoubleToStr(Spread,Digits));
if(Spread>5)
{
// Whatever code you choose for spread lower than 5
}
Thanks you all your corrections and assistance,you guys are really helpful,I will try it @ Donald Gibson though I latter get spread info but I think it more
Clean here..I will try it later thanks all again
Thanks whroeder for the link |
Pls I need assistance on this code,if spread high is...return...No trade..But the problem is
return (0) is added on the EA code it will not open any order again,but is I remove it
Will start working again without regulating the high spread,this is the code..Any corrects pls.thanks
double Spread = Ask-Bid;
if(Spread >= 5 * digit (5digit broker calculated here)
{ return(0);
}