Tags:

This is a pure Stochastic strategy that uses the indicator for entry and exit signals, going long only. It enters long when K line crosses above D line in oversold zone with close above previous high, and exits on profit taking or stop loss triggers. Simple and easy to implement.

The main logic is:

- Calculate Stochastic K and D values
- Enter long when K crosses above D in oversold zone and close breaks previous high
- Set moving stop loss below fast EMA on close
- Take profit when K crosses below D or K enters overbought zone

K crossing D in oversold suggests potential upside reversal. Close breaking high adds confidence.

EMA stop locks in profits. K crossing D in overbought acts as profit take signal.

Going long only, it suits instruments like equities with one-sided trends. Simple to implement.

- Uses Stochastic to identify oversold regions
- K and D lines avoid false signals
- Close breakout adds confidence
- Stop loss and take profit manages risks
- Simple logic makes it easy to implement

- Potential for Stochastic false signals
- Has some loss risks
- Unable to take profit at trend tops

Mitigations:

- Optimize parameters for greater accuracy
- Use moving stops to control loss risks
- Add indicators to predict trend reversal

The strategy can be enhanced by:

- Adding short side opportunities for full market coverage
- Adaptive stops based on volatility
- Machine learning for parameter optimization
- Incorporate trailing take profit strategy
- Portfolio combinations to build multifactor system

This is a pure Stochastic long strategy using the indicator for oversold entries and managed exits. Simple and practical, it fits instruments like equities well. Expanding to the short side, parameter optimization can make it a more robust system.

/*backtest start: 2023-09-11 00:00:00 end: 2023-09-12 14:00:00 period: 5m basePeriod: 1m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version= 4 // see for original idea: http://www.enricomalverti.com/2016/12/stocastico/ // https://sauciusfinance.altervista.org strategy(title="Pure Stochastic long only", overlay = false, max_bars_back=500) // INPUTS & calculations length = input(10, minval=1) OverBought = input(80, minval = 50, step = 10) OverSold = input(20, minval = 10, step = 5) smoothK = input(7, minval=1) smoothD = input(4, minval=1) k = sma(stoch(close, high, low, length), smoothK) d = sma(k, smoothD) // We keep EMA 7 (n period of stochastic /2) as target price emaperiodf = input(5, minval = 1) emaf = ema(close,emaperiodf) entryl = k > d and k <= OverSold and close >= high[1] /// Entry strategy.entry("Long", true, when = entryl) middle = (OverBought+OverSold)/2 close1= crossunder(close,emaf)// **close under EMA fast** close2= k < d and k > middle close3 = (k >= OverBought) // exits. strategy.close("Long", when = close1, comment="stop Ema Fast") strategy.close("Long", when = close2, comment ="cross k&d") strategy.close("Long", when = close3, comment = "high value of K") plot(k, color=#0000FF, linewidth= 2, title="k Stoch") plot(d, color=#787B86, linewidth= 1, title="d stoch signal") plot(OverBought) plot(OverSold)

- Adaptive Moving Average Crossover Strategy Based on Uhl MA
- Vortex and RSI Stock Long-only Trading Strategy
- Williams %R Crossover Strategy with Moving Average Filter
- DMI and Moving Average Combination Strategy
- Donchian Channel Breakout Strategy
- Simple Moving Average Crossover with Stop Loss Strategy
- SuperTrend Dual Moving Average Crossover Strategy
- Moving Average Trailing Stop Strategy
- Center of Gravity SSL Channel Trend Following Strategy
- Dual Moving Average Crossover Strategy with Multi-Type Moving Averages
- Percent Trailing Stop Loss Strategy
- CMO Oscillator Trading Strategy
- Multi-factor Reversal Trading Strategy
- RSI Indicator Dual Strategy
- EMA Trend Following Trading Strategy
- Dual EMA Crossover Trading Strategy
- Long Breakout Range Trading Strategy
- Combo Trading Strategy Based on 123 Reversal and MACD
- Dual Moving Average Trading Strategy Based on Detrended Synthetic Price
- ADX EFI 50 Moving Average Channel Pullback Strategy