When I set Autoscale to TRUE and turn off what I called pricemarkers30-120 in my code it then has the correct scaling.
What am I missing?
Part of the code is as follows. If that's not enough, please tell me who to send the full code to; as an indicator or a cs file.
protected override void Initialize()
{
PaintPriceMarkers = true;
Overlay = true;
AutoScale = true;
(...)
Add(new Plot(Color.Snow, PlotStyle.Hash, "Average5")); // 0
(...)
Add(PeriodType.Minute, 5); // 1
(...)
}
protected override void OnBarUpdate()
{
if (CurrentBars[0] < BarsRequired || CurrentBars[1] < BarsRequired || CurrentBars[2] < BarsRequired || CurrentBars[3] < BarsRequired || CurrentBars[4] < BarsRequired || CurrentBars[5] < BarsRequired)
return;
if(BarsInProgress != 0) return;
{
if (pricemarkers_On)
{
Average5.Set(Instrument.MasterInstrument.Round2Tic kSize(EMA(BarsArray[1],13)[0])); //0
Average15.Set(Instrument.MasterInstrument.Round2Ti ckSize(EMA(BarsArray[2],13)[0])); //1
PlotColors[0][1] = Color.Transparent;
PlotColors[1][1] = Color.Transparent;
}
(...)
if (pricemarkersb_On)
{
Average30.Set(Instrument.MasterInstrument.Round2Ti ckSize(EMA(BarsArray[3],13)[0])); //2
(...)
PlotColors[2][1] = Color.Transparent;
PlotColors[3][1] = Color.Transparent;
PlotColors[4][1] = Color.Transparent;
}
}
sandman
Comment