
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
I attached the ea to 4 charts. I verified the values when I started having problems. The verified values are correct, but the ordermodify function does not actuate (Mod=0) and returns error 130 invalid stops.
Please review.
Thank you.
Rudy
if((typeb0s1==1 && SL>Bid+(Point*TrailingStop) && ticket!=0 && Symb==OrderSymbol()))
{
SL=0;
minstop=MarketInfo(Symb,MODE_STOPLEVEL);
if(TrailingStop<minstop) TrailingStop=minstop;
SL=NormalizeDouble(Bid+Point*TrailingStop,Digits)*tsm;
Alert("ticket ",OrderSymbol()," Symbol ",Symb);
Alert(ticket," SL-",SL," OSL ",OrderStopLoss());
Alert("price ",OrderOpenPrice());
Alert("TP ",TP);
Alert("min stop ",MarketInfo(Symb,MODE_STOPLEVEL));
Mod=OrderModify(ticket,OrderOpenPrice(),SL,TP,0,CLR_NONE);
err=GetLastError();
Alert("err ",err);
Alert("mod ",Mod);
Alert(ticket," sell SL-",SL," OSL ",OrderStopLoss());
Alert("type ",OrderType()," Sell Order ",ticket," - Trailing stop modified-",OrderStopLoss());
}