announcements (like "Inside bar on 30" few times) when the workspace with charts for various timeframes for the same instrument is loaded. Any ideas to avoid
it? Once settled down, it seems to work perfectly. TY
protected override void OnBarUpdate()
{
if (CurrentBar == 0)
{
speaker.Rate = 1; // controls how fast the voice goes
speaker.SelectVoice("Microsoft Zira Desktop"); // You can change this if you have other voices, such as Microsoft David Desktop
timeframe = ((int)BarsPeriod.Value).ToString();
}
if (CurrentBar < 2)
return;
if (!IsFirstTickOfBar)
return;
bool isInsideBar = High[1]<=High[2] && Low[1]>=Low[2];
if (isInsideBar)
{
BarBrushes[1] = BorderBrush;
if (Bars.IsLastBarOfSession)
{
Say("Inside bar on " + timeframe);
}
}
}

Comment