This is for a historical chart, right?
.fctbNone{ color:#000000; }
.fctbStyle8{ color:#000000; }
.fctbStyle5{ color:#0000ff; }
.fctbStyle7{ color:#800000; }
.fctbStyle6{ color:#808080; }
.fctbStyle2{ color:#008000; }StateFIFOQueue Highs;
Double AllTimeHigh = 0;
public void MainCalculation()
{
AllTimeHigh = Math.Max(AllTimeHigh,High);
Highs.Add(High);
Double H,L;
Highs.GetHighLow(out H, out L);
SetColor("Line Color", Color.Green);
if (H == AllTimeHigh)
SetYValue(H);
else
SetYValue(YSkipValue);
}
/// <summary>
/// Is called at start of paintbar calculation, should be used to initialize anything needed for the paintbar
/// </summary>
private void PaintbarInitialize()
{
Highs = new StateFIFOQueue(90);
}
/// <summary>
/// Is called at start of paintbar calculation, should be used to clear the paintbar state
/// </summary>
private void PaintbarClearState()
{
Highs.Clear();
}
/// <summary>
/// Saves paintbar state (called internally).
/// </summary>
private void PaintbarSaveState()
{
Highs.SaveState();
}
/// <summary>
/// Restores paintbar state (called internally).
/// </summary>
private void PaintbarRestoreState()
{
Highs.RestoreState();
}