Help, Help, Help Please - with the iStochastic command in the code.

 
I need some by DownloadNSave">assistance with and EA that I am using to pull off information regarding Stochastic measurements. The part of the code that is pulling the information is the " iStochastic " command. For some reason I am not getting the stochastic measurements for all of the time-frames being specified. Can anyone let me know what I am doing wrong and why the measurements are not showing for all of the time-frames?

Example of what I am now seeing. You will notice that some of the values are 0. Sometimes each one of them is all 0s. Using the iStochastic command I would like to be able to get data for all 7 time frame being shown in the example below.

08:41:22 SM GBPUSDDaily: 1440Min K=15.574 D=5.5692
08:41:22 SM GBPUSD,Daily: 240Min K=0 D=0
08:41:22 SM GBPUSD,Daily: 60Min K=0 D=0
08:41:22 SM GBPUSD,Daily: 30Min K=81.2698 D=47.3075
08:41:22 SM GBPUSD,Daily: 15Min K=0 D=0

08:41:22 SM GBPUSD,Daily: 10Min K=0 D=0

08:41:22 SM GBPUSD Daily: 5Min K=100 D=94.5436

You will see that all of the data that I am pulling for the %K and %D information is not all being populated. Some are showing a " 0 - zero " value, instead of the data/numbers.

____________________________________________________________________________________________________________________________________________________________________

Example of how I am pulling off the needed information Below using the iStochastic command:

KLine1=iStochastic(NULL,1440,KPeriod,DPeriod,Slowing,0,1,0,0);
DLine1=iStochastic(NULL,1440,KPeriod,DPeriod,Slowing,0,1,1,0);
Print("1440Min K=",KLine1," D=",DLine1);
KLine2=iStochastic(NULL,240,KPeriod,DPeriod,Slowing,0,1,0,0);
DLine2=iStochastic(NULL,240,KPeriod,DPeriod,Slowing,0,1,1,0);

I would rather you Contact me @ mrhorton65@yahoo.com because I will get it a lot sooner this way.

 

You might be declaring them as int instead of double.

int KLine1=iStochastic(NULL,1440,KPeriod,DPeriod,Slowing,0,1,0,0); // bound to be trouble

// try this

double KLine1=iStochastic(NULL,1440,KPeriod,DPeriod,Slowing,0,1,0,0);