Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1403
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
Is it really that difficult to try it yourself?
Would it really be so hard to try it yourself?
I tried it, it works.
Because of the internal F1 help about "switch", such a question arose, because only Print is specified there. And I noticed earlier thatComment() in void OnTick() slows down code execution greatly.
Can anyone help me on how I can do this?
Make sure you are using your kduarte login and that your MQL5 account password is no longer than 10 characters.
You do not control the ORDERS in any way, you check the number and type of the POSITION in the code. Besides - you incorrectly work with POSITIONS (error to use 'PositionSelect(_Symbol)' if your account type is hedging). Your algorithm has serious design errors.
What You Should Do:
1. Work EXCLUSIVELY at the time of the birth of a new bar. If there is no new bar - do nothing, do not make unnecessary movements.
2. This item will be disclosed after item 1 is completed.
Hello Vladimir,
Again thanks alot for the hints dropped. It took me awhile to figure things out.
What I changed based on your tips:
- Changed the logic for opening and closing to a hedging version.
- I work now with the birth of a new bar for some calculations/order placement.
Since these changes are applied, orders are now only opened and closed only once. But now I have a problem with backtesting. I get an error that the array in line 121 is out of range. Can you point me in the right direction? I tried using an array of the double type for closing prices and copyClose, but still get the error then.
Also excited for item 2 :)
Code so far:
In yellow I highlighted line 121.
Check the result of the operation:
Check the result of the operation:
How to change Risk in percent to Lot size or fix lot in EA breakdown Experts: breakdown.
Good afternoon, experts, please help me to understand what the error is. Connected the indicator from trading view via pinconnector to mt5 demo account. I am not getting any signals. I attached a screenshot of the log screen