iStochastic returns ZERO value when a VARIABLE name is used for Slowing field instead a hard coded number
I am having problem with .
It returns ZERO value when the MODE_SIGNAL (value of 1) - is used
with SLOWING as a variable.
extern int stoch1k = 14 ;
extern int stoch1s = 3 ;
extern int stoch1d = 3 ;
double stoch1s = iStochastic (NULL,0, stoch1k,stoch1d,stoch1s, 0,0,1,0) ;
always return a ZERO value and not the real position of signal line when
variable is used in SLOWING filed (stoch1s).
But when I HARDCODE that parameter, instead of variable stocha1s (Slowing)
I put number 3 in the same statement it works fine like below :
double stoch1s = iStochastic (NULL,0, stoch1k,stoch1d,3, 0,0,1,0) ;
Can anyone guide me on this please.
I would like to use variable fields for diff values.
THIS SEEMS LIKE A METATRAER ERROR!!!!!!
Thanks in advance
Pipmonger
You are using the same variable (stoch1s) as an input and as the result. That will definitely mess it up.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am having problem with .
It returns ZERO value when the MODE_SIGNAL (value of 1) - is used
with SLOWING as a variable.
extern int stoch1k = 14 ;
extern int stoch1s = 3 ;
extern int stoch1d = 3 ;
double stoch1s = iStochastic (NULL,0, stoch1k,stoch1d,stoch1s, 0,0,1,0) ;
always return a ZERO value and not the real position of signal line when
variable is used in SLOWING filed (stoch1s).
But when I HARDCODE that parameter, instead of variable stocha1s (Slowing)
I put number 3 in the same statement it works fine like below :
double stoch1s = iStochastic (NULL,0, stoch1k,stoch1d,3, 0,0,1,0) ;
Can anyone guide me on this please.
I would like to use variable fields for diff values.
THIS SEEMS LIKE A METATRAER ERROR!!!!!!
Thanks in advance
Pipmonger