I've got an indicator showing some very odd behaviour. I'm simply using it to read a simple text file, and color the (historical) chart bars depending on values that have been read into the indicator from the input file.
Using Print statements I have verified all the lines are being properly read from the input file. The general flow of the indicator works like this:
try
{
//read each line from the input file...
while ((line = sr.ReadLine()) != null)
{
//read each character on each line, to get some values...
for(int index = 0; index < line.Length; index++)
{
...
}
//Each line from input file represents data for each bar on the chart.
//Using calculated values from each line, change bar to a certain color.
//Different values should change bars to different colors...
}
}
The problem is all the bars change to the same color. Even if I add a variable "counter" within the "while" loop to count the # of lines and use this to dictate some action (for example if(COUNTER == 12){do something;}) I see the same exact behaviour (all the bars have the same color regardless if it is bar #12 or not). It is very odd.
I don't believe NT has a "step through" type of debug tool in order to follow how NT is reading the code line-by-line...is there such a tool or is there an obvious flaw in the program flow? Thanks for any input.
Comment