[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mom_ama



PureBytes Links

Trading Reference Links

preston wrote:
> what i am trying to do is have the histogram bar be green if its value
> is higher that that of the previous bar... & red if its value is lower
> than that of the previous bar.

I never use oscillators any more but, back when I was into them, I used
to plot them like this. Sounds like what you need. On a black
background, it gives a cool looking red and green histogram with a white
line border (makes it easier to spot divergences).

var: my_osc(0);

my_osc = blah blah;

if my_osc > my_osc[1] then plot1(my_osc,"Up") else     {green histogram}
if my_osc < my_osc[1] then plot2(my_osc,"Down") else   {red histogram}
plot3(my_osc,"Flat");                                  {yellow point}
plot4(my_osc,"Line");                                  {white line}


If you need plots 3 and 4 for something else, you can just do

if my_osc >= my_osc[1] then plot1(my_osc,"Up") else    {green histogram}
plot2(my_osc,"Down");                                  {red histogram}

-- 
   Dennis





  • References: