Errors, bugs, questions - page 1394
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
OK, here is the code
I'm not really good with indicators, but this line is questionable
Return value
The number of copied array elements or -1 in case of error.
If only 1 element is copied, the function will return its value. If there are no elements or if there are more than 1, the function will return EMPTY_VALUE.
Maybe it would be better?
OK, here's the code
Corrected the line and it seems to be working ))))
Corrected the line and it seemed to work ))))
I ended up tweaking it that way myself. But I wonder why they changed the logic (in MT4 the scale was good without multiplication by Point). And why is there no possibility to make buffers without drawing (c DRAW_NONE) have no effect on chart scale.
I'm not really good at indicators, but this line is questionable
1. Returned valueNumber of copied array elements or -1 in case of error.
2. If 1 element is copied, the function will return its value
Statements 1 and 2 are in contradiction don't you think?
No )))
1 It can be from 1 to the limit
2 only if 1 element is copied If 2 or more, it returns EMPTY_VALUE
In the help it says
Return value
Number of copied array elements or -1 in case of error. Under which condition will 1 element be copied ?
I ended up tweaking it that way myself. But I wonder why they changed the logic (in MT4 the scale was good without multiplication by Point). And why is there no possibility for the buffers without drawing (c DRAW_NONE) not to affect the chart scale.
You don't go through the whole indicator buffer. Writing
is not correct at all. You have variables rates_total, prev_calculated and indicator offset iStdDev. On the first pass you need to fill in the empty indices:
and then go through the remaining indices of the indicator buffer (to go through means to assign values).
You do not go through the entire indicator buffer. The entry
is not correct at all. You have variables rates_total, prev_calculated and indicator offset iStdDev. On the first pass you need to fill in the empty indices:
and then go through the remaining indices of the indicator buffer (to go through means to assign values).
In the original version, I had a function that fills everything with zeros of the type
This does not matter in this case. If there were empty values, they would be at the beginning of the chart and they would not affect the scale of the window at the very end. This is not the case here, the comrade above has already figured it out.
I ended up tweaking it that way myself. But I wonder why they changed the logic (in MT4 the scale was good without multiplication by Point). And why there is no possibility for buffers without drawing (c DRAW_NONE) not to affect the chart scale.
Here's how to try it:
PLOT_EMPTY_VALUE >>>No )))
Under what condition will 1 element be copied ?
Yes )))
Yes )))