Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1219
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
It looks like the terminal keeps pumping up the history - so the indicator keeps recalculating. Or another variant: you have a VERY large number of bars set in the terminal for display on the chart, and your computer has a VERY large number of bars on the chart.
Thanks for the help!
When you select a different date, the calculation takes place immediately. In the first test there was a gap in price, possibly missing some prices - this is most likely the problem.
Hello! There is an MT5 indicator "Grid Builder" which drawshorizontal lines in price increments. You can select e.g. 100p, 200p etc. And it builds a horizontal grid up and down with a given step. But it has one problem, for example, when I draw horizontal levels on timeframe H4 (I put horizontal lines from drawing tools in the terminal) and switch to any other timeframe, all my lines are removed. Only horizontal indicator levels remain. How can I correct this error in the code? To ensure that my horizontal levels are never deleted. Here is the indicator code (I wrote this question in another thread, but there is no answer yet)
Hello! There is an MT5 indicator "Grid Builder" which drawshorizontal lines in price increments. You can select e.g. 100p, 200p etc. And it builds a horizontal grid up and down with a given step. But it has one problem, for example, when I draw horizontal levels on timeframe H4 (I put horizontal lines from drawing tools in the terminal) and switch to any other timeframe, all my lines are removed. Only horizontal indicator levels remain. How can I correct this error in the code? To ensure that my horizontal levels are never deleted. Here is the code of indicator (I wrote this question in another topic, but there is no answer)
Do pay attention to this code:
In particular, read about ObjectsDeleteAll() - there the cause and answer for correction.
Pay attention to this code:
In particular read about ObjectsDeleteAll() - there's the reason and the answer on how to tweak it.
Thank you!!! Sorted it out, now it works without deletion.
Are SQLite database operations available from the tester? I mean adding and changing data.
Available. Just keep an eye on the location of the base. They are created in the same way as the files.
Available. Just keep an eye on the location of the base. They are created just like the files.
Here is my code. In the initialization it creates one record in the table. In the OnTick body it should immediately return an error, because I try to add a record with the same PRIMARY KEY, and after that the base closes immediately. But at the same time I should see at least that first record when I open it, but when I run it in the tester it's not there. And even the table is not created. If I just open it in the terminal, everything is normal. The first record is there.
Here is my code. In the initialization it creates one record in the table. In the OnTick body it should immediately return an error, because I try to add a record with the same PRIMARY KEY, and after that the base closes immediately. But at the same time I should see at least that first record when I open it, but when I run it in the tester it's not there. And even the table is not created. If I just open it in the terminal, everything is normal. The first record is there.
Once again I am convinced that the tester and the terminal itself are different hypostases...
It has long been recommended to add one day toTimeCurrent(). It's just that now, in response to your not quite correct code, the terminal is giving you advice.