The indicator displays proper values on charts but not in MA.
Here is the jist of the code:
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.SteelBlue), PlotStyle.Bar, "Plot0"));
CalculateOnBarClose = false;
Overlay = false;
PriceTypeSupported = false;
}
protected override void OnBarUpdate()
{
if (CurrentBar < 200) return;
var = 0;
if (something is true)
{
var = 1;
}
if(something is true)
{
var = 2;
}
if(something is true)
{
var = 3;
}
if(something is true)
{
var = -1;
}
if(something is true)
{
var = -2;
}
if(something is true)
{
var = -3;
}
Plot0.Set(var);
}
Comment