Help please ... iStochastics and iCustom returning wrong values

 

Hi everyone,

I am running into some issues using the iStochastic function as well as the iCustom function and am hoping you can help me. With either function, the values that I get do not match those that I see on the chart for either the stochastic indicator or my own indicator that I am calling with the iCustom function.

What could the reason be and how can I solve this? I appreciate your assistance and thank you in advance.

Reason: