- Hello and a warm welcome :)
- Check in case of an error in the program with _LastError and/or in the logs: Expert and Journal.
- Look at the example of the MQL4-Reference or here: https://docs.mql4.com/trading/ordersend
- MQL4 questions belong the MQL4 section below!
- docs.mql4.com
-
Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum?
Next time post in the correct place. The moderators will likely move this thread there soon. -
if( Fibonacci() == 0.78) { OrderSend(Symbol(), OP_BUYLIMIT, lot, Bid, 3, StopLoss, TakeProfit, NULL, 0, 0, Green);
You can't create pending orders at market prices.
Check your return codes, and report your errors. Don't look at GLE/LE unless you have an error. Don't just silence the compiler, it is trying to help you.
What are Function return values ? How do I use them ? - MQL4 programming forum
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles -
Doubles are rarely equal. Understand the links in:
The == operand. - MQL4 programming forum #2 2013.06.07
- Hello and a warm welcome :)
- Check in case of an error in the program with _LastError and/or in the logs: Expert and Journal.
- Look at the example of the MQL4-Reference or here: https://docs.mql4.com/trading/ordersend
- MQL4 questions belong the MQL4 section below!
Thank you.
The error is --> Fibonacci: failed to create => Fibo object! Error code = 4200 and I don't know what is that for.
It appears your Fibonacci() function detects when price is on those levels .
If yes ,then send OP_BUY on the first case ,and OP_SELL on the second case.(instant trade)
If not , then send the price at the fibonacci level instead of the Bid or Ask prices.(pending trade)
- www.mql5.com
I change the Bid & Ask, But the error is --> Fibonacci: failed to create => Fibo object! Error code = 4200 and I don't know what is that for.
I understand that you have a function which scans the Fibonacci Retracement object that was placed on the chart manually ?
try measuring with this if you know the fibonacci swing points
double WhereIsPriceInFibonacciRetracement(double past_swing_point, double recent_swing_point, double current_price) { double fib_where=0; double unit=MathAbs(past_swing_point-recent_swing_point)/100; if(unit>0) { fib_where=100-((current_price-past_swing_point)/unit); } return(fib_where); }
-
Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum?
Next time post in the correct place. The moderators will likely move this thread there soon. -
You can't create pending orders at market prices.
Check your return codes, and report your errors. Don't look at GLE/LE unless you have an error. Don't just silence the compiler, it is trying to help you.
What are Function return values ? How do I use them ? - MQL4 programming forum
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles -
Doubles are rarely equal. Understand the links in:
The == operand. - MQL4 programming forum #2 2013.06.07
Hi, sorry for post it in the wrong place.
Your tip help me but I still have problem.
The error is --> Fibonacci: failed to create => Fibo object! Error code = 4200 and I don't know what is that for.
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, I codding a custom fibo levels but when i set orders i do not take an answer.
The code is here:
I already define lot,...
Can anyone help ME?