Suddenly I got another question in mind. That is, how the MA which I'm using in the Stochastic indicator window, calculating it's value because there are two period:
Suddenly I got another question in mind. That is, how the MA which I'm using in the Stochastic indicator window, calculating it's value because there are two period:
%K Period [Main Value]
%D Period [Signal Value]
i think u r mistaken & u mean main line & signal line
You didn't "put '0' in the Array" you pust the stochastic signal in the array and selected the zero'th element.
"nothing is showing up" means nothing."Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here.
Post ALL the code, like your array definitions, resizing, etc.
You didn't "put '0' in the Array" you pust the stochastic signal in the array and selected the zero'th element.
"nothing is showing up" means nothing."Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here.
Post ALL the code, like your array definitions, resizing, etc.
int start()
{
sLog_Start = "START - start() function----------------------------------";
double Signal_Stochastic[];
sLog_Start = sLog_Start + sNL + " Start - Set and Get MA values";
ArraySetAsSeries(Signal_Stochastic, true);
for( i=0; i<Bars; i++)
Signal_Stochastic[i] = iStochastic(NULL,0,75,5,5,MODE_SMA,0,MODE_SIGNAL,i);
double MA_Signal_Sto = iMAOnArray(Signal_Stochastic, 0,20,0,MODE_SMA,0);
sLog_Start = sLog_Start + sNL + " Signal Sto's Value=" + Signal_Stochastic[0];
sLog_Start = sLog_Start + sNL + " MA_Signal_Sto's Value=" + MA_Signal_Sto;
if (Signal_Stochastic>MA_Signal_Sto)
{
Buy;
}
if (Signal_Stochastic<MA_Signal_Sto)
{
Sell;
}
return (0);
}
Here I am really confused with the Array things. So pardon my ignorance.
My sole aim is comparing the Two [Signal_Stochastic & MA_Signal_Sto]. The sequence of functions will be exactly the same as showed above. [I just avoided the Buying/Selling functions to avoid lengthy code]
so whats the big deal
so whats the big deal
Thanks a lot!
Suddenly I got another question in mind. That is, how the MA which I'm using in the Stochastic indicator window, calculating it's value because there are two period:
%K Period [Main Value]
%D Period [Signal Value]
Here according to this line:
MA is getting value ONLY from %D period?
Or it is getting value from both periods?
And would please explain a bit why the line is used?
Thanks
Thanks a lot!
Suddenly I got another question in mind. That is, how the MA which I'm using in the Stochastic indicator window, calculating it's value because there are two period:
%K Period [Main Value]
%D Period [Signal Value]
i think u r mistaken & u mean main line & signal line
Here according to this line:
MA is getting value ONLY from %D period?
again not %D Period but signal line
Or it is getting value from both periods?
no only the signal line
And would please explain a bit why the line is used?
ArraySetAsSeries()
Thanks once again!
Now I got it. But I was thinking if it was possible to get the value for MA from both the Lines?
And in general when I put that MA into the Stochastic indicator window, how it is getting it's value?
Here the Thick Red line is MA and other two lines are two period of Stochastic.
Thanks
Now I got it.
i dont think so
i dont think so
opps... I missed the ArraySetAsSeries(Main_Sto, true);
Thank you once again. :)
I think you need the AsSeries for the OnArray, but you've put the data in backwards. Put the AsSeries before you fill the array.
I am not sure what's wrong with it but it's not returning any value!
I tired to get the value of Signal_Stochastic at 'current' bar, hence I put '0' in the Array but nothing is showing up!
Probably I have done it wrong. If I want to get the value of current bar then what can I do?
Thanks
Here I am really confused with the Array things. So pardon my ignorance.
My sole aim is comparing the Two [Signal_Stochastic & MA_Signal_Sto]. The sequence of functions will be exactly the same as showed above. [I just avoided the Buying/Selling functions to avoid lengthy code]
Thanks