Duplicate title and content problem is solved with Bars.TickCount, but there are many other problems such as time limit error, server response error, update limit error and so on. I tried to fix it with something like an alarm cycle(Timer, Thread Sleep, Task Delay and so on), but it did not work. Help me please. PS : I compile the code -> Calculate = Calculate.OnEachTick; i don't want OnBarClose.
protected override void OnBarUpdate()
{
//Add your custom indicator logic here.
if (CrossAbove(Close, SMA(Period), 1))
{
Draw.ArrowUp(this, "Buy", true, 0, Low[0] - 0.01, Brushes.Red);
PlaySound(NinjaTrader.Core.Globals.InstallDir + @"\sounds\Alert1.wav");
SendMail("[email protected]", "Buy", "Buy");
// Duplicate error : SendMail("[email protected]", "Buy"+ Bars.TickCount, "Buy");
Share("Twitter", "Buy");
}
Value[0] = SMA(Period)[0];
}.
Comment