Here are 2 indicators that I've been working on -- one based on CCI, the other on the Stochastic Oscillator. The basic idea of the indicators is to generate buy/sell signals, based on parameters that define the signal. Up/Down arrows are placed on the indicator window to indicate buy/sell.
In terms of calling these indicators with iCustom(), they return:
1 = Buy
0 = Neutral
-1 = Sell
The hope is that by having indicators that simply return buy, sell or neutral, EA logic can be simplified and concentrate on order management, regardless of the signal generators (i. e., technical indicators) employed. So, aside from the value of these indies as a trading system, the notion of normalizing the signal interface from an indicator to the EA may have wider use.
Mode=0 for iCustom()
extern double KPeriod = 5;
extern double DPeriod = 3;
extern double Slowing = 3;
extern double MAMethod = 0;
extern double PriceType = 0;
extern double Threshold = 3; // Divergence before signal is set
Mode=6 for iCustom()
extern double CCIPeriod = 14.0;
extern double OverBought = 200; // sell signal threshold
extern double OverSold = -200; // buy signal threshold
To use them, I've been taking the CCISignalIndy as the leading indicator, then the StochSignalIndy as the confirmation, if it agrees within 5 bars. You can change the behavior by altering the threshold variables.
Here's a picture:
Hope someone finds these useful.