Once more I'm baffled. This program is trying to do the following:
Create an average of the Close for the past x bars.
Create an average of the Open for the past x bars.
For each bar, if the Closing Avg is <= the Opening Average, color the bar red; if the Closing Avg is > the Opening Average, color the bar lime.
When I run it with the debug function, it shows that the Closing and Opening Averages are calculated a number of times, then both show null. No bars are colored.
What have I done now?
Thanks.
Create an average of the Close for the past x bars.
Create an average of the Open for the past x bars.
For each bar, if the Closing Avg is <= the Opening Average, color the bar red; if the Closing Avg is > the Opening Average, color the bar lime.
When I run it with the debug function, it shows that the Closing and Opening Averages are calculated a number of times, then both show null. No bars are colored.
What have I done now?
Thanks.
Comment