I'm getting this error with this piece of code:
But I don't see the mistake, anyone can help?
You're using Digits as a function but without the parameter parentheses. You can use either Digits() or _Digits to get the number of decimal digits determining the accuracy of price of the current chart symbol.
Of course you can't. Make your code readable.
Are your books one column but two feet wide? No because that is unreadable. They are 6 inches, sometimes two columns, so you can read it easily. So should be your code. I'm not going to go scrolling (or moving my eyes) back and forth trying to read it. Don't copy and paste code, write self documenting code.
double OP = OrderGetDouble(ORDER_PRICE_OPEN); double TP = OrderGetDouble(ORDER_TP); double SL = OP-(TP-OP)*(AutoStopLoss/100); double StopLoss=NormalizeDouble(SL,Digits);With that you know the problem is only the last line and can see the column with the error.
Of course you can't. Make your code readable.
Are your books one column but two feet wide? No because that is unreadable. They are 6 inches, sometimes two columns, so you can read it easily. So should be your code. I'm not going to go scrolling (or moving my eyes) back and forth trying to read it. Don't copy and paste code, write self documenting code.
With that you know the problem is only the last line and can see the column with the error.please I'm getting this error in my code yet I can't find where the error is from.
{
double biggerMa = iMA(_Symbol,PERIOD_CURRENT,50,0,MODE_SMA,0,1);
double smallerMa = iMA(_Symbol,PERIOD_CURRENT,20,0,MODE_EMA,0,1);
if smallerMa > biggerMa {Print(OrderOpenPrice)}
else
{Print(OrderClose < smallerMa)};
if smallerMa < biggerMa {Print(OrderOpenPrice)}
else
{Print(OrderClose > smallerMa)};
double OrderOpenPrice();
if(OrderSelect(10, SELECT_BY_POS)==true)
Print("open price for the order 10 ",OrderOpenPrice());
else
Print("OrderSelect returned the error of ",GetLastError());
please I'm getting this error in my code yet I can't find where the error is from.
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the source file. If you can figure out what is wrong with line 43. Post your code.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problem
We can't see your broken code.
Fix your broken code.
i have 2 error and 2 warning in my code that i don't know how to fix it after different approch (using different fonction ...)
can someone help ?
2 erreurs
',' - open parenthesis expected EA-time-Bomb.mq5 43 47
here is the line 43: sl = NormalizeDouble(price - StopLoss*Point, precision);
',' - open parenthesis expected EA-time-Bomb.mq5 44 49
line 44: tp = NormalizeDouble(price + TakeProfit*Point, precision);
2 warnings
return value of 'OrderSend' should be checked EA-time-Bomb.mq5 58 4
line 58: OrderSend(request, result);
variable 'ticket' not used EA-time-Bomb.mq5 37 8
line 37: int ticket;
Always show all relevant code. Also show the error log and identify the lines with the errors.
However, if your code was generated with ChatGPT, then we can't help you.
Because ChatGPT produces horrible code, mixing MQL4 and MQL5 and mixing EA with Indicator code. The result is a mess that cannot be fixed.
Also, since you don't know how code, you will not understand the advice given, nor will you know how to apply it.
So, either learn to code or hire a "human" to code it for you.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I'm getting this error with this piece of code:
But I don't see the mistake, anyone can help?