Newcomer........Help Needed coding

 
Need an indicator same as MACD but to display the colors as per the screenshot attached.

Would appreciate any help.

Also, How can I assign values to array?

EG x[i] = High[i];

Sometimes this will not work, I am not sure what I am doing wrong.

Thanks

-Pete
 
Pete: That array code is correct. It might not work because one array (the x one) is smaller than the other.
 
ThomasB:
Pete: That array code is correct. It might not work because one array (the x one) is smaller than the other.
Thank you Thomas.....
 
Thanks so much Rosh....Appreciate this
Reason: