Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1238
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
And the first part of the line and the question as a whole?
Well, we're programmers. Full and empty glasses on the bedside table and all that...
However, I wrote three possible scenarios and what happens during them in the main indicator calculation cycle:
Forum on trading, automated trading systems and strategy testing
FAQ from Beginners MQL5 MT5 MetaTrader 5
Artyom Trishkin, 2020.08.06 15:17
rates_total - prev_calculates is a very efficient algorithm.
The fourth situation - below zero - is quite possible. But it simply won't be processed in the loop calculated for(int i=limit; i>=0; i--) ...
Few people just want to think about it and usually just copy and paste. Correspondingly, the first launch and history change are when limit>1, so we should write about the first launch in such a situation and not check prev_calculated for zero.
Alexei, I'm interested )))) But I don't see the error! And there's no shame in learning. And if someone is smarter or more experienced, I don't see anything wrong with that either.
I have just run the indicator with a large input parameter for the size of a candle. I want to have smaller candlesticks.
All prices for the candlesticks are calculated and initialed from indicator buffers. All is correct. But there was no rendering. I don't understand why.
I suggested you
......... to start by selecting bars after an N number, or at least one last closed bar. Have you tried it? Does it render?
And once again I suggest you start by selecting at least one last closed bar. When you get a positive result, only then proceed to the calculations and conditions.
I have suggested to you
and I suggest you start by singling out at least one last closed bar. When you get a positive result, only then move on to the calculations and conditions.
I'm afraid I don't understand you... Which bar do you propose to allocate? The one I formed? Or on the chart?
If it is on the chart, I don't need them a priori. The indicator is considered the same on any timeframe.
The previous calculation was performed on H1, and now it is on H4. The result is the same.
I'm afraid I don't understand you... Which bar do you propose to highlight? The one that has formed on me? Or on the chart?
If it is on the chart, I don't need them a priori. The indicator is considered the same on any timeframe.
The previous calculation was performed on H1, and now it is on H4. The result is the same.
Alexey told you that first you should at least make your indicator draw candles. As they are. At least on the current bar. If you manage to do it, consider that the first step towards the understanding has passed. But it is desirable not to try and find it by trying different parameters, but with your own mind.
What does this have to do with a priori? You need it very much - if you cannot draw a candle with only four values.
Alexey told you that you should first make your indicator at least just draw candles. As they are. At least on the current bar. If you manage to do it, consider that the first step to understanding has passed. But it is desirable not to try and find it by trying different parameters, but with your own mind.
What does this have to do with "a priori"? You really need it since you cannot draw a candle with only four values.
Got it. Will do. ...
Hello. I have decided to try to master both the mql5 language and the mt5 platform. I have a question about the tester. I have a question about quotes. I have put the audcad pair on the platform from Weltrade. I have a small informational panel in my Expert Advisor. I see in visualization mode that spreads are not correct (very small, similar to eurusd spread). I contacted the technical support of the company (Veltrade) and asked if there are different spreads for mt4 and mt5. They answered they are the same. What should I do if there is no correspondence in the tester? I tried to optimize it using the genetic code. My CPU load was 100%, and after a few minutes of work my computer crashed (processor was a phenom II x4 955 (4 cores, 3.2 GHz), cooler was on spare). After two times I decided not to risk any more. How should I understand such a situation? Then, when testing without visualization there is no deal information at all, only a chart. Is it true or am I doing something wrong? The informativeness is rather poor in visualization mode. In fact, I'm most worried about the inconsistency of spreads. In short, my first impression is of complete disappointment. But I discount it to the fact that I haven't figured it out yet.
Set testing based on real ticks. Then all doubts about the validity of the spread will disappear.
Set testing based on real ticks. Then all doubts about the validity of the spread will disappear.
Thank you, I will try it now. What is your advice on the optimization. I am more interested in the speed. I may correct the quality later, when testing.
P.S. I have done as you advised, spreads are the same. I have purposefully checked the account type. It is specified to spread on audcad 4.1 (floating). On the same account (demo chart) it is 4.7 (floating). In the tester, mt5, maximum 2.8 (floating to a smaller side).
Thank you, I'll give it a try. What's your advice on optimisation? I'm more interested in speed. Quality can be adjusted later, when testing.
I can't give you any advice. I don't use optimisation. I think it is just a quack.