wugamlo

Strategy - Stochastic Crosses in Trending Market

wugamlo 업데이트됨   
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.





릴리즈 노트:
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.

Cheers
릴리즈 노트:
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).

릴리즈 노트:
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.
릴리즈 노트:
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

오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?