Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 654
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
Can the EA look into the future?
I need the EA to take the last year's data, calculate the variance on it and then with the known variance value, have the EA test the last year in the tester.
Can. In the tester. Slapping a grail for the market and baiting rabbits?
And what will the EA do on current data?
In the next cycle I check 3 fractals and write them into the variable f
The condition is complete: if the upper fractal is above the MA and the next lower fractal is below the MA, then from this upper fractal I compare three fractals with any price of the current bar.
With a normal fractal, the algorithm works correctly. With iFreeNumFractals, some fractals do not seem to be visible. How do I know why?
It's easier for you to look here - you'll get faster results.
Can. In the tester. Slapping a grail for the market and baiting rabbits?
I start testing. I have zero - the number of the current bar. How do I view the data for the whole year, so I can calculate the variance and then run the EA from the beginning of the year?
And what will the EA do on the current data?
It is just for testing purposes.
I don't want to write the script and the Expert Advisor separately. The script should calculate the variance and then run the Expert Advisor in the tester.
I would like to fit everything into one program.
I want to fit everything in one program.
In that time, you can write a script and another script and an adviser and ... write
As for the essence of the question, you need to write an indicator that calculates the variance on the historical data, and once you have the variance values, you can use them in the EA, do not forget that the indicator helps to visualize the data
if you still stubbornly want to peep the EA into the historical data - the answer is no, in the tester is only available files in the folder tester, you can put in this folder files .hst and then you can read them with the EA from the tester
You might find it easier to look here, it will give faster results.
Ailuromancy would be a good idea.)
The question is not about the essence and correctness of the algorithm, but about the fact that two equal, in my opinion, strings
when put into the algorithm, produce different results. All variants with and without normalization have been tried.
If you have time, you can checkiFreeNumFractals indicatorhere
my craft hereit's that the two lines are equivalent, in my opinion.
either they're not equivalent or you're having trouble seeing
unpinf_up andi_i, and the otherf_up andi_i
or use your formula: f_up=iFractals(Symbol(),0,MODE_UPPER,i_i);
indicator and compare it with the formula f_up=NormalizeDouble(iCustom(Symbol(),0,"iFreeNumFractals",1,2,2,2,0,i_i),Digits);
you need to visualize the error
HH: you can run the debugger and see the values in the variables
you need to visualise the error
ZS: you can run the debugger and see the values of the variables
Visually, the fractals of the indicators coincide. Print by result, two out of five signals coincide and in three cases, one fractal iFreeNumFractals as if missing. I haven't used the debugger yet. What can I see in it?
I haven't used the debugger yet. What can you see in it?
2. debugger
https://www.mql5.com/ru/articles/654
If you still want the EA to look at historical data, the answer is no
Good afternoon!
Can you tell me if it is possible to create a script that, when dragged to a certain bar, would give its date? Is it possible to do this? If so, what function? Been reading the handbook and forums but haven't found anything so far. Give me an idea or direction. Thank you!