I have programmed the following code (is part of an indicator for signals for the MA):
...
protected override void OnBarUpdate()
{
// Make sure there are enough bars.
if (CurrentBar < 10)
return;
//ODR LONG:
// Kurzfristige Trendausrichtung:
if (EMA(10)[0] > EMA(10)[2]
//Momentum Entwicklung:
&& Momentum(EMA(10), 10)[0] > 0
&& Momentum(EMA(10), 10)[0] > Momentum(EMA(10), 10)[2]
//Langfristige Trendausrichtung:
&& EMA(8)[0] > EMA(10)[0]
&& EMA(10)[0] > EMA(20)[0]
&& EMA(20)[0] > EMA(50)[0]
&& EMA(20)[0] > SMA(200)[0]
&& EMA(50)[0] > SMA(200)[0]
// 2. SwingHigh - Pattern - Definition LONG:
&& CrossAbove(Close, Swing(5).SwingHigh, 1))
{
Value.Set(1);
}
Problem: the indicator ignored the momentum code. Wehre ist the error?
Comment