Here you go. I coded a strat that takes signals off the same indicator. Kindly post the strategy if you get it working profitably (if that's a word...). The indicator and the related strategy is simply a breakout strategy and it's not reliably/consistently profitable without further filters (still exploring). But again, if you succeed in tweaking it to make it profitable, kindly share with the rest of us and/or advise what filters additionally work well.
//***************************************************
// LONG ENTRY CONDITION
//***************************************************
if (Position.MarketPosition==MarketPosition.Flat
// at least 2 ADXVMA neutral signals prior to current bar and no neutral signal for current bar
&& !_ADXVMA_v01_5_2_noRepaint(5, true).Neutral.ContainsValue(0)
&& _ADXVMA_v01_5_2_noRepaint(5, true).Neutral.ContainsValue(1)
&& _ADXVMA_v01_5_2_noRepaint(5, true).Neutral.ContainsValue(2)
// last two bars close above neutral signal value
&& Close[1] > _ADXVMA_v01_5_2_noRepaint(5, true).Neutral[1]
&& Close[0] > _ADXVMA_v01_5_2_noRepaint(5, true).Neutral[1]
)
EnterLong(tradeSize);
//***************************************************
// SHORT ENTRY CONDITION
//***************************************************
if (Position.MarketPosition==MarketPosition.Flat
// at least 2 ADXVMA neutral signals prior to current bar and no neutral signal for current bar
&& !_ADXVMA_v01_5_2_noRepaint(5, true).Neutral.ContainsValue(0)
&& _ADXVMA_v01_5_2_noRepaint(5, true).Neutral.ContainsValue(1)
&& _ADXVMA_v01_5_2_noRepaint(5, true).Neutral.ContainsValue(2)
// last two bars close below neutral signal value
&& Close[1]