Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 530
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
How to record, Alexey answered. It would be great if he could write the code, as he sees it, if he has time and wish).
Alexey hasn't answered anything yet, I don't understand how to write the condition"first bear, second bull, third bear" in the loop
PS. By the way, is it an indicator or an EA?
Probably an indicator, can an EA do the whole story without a tester?
Probably an indicator, is it possible to go through all the history with an EA without a tester?
It makes no difference what you pass through, it all depends on what you need to do. You can also go through the script
P.S. You can forge this indicator, and on the basis of it to do what you need, there's 90% of the code is ready
It makes no difference what you do, it all depends on what you want to do. You can also go through the script
Now the goal is to find out the longest sequence, the result will depend on further implementation. Maybe count how many sequences of N candles with what periodicity, or...
P.S. You can dig this indicator and make what you need on its basis, the code is 90% ready there.
mql5, not even opened yet. But I found one on mql4 from how to make a multidirectional sequence here?
mql5 yet, haven't even opened it.
And it's time to open it and close mt4 and forget about it.
Here is mt4, find the difference in the code from mt5
And it's time to open, and to close mt4 and forget about it.
Here is mt4, find the difference in the code from mt5
When one direction is clear, but how do you do multi-directional ones?
When in one direction I understand, but how do I make multidirectional ones?
the same way, but set the flag differently, and add a global variable to write the maximum value
the same, but to set the flag differently, and add a global variable to write the maximum value
I'm asking if this is wrong, how do you want the sequence to be tracked?
I'm asking about this, it's not right, how do you trace the sequence?
You compare the next bar, and if the sequence is broken, reset the flag and record how many were correct, and go on in the loop.
It is enough to find out that the bar is bullish, and the next one is bearish. If the next one is the same as the previous one, then you write down the value and reset the flag. And so on to the end