Need some help. The indicator plots nothing and I don't know why. This is the core code. Am I missing something?
It only calculates a swing in ADX below certain level (bandadx), checking that another ADX is below bandadx1 and finally seeing that +DI and -DI go in different directions.
Thanks in advance,
Sergio
protected override void OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
if (ADX(14)[2] > ADX(14)[1]
&& ADX(14)[0] > ADX(14)[1]
&& ADX(14)[1] < bandadx
&& ADX(35)[1] < bandadx1
&& ((DM(14).DiPlus[0] - DM(14).DiPlus[1])* (DM(14).DiMinus[0] - DM(14).DiMinus[1]) < 0.000)
)
{barracuda = 1;}
else
{barracuda = 0;}
Plot0.Set(barracuda);
}

Comment