AnyPair SMI

 

Hi guys, maybe someone here can help me.

This indicator is giving no output, I'm trying to adapt a Stochastic Momentum Index to use a different pair than the one on the chart.  The first file is the original I'm using (SMI_Correct_1), the second one (B45a_SMI_AnyPair) is my adaptation.  Any  help would be greatly appreciated.

 I'm also planning to use this for an EA, which is why I inserted the mode2 and 3 buffers there, but not sure I did it right, I'm new to programming these...  :-)

 The first one works fine (SMI_Correct1), the problem is in the second file (AnyPair). 

This what I get from both, mine is at the bottom of this chart.Both indicators - Mine is the bottom one.
Reason: