double s1=vol_t[i+1]; double s3=vol_t[i+3];
Initialization of Variables - Variables - Language Basics - MQL4 Reference
How should we know? You didn't show the code that initializes vol_t[].
Hi whroeder, thank you for your reply.
vol_t[] is defined as double vol_t[]; and not initialized at any particular value (as far as I understand).
I'm attaching the full code of the indicator. I don't understand how the initial values are calculated.
And how I can add this to an EA without using iCustom()? I would like to know how to code the logic behind of this.
Regards,
PS
Pedro Severin: not initialized at any particular value (as far as I understand). I don't understand how the initial values are calculated.
I already answered that question by quoting the documentation.
I already answered that question by quoting the documentation.
Oh okay. Then would you mind explaining me how this indicator works?
I mean, how can I add this logic to an EA without using iCustom()? When I start the part that should do the calculations, I'm getting something different and it varies from time to time when I run the backtest.
-
Don't try do that. There are no buffers, no IndicatorCounted() or
prev_calculated. No way to know if older bars have changed or been added
(history update.)
Just get the value(s) of the indicator(s) into the EA (using iCustom) and do what you want with it.
You should encapsulate your iCustom calls to make your code self-documenting.
Detailed explanation of iCustom - MQL4 and MetaTrader 4 - MQL4 programming forum - Why did you start a new post when you already had one about this indicator already open? Don't double post!
General rules and best pratices of the Forum. - General - MQL5 programming forum
-
Don't try do that. There are no buffers, no IndicatorCounted() or
prev_calculated. No way to know if older bars have changed or been added
(history update.)
Just get the value(s) of the indicator(s) into the EA (using iCustom) and do what you want with it.
You should encapsulate your iCustom calls to make your code self-documenting.
Detailed explanation of iCustom - MQL4 and MetaTrader 4 - MQL4 programming forum - Why did you start a new post when you already had one about this indicator already open? Don't double post!
General rules and best pratices of the Forum. - General - MQL5 programming forum
Your question in #2 is about an EA. What part of "There are no IndicatorCounted()" is unclear?
IndicatorCounted - Custom Indicators - MQL4 Reference
Hi!
I'm trying to understand how the s1 and s3 values are calculated in this for loop. How the initial values are calculated? Shouldn't be 0?
This is a for loop in the Damiani Volatmeter indicator.
Hi jus I want to know how I ask something or open a new subject in the forum?
I did not understand anything you said, sorry.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi!
I'm trying to understand how the s1 and s3 values are calculated in this for loop. How the initial values are calculated? Shouldn't be 0?
This is a for loop in the Damiani Volatmeter indicator.