Draw.Region()
Draw.Region()
Definition
Draws a region on a chart.
Method Return Value
A Region object that represents the draw object.
Syntax
Draw.Region(NinjaScriptBase owner, string tag, int startBarsAgo, int endBarsAgo, ISeries\<double\> series, double price, Brush areaBrush, int areaOpacity, int displacement = 0)
Draw.Region(NinjaScriptBase owner, string tag, int startBarsAgo, int endBarsAgo, ISeries\<double\> series1, ISeries\<double\> series2, Brush outlineBrush, Brush areaBrush, int areaOpacity, [int displacement])
Draw.Region(NinjaScriptBase owner, string tag, DateTime startTime, DateTime endTime, ISeries\<double\> series, double price, Brush areaBrush, int areaOpacity)
Draw.Region(NinjaScriptBase owner, string tag, DateTime startTime, DateTime endTime, ISeries\<double\> series1, ISeries\<double\> series2, Brush outlineBrush, Brush areaBrush, int areaOpacity)
Parameters
Examples
Tips
- Pass in null to the “outlineColor” parameter if you do not want to have an outline color.
- If you wanted to fill a region between a value (20 period simple moving average) and the upper edge of the chart, pass in an extreme value to the “y” parameter such as 1000000.
- Should you be drawing regions based on Series<double> objects instead of indicator plots, be sure to create the Series<double> with the MaximumBarsLookBack.Infinite parameter if the region you are drawing would be maintained on the chart for more than 256 bars back.

