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

Indicator color change problem



PureBytes Links

Trading Reference Links

Perhaps someone can help me understand where the bug is in Omega's stock 
indicators that change the plot color under TS2000i. 
As an example, I have plotted the "Net Change" indicator on a daily stock chart.  
The indicator plots the net change correctly, but it also has a feature that changes the color of the indicator depending on whether it is above or below zero.  This is what does not plot correctly.  Sometimes when the indicator goes up instead of cyan it shows the red color, and vice versa.
The indicator is as follows:
{*******************************************************************
Description	: This Indicator plots Net Change 
Provided By	: Omega Research, Inc. (c) Copyright 1999  
********************************************************************}
Inputs: HiAlert(0), LoAlert(0), UpColor(Cyan), DnColor(Red);

Plot1(Close - Close[1] , "Net Chng");
Plot2(0,"Zero Line");
If Plot1 >= 0 Then
	SetPlotColor(1, UpColor)
Else
	SetPlotColor(1, DnColor);
----------------------------------------------------------------
Clearly this indicator is supposed to plot lines terminating above the blue zero line as cyan and those terminating below the zero line as red.
At least that is my interpretation.
I can send a gif of the chart to anyone who requests it from me so you can see what it looks like.

Any ideas as to why the color change is not correct?

Neal