My chart is a 300 tick chart which is barsarray[0].
I was reading the help file and attempted to replicate the AddLineBreak() function but only am seeing results for the most recent occurance, no history.
When I refresh the chart, the script below only shows one green dot within the last few bars yet there are 20 days of charted tick bars.
Any ideas what I did wrong that makes the script not show any historical results from the barsarray[1] over 20 days?
protected override void Initialize()
{
// BarsInProgress index = 1
AddLineBreak("TF 12-14", PeriodType.Volume, 500, 3, MarketDataType.Last);
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Checks to ensure all Bars objects contain enough bars before beginning
if ( CurrentBars[0] <= BarsRequired || CurrentBars[1] <= BarsRequired )
return;
if (BarsInProgress == 0)
{
//Up bar after a down bar of LineBreak bars (BarsArray 1)
if (
Closes[1][0] > Opens[1][0]
&& Closes[1][1] < Opens[1][1]
)
{
DrawDot("DotUp", true, 0, Low[0] - 5, Color.Green);
}
}
Thanks for any help you can provide!
Comment