Hello guys,
I want to fill the gaps between previous close candle and current open candle with a ShadeDescriptor so that all the gaps are colored and extended for certain time period.
I am using the "My Moving Average" example but I don't really know where to start here.
I already have the open and close prices from the dataseries but how do I set the shade between those two prices?
My defined Shade in the initialize Method:
And the datapoints in the calculate method:
I hope somebody can help me
I want to fill the gaps between previous close candle and current open candle with a ShadeDescriptor so that all the gaps are colored and extended for certain time period.
I am using the "My Moving Average" example but I don't really know where to start here.
I already have the open and close prices from the dataseries but how do I set the shade between those two prices?
My defined Shade in the initialize Method:
Code:
grp.addRow(new ShadeDescriptor(MYSHADE1, get("Shade 1 style"), new String[][] { {"a", "b"}, {"one", "two"} }, new Color(0, 128, 0, Math.round(255 * 0.6f)), true, true));
And the datapoints in the calculate method:
Code:
var bar1open = series.getOpen(index );
var bar0close = series.getClose(index - 1 );
var diff = bar1open - bar0close;
if (diff > 0){
SHADE THE GAP
}
I hope somebody can help me