Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 617

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
If you only use the code in a real or demo account, then this is more convenient. However, in the strategy tester, problems may arise when using it.
For instance, like what? Why I don't have any problems anywhere, but you "may have problems".
There's a piece I don't understand.
I get a piece of crap like 5e-005.0 in the printer.
PriceOld value
When I add it all up, why does it look like this when I subtract it?The most confusing thing is that it happens on this particular section of the story, on others it's normal.
Tried different variants. The result is the same. How this can be so is absolutely unclear. At some moment the iLowest(NULL,0,MODE_LOW,NumberLastBar_beg,NumberLastBar_end); suddenly starts calculating a larger bar range. Please advise who understands, my head is broken. Thanks.
4:08:36 Time+iLowest test started14:08:36 2004.09.29 00:00 Time+iLowest EURUSD,H1: NumberLastBar_beg= 24 NumberLastBar_end= 0
14:08:36 2004.09.29 00:00 Time+iLowest EURUSD,H1: i=18
14:08:36 2004.09.29 00:00 Time+iLowest EURUSD,H1: time_check_low_day=06:00
14:08:39 2004.09.29 01:00 Time+iLowest EURUSD,H1: NumberLastBar_beg= 25 NumberLastBar_end= 1
14:08:39 2004.09.29 01:00 Time+iLowest EURUSD,H1: i=19
14:08:39 2004.09.29 01:00 Time+iLowest EURUSD,H1: time_check_low_day=06:00
14:08:39 2004.09.29 02:00 Time+iLowest EURUSD,H1: NumberLastBar_beg= 26 NumberLastBar_end= 2
14:08:39 2004.09.29 02:00 Time+iLowest EURUSD,H1: i=20
14:08:39 2004.09.29 02:00 Time+iLowest EURUSD,H1: time_check_low_day=06:00
14:08:40 2004.09.29 03:00 Time+iLowest EURUSD,H1: NumberLastBar_beg= 27 NumberLastBar_end= 3
14:08:40 2004.09.29 03:00 Time+iLowest EURUSD,H1: i=21
14:08:40 2004.09.29 03:00 Time+iLowest EURUSD,H1: time_check_low_day=06:00
14:08:41 2004.09.29 04:00 Time+iLowest EURUSD,H1: NumberLastBar_beg= 28 NumberLastBar_end= 4
14:08:41 2004.09.29 04:00 Time+iLowest EURUSD,H1: i=31
14:08:41 2004.09.29 04:00 Time+iLowest EURUSD,H1: time_check_low_day=21:00
Code:
Pay attention to these lines.
These lines should be swapped.
int i=iLowest(NULL,0,MODE_LOW,NumberLastBar_beg,NumberLastBar_end); // исправлять не стал datetime Time_Check_Low_Day=Time[i];
2. NumberLastBar_beg is the number of yesterday's bar, while this value can be replaced with the number of bars to be searched for.
3. When you paste the code, find the SRC button in the toolbar of the text entry window.
Such as which ones? Why is it that I have no problem with it anywhere, but you "may" have a problem with it.
I'm a bit pensive. I don't want to lay out the code of existing indicator, where it can be clearly seen (if not applying a separate condition for the tester). As well as to think, what to prescribe on its basis separate for clarity.
However, if you insist - of course, I will most likely begin to think about what can replace the complicated "stuffing" he has in order to prescribe something else there.Read the iLowest() help carefully. What is the number of elements to search for? And what does it equal?
Pay attention to these lines
It is better to swap these lines.
2. NumberLastBar_beg is the number of the first bar of yesterday, and you put this value instead of the number of bars you want to search for.
The i variable is here purely for control purposes, for Print. I made a mistake when adjusting the bars. Thanks for the tip!