Since I want to fill between lines, I have two custom Series<double> that OnBarUpdate puts the respective line values into on each bar, which should create suitable data series objects for Draw.Region. Here is the drawing code -- a diagnostic Print and the Draw.Region:
Print($"BULL: bottomSeries.Count={bottomSeries.Count} topSeries.Count={topSeries.Count} bottomSeries[0]={bottomSeries[0]}"
+ $" topSeries[0]={topSeries[0]} Value[0]={Value[0]} CurrrentBar={CurrentBar}");
Draw.Region(this, "tag1"+CurrentBar, CurrentBar, 0, bottomSeries, topSeries, null, Brushes.Green, 100 /*transparency*/);
BULL: bottomSeries.Count=7145 topSeries.Count=7145 bottomSeries[0]=-50 topSeries[0]=50 Value[0]=54 CurrrentBar=7141 BULL: bottomSeries.Count=7145 topSeries.Count=7145 bottomSeries[0]=-50 topSeries[0]=50 Value[0]=66 CurrrentBar=7142 BULL: bottomSeries.Count=7145 topSeries.Count=7145 bottomSeries[0]=-50 topSeries[0]=50 Value[0]=74 CurrrentBar=7143 BULL: bottomSeries.Count=7145 topSeries.Count=7145 bottomSeries[0]=-50 topSeries[0]=50 Value[0]=98 CurrrentBar=7144
- The bar number and Value[0] are correct -- they match the screen so we are getting to the right place to be doing the Draw.Region.
- I tried both "tag1" and "tag1"+CurrentBar -- did not make any difference.
- I tried setting the start to CurrentBar, CurrentBar-1, 0, and 5 -- did not make any difference.
- I tried with the second series and with the other signature that just takes a value -- did not make any difference.
- The counts confirm that the series are getting populated. Their current values are as expected (-50 and 50).
- The Print shows I am actually getting to the Draw line of code ... it is the next one after the Print statement.
Thanks

Comment