I have an oppositeblocks.csv file in place. Putting it in fixed the ADX bug however ATR does not seem to be following the oppositeblocks rules....
From my oppositeblocks.csv file:
ATR;ATR
ATRChangesDown;ATRChangesDown
ATRChangesUp;ATRChangesUp
ATRCrossDown;ATRCrossDown
ATRCrossUp;ATRCrossUp
ATRFalling;ATRFalling
ATRHigher;ATRHigher
ATRLower;ATRLower
ATRRising;ATRRising
From results source tab:
//--------------------------------------------------------------------
// Trading rule: Trading signals (On Bar Open)
//--------------------------------------------------------------------
LongEntrySignal = (((ADX(Main chart,50)[1] is falling for 17 bars)
and (StdDev(Subchart1, D1,31)[1] < 0.4))
and (ATR(Subchart2, M15,36)[1] is rising for 15 bars));
ShortEntrySignal = (((ADX(Main chart,50)[1] is rising for 17 bars)
and (StdDev(Subchart1, D1,31)[1] > -0.4))
and (ATR(Subchart2, M15,36)[1] is falling for 15 bars));
LongExitSignal = ((Open below LinReg(Main chart,30) after opened above
and (HeikenAshiLow(Subchart1, D1)[1] crosses below LowDaily(Subchart1, D1)[1]))
and (KeltnerChannel(Subchart2, M15,23, 0.4).Lower[1] crosses below SMMA(Subchart2, M15,38)[1]));
ShortExitSignal = ((Open above LinReg(Main chart,30) after opened below
and (HeikenAshiHigh(Subchart1, D1)[1] crosses above HighDaily(Subchart1, D1)[1]))
and (KeltnerChannel(Subchart2, M15,23, 0.4).Upper[1] crosses above SMMA(Subchart2, M15,38)[1]));
You can use block [ATR is rising] - then you can control tits negation using OppositeBlocks.csv
or
you can use multiple blocks [ATR][Is rising] - then you cannot control the negation.
So the solution is simple, if you want to have negation defined in the day you want use Predefined conditions and don't use individual indicators and comparisons.