I am plotting a higher time frame SMA on a chart of lower time frame. For example, a 10 period SMA on a 1 min chart (see link and attached plot http://www.ninjatrader.com/support/f...ad.php?t=44451)
I want to colour the plot of SMA green at times when it is rising. This is a well worn problem but there is an extra step I am missing now that I am plotting from a secondary time frame which is longer than the primary one. The code below does not quite do it. As you can see in the plot, I only get green for the first bar of the primary (shorter) time frame. Can someone see what I am missing here?
if(BarsInProgress ==0) { Plot1.Set(SMA(BarsArray[1], Period)[0]); if(Rising(Plot1)) PlotColors[0][0] = Color.LimeGreen;
darmbk.
Comment