Hi,
How do I use an oscillator (stochastic or CCI) to determine a trend using price action.
I need help coding the following, ideally based on 5m or 15m charts:
Uptrend (higher lows and higher highs)
- current price is in the oversold area of the oscillator
- current price is higher than the previous oversold area
Downtrend (lower highs and lower lows)
- Current price is in the overbought area of the oscillator
- current prices is lower than the previous overbought area
See attached image which illustrates the above for an uptrend.