-
Play videoPlease edit your post.
For large amounts of code, attach it Ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Bid+(StopLoss*Point),Bid-(TakeProfit*Point),"Sell",0,0,Red);
Check your return codes and find out why. What are Function return values ? How do I use them ? - MQL4 forum and Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles- Your stops are 20 points. That is 2 pips on a 5 digit broker but 20 pips on 4. You are not
adjusting
SL, TP, and slippage; for 4/5 digit brokers
and for JPY pairs.
double pip = StringFind(_Symbol,"JPY") < 0 ? 0.01 : 0.0001;
int pipsToPoints = int(pip / _Point);
int pipDigits = (int)MathLog10(pipsToPoints);
int slippage = 3 * pipsToPoints; - You can't move stops closer to the market than MODE_STOPLEVEL. Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial
To whroeder1
Thanks again and again.And thank you for telling me the format to wright.
In some cases , I intend to enter The value of SL and TP manually. Thank you for your advise.
While referring the forum taught,I gonna find out the cause.
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,
I asked in this forum before, and I had my EA problem solved.
But later, EA ordered sell only when I operated EA.
Indicator ↓
EA ↓
EA's iCustom call the Parameter "GrandOrder" and ordersend runs. (GrandOrder=1 …buy ,GrandOrder=-1 …sell )
Selling orders are executed collectely.
Can someone please tell me the reason why not Buy order? Thank you.