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
Hi to all
in my EA slippage and spread filter doesn't work on real account . please guide me
Code lines related to slippage
extern int Slippage_pip=100;
//int Slippage_pip;
double dig;
datetime time_start;
int curr_band=0;
datetime Prevtime;
double PrevSellPrice, PrevBuyPrice;
datetime Indi_Count_Time;
point=Point;
dig=1;
if(Digits==5 || Digits==3)
{
Takeprofit=Takeprofit_pip*10;
Stoploss=Stoploss_pip*10;
// Slippage_pip=Slippage_pip*10;
point=Point*10;
dig=10;
}
ticket = OrderSend(Symbol(),OP_SELL,Lots,NormalizeDouble(entry,Digits),Slippage_pip,st,tp,DoubleToStr(num,Digits),magic,0,Red);
lasterror=GetLastError();
if (ticket<0) Print("2Ticket : ",ticket," Error :",lasterror," ",Symbol()," sell Lots: ",Lots," ask: ",entry," st: ",st," Tp: ",tp," num: ",DoubleToStr(num,0));
Sleep(100);
ticket = OrderSend(Symbol(),OP_BUY,Lots,NormalizeDouble(entry,Digits),Slippage_pip,st,tp,DoubleToStr(num,Digits),magic,0,Blue);
lasterror=GetLastError();
// Print(num," ",Lots);
if (ticket<0) Print("2Ticket : ",ticket," Error :",lasterror," ",Symbol()," Buy Lots: ",Lots," ask: ",entry," st: ",st," Tp: ",tp," num: ",DoubleToStr(num,0));
Sleep(100);