Whilst using the building blocks Highest and Lowest, I noticed the strategies generated were not inverting the Highest and Lowest for the Long / Short Signals. Examples:
//--------------------------------------------------------------------
// Trading rule: Trading signals (On Bar Open)
//--------------------------------------------------------------------
LongEntrySignal = (Open above BollingerBands(Main chart,6, 2.5).UpperBand after opened below
and (CCI(Main chart,30)[1] crosses 0.0 upwards));
ShortEntrySignal = (Open below BollingerBands(Main chart,6, 2.5).LowerBand after opened above
and (CCI(Main chart,30)[1] crosses 0 down));
LongExitSignal = (Bar opens below Highest(Main chart, 17) after opened above
and (CCI(Main chart,30)[7] crosses 80.0 upwards));
ShortExitSignal = (Bar opens above Highest(Main chart, 17) after opened below
and (CCI(Main chart,30)[7] crosses -80 down));
AND
//--------------------------------------------------------------------
// Trading rule: Trading signals (On Bar Open)
//--------------------------------------------------------------------
LongEntrySignal = (Bar opens below Highest(Main chart, 44) after opened above
and Open below BollingerBands(Main chart,21, 2.0).UpperBand after opened above);
ShortEntrySignal = (Bar opens above Highest(Main chart, 44) after opened below
and Open above BollingerBands(Main chart,21, 2).LowerBand after opened below);
LongExitSignal = (Open below BollingerBands(Main chart,20, 2.0).LowerBand after opened above
and (CCI(Main chart,50)[10] crosses 60.0 upwards));
ShortExitSignal = (Open above BollingerBands(Main chart,20, 2).UpperBand after opened below
and (CCI(Main chart,50)[10] crosses -60 down));
Since Hightest / Lowest is a directional block (in the same way as the bollinger band highest and lowest are), the blocks should be inverted (swapped) in opposing rules.
Thanks,
Mike
HIGHEST(HIGH) should also be inverted to LOWEST(LOW)!
Currently, the calculation price "High" is not mirrored to "Low",
so you get LOWEST(HIGH) instead...