Strategy - Stochastic Crosses in Trending Market

1736 vizualizações
This strategy is based on Stochastic Crosses happening in the Oversold/Overbought area, taken into account the current trend which is determined by an EMA pair.
(Only Longs in uptrend / only Shorts in downtrend)

- Long position is closed when Stochastic is entering Overbought area
- Short position is closed when Stochastic is entering Overbought area

Additionally a logic is implemented to close the position when another (subsequent) Buy or Sell Signal is given after the trend has changed (to avoid fake outs)

- EMA and Stochastic settings can be changed in the settings
- Take Profit / Stop Loss can be dynamically activated in the settings (by defaults only Take Profit is activated)
- Short Position trading can be excluded in the settings (for people trading on platforms without the possibility to open Short Positions)
- Strategy time frame can be entered in the settings

Default setup seems to work well for BTC on 4HR timeframe.

Good luck!

As this is my first strategy, I am very happy for constructive feedback on how to improve this.

Notas de Lançamento: This Update changes the logic how an Open Position is closed after a reversal of the underlying EMA trend.

Before Update:
Close open position when a new buy/sell condition is triggered by a Stochastic Cross
--> Actually this does not really make much sense....

After Update:
Close open position immediately when underlying EMA trend is changing
- Trend changes to bearish --> Open Long position get closed
- Trend changes to bullish --> Open Short position get closed

In backtesting this is beneficial.

Notas de Lançamento: UPDATE:
Actually there is no update to this stratey script, but I published a complementary indicator which can help to analyze when the Order Close condition is met (crossing of Overbought/Oversold line).

Notas de Lançamento: UPDATE:

After some testing I come to the conclusion that it is beneficial to change the condition for the Position Close.

Previously the position was closed when the Stochastic K-line was crossing into Overbought (close longs) or Oversold (close shorts) areas.
But when looking at the historical trades, I found that quite often positions were closed too early and additional potential profits were wasted.

So in the new version the position is only closed when the Stochastic D-line is crossing into Overbought/Oversold. This has the effect, that the positions stay open longer as the D-line will reach the closing zone with a delay (in the default settings the D-line is a 3period SMA of the K-line). This has a chance to be beneficial as in trending markets the Stochastic can stay oversold/overbought for some time. As the positions are anyway only opened and staying open following the general trend (as determined by the EMAs), the downside risk of this adjustment should not be too high.

Please check it out yourself - and let me know in case of additional improvement ideas - especially if anyone has an alternative idea for a more ideal position closing (trailing stop? etc.)

PS. Yesterday with default settings (BTCUSD on 4 HR timeframe) the 7th trade of 2020 was closed in profit. That makes it 7 out of 7 in the green this year.
Notas de Lançamento: UPDATE:
In the previous version only either Take Profit or Stop Loss was working, not both combined.
This is fixed - now both can be used in combination
Remover dos scripts favoritos Adicionar aos scripts favoritos


Have any ideas on how to use candle stick patterns and 10 day ema cross over for long short positions?
wugamlo Trading_Syndicate
@Trading_Syndicate, To be honest, I am not really sure how your comment is in any way related to the strategy?
@wugamlo, Sorry, earlier I was a bit tired earlier. I guess I was curious if you have tried a single 10 day EMA using "cross under" and "cross above" to trigger a conditional buy/sell trigger (which would also be based on the conditions of another indicator - in this case, last night the thought of using a 'candle stick pattern indicator' in order to enter on the first indicator (10-EMA) maybe a 'ZERO Lag 10-EMA' and then exit using trailing stops or the candle stick indicator or something like stoch etc... I'm just picking your brain here bud.
Thank you for the strategy @wugamlo can you assist me in how to convert it to a study.

Thanks again
where can I use the stock and divergence indicator?
wugamlo ZinhoSte
@ZinhoSte, that is an indicator which I developed myself and did not publish yet
+1 Resposta
ZinhoSte wugamlo
@wugamlo, It would be really really nice if you would :D
+1 Resposta
does this repaint
wugamlo wwrekt
@wwrekt, to be honest I am not a specialist in this area as this is my first strategy, but looking at the TradingView Wiki regarding repainting (https://www.tradingview.com/wiki/Indicator_repainting), I do not see any of the listed issues with my script. The entries and exits are always after the bars are closed and all indicators on which the actions are based on are historically stable. So if there is a repaining issue, I would be very interested myself to learn more about it.
wwrekt wugamlo
@wugamlo, alright
thanks bro, i'll test it out
Início Rastreador de Fundamentos Rastreador Forex Rastreador de Criptomoedas Calendário Econômico Como Funciona Recursos gráficos Preços Indique um Amigo Regras da Casa Central de Ajuda Soluções para Sites & Corretoras Widgets Soluções em Gráficos Biblioteca de Gráficos Lightweight Blog & Notícias Twitter
Perfil Configurações de perfil Conta e cobrança Indique um Amigo Meus Tíquetes de Suporte Central de Ajuda Ideias Publicadas Seguidores Seguindo Mensagens Privadas Conversa Deslogar