I have been working on a multiple colored plot based on one MA above / below another MA. I have read a few posts and tried different coding techniques to try and get this to work to no avail.
Basically, all I'm trying to do is have the MA lines plot one color if MA1 > MA2, and another color if MA1 < MA2. I am able to get this to work using 4 different indicator plots. MA1up, MA2up, MA1dn, MA2dn.
My problem is that on the initial change in color I have all 4 plots showing at once, and since you have to connect the plots using the .Set(1, MA[1]), I get the change in color displayed one bar earlier before the cross takes place.
I have attached the indicator.
Thanks for your help.
Anthony
Comment