Code:
if(SignalAlert == true)
{
if(ExtMacdBuffer[1]<0 && ExtMacdBuffer[2]>=0 && Bars>c)
{
//Sell
Alert("Signal "+Symbol()+"-M"+Period());
c=Bars;
}
if(ExtMacdBuffer[1]>0 && ExtMacdBuffer[2]<=0 && Bars>d)
{
//Buy
Alert("Signal "+Symbol()+"-M"+Period());
d=Bars;
}
}
Ich habe mal die Arrayindices um 1 erhöht.
traderdoc