Hello, anyone can check for me why I run this EA on strategy tester no problem, but once go for live, there is failed [Invalid parameters] for modification? Thanks
Files:
po_ea.mq4
3 kb
- iBand reading?
- how to backtest timebased EA
- Modified EA
klhh:
Hello, anyone can check for me why I run this EA on strategy tester no problem, but once go for live, there is failed [Invalid parameters] for modification? Thanks
Hello, anyone can check for me why I run this EA on strategy tester no problem, but once go for live, there is failed [Invalid parameters] for modification? Thanks
Your OrderModify() calls are wrong . . . expiration cannot equal CLR_NONE
OrderModify( OrderTicket(), (Bid-distance-1)*Point, Bid, 0, CLR_NONE);
|
- If you write self-documenting code, you wouldn't have made such an error
#define NO_TP 0 #define NO_SL 0 #define NO_EXPIRATION 0 double OOP = (Bid - distance - 1) * Point, ISL = Bid; if (!OrderModify(OrderTicket(), oop, ISL, NO_TP, NO_EXPIRATION, CLR_NONE) ) Alert(... GetLastError());
- Always test your return codes, so you find out WHY is doesn't work What are Function return values ? How do I use them ? - MQL4 forum
- Bid = 1.2345, distance = 10, Point = 0.0001 so OOP = 0.0010 I don't think it will ever get that low.
- Not adjusting for 4/5 digit brokers.
thanks all of u, i have solved it...
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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