Gentleman-Goat

Function Polynomial Regression Strategy

Gentleman-Goat 업데이트됨   
To be clear I'm using the code from Richard Santos for the functional polynomial regression. I really loved his script idea (given that I'm into linear regression myself). I took his code and made a strategy which applies to bitcoin on the 5 minute chart (but you could adjust this for any asset), and you could make this work on anytime frame by adjusting the 'length' property of the regression until you get good results.

This strategy is very simple.

I drew lines to represent the bottom most part of the regression (green line), and top most part (red line). If the close crosses under the red line then you short. The reverse if it crosses above the green line then you go long.

Very simple but effective. To understand this script be sure to add Richard santos function polynomial regression so you can see what is going on and what I'm trying to do.

For example, on BTC with a length of 61 if you bought and held you would have only had 5% gain, instead with this strategy you are looking at very close to 60% gains! Now this could be a weird fluke of over-optimizing but I'm not sure this is the case because you can adjust the length from there +/- about 10 and still have good results. It's just certain lengths are the correct trading rhythms for different assets.

I'm excited to see how you guys use this and if you have any success. Be sure to thank Richard Santos for his great work!
릴리즈 노트:
I added trailing stop loss as requested by some users just enable it in the settings with the gear icon. By default I have it turned off, but with ETHUSD you can see that it can create improvements with the right settings. Just tweak it until you find the right settings.
릴리즈 노트:
I added backtest date range and the ability to:

- Do only LONGS
- Do only SHORTS
- Close instead of Short
- Close instead of Long

In the example uploaded, you can see that by turning off allowLongs, and enabling close instead of long you can see how effective this strategy is with just shorting alone. Using this you can optimize your parameters for just shorting or longing and then combine them later for the best settings.

Thanks to investCHK for the suggestion!

-=Gentleman Goat=- Download the TradingView Input Optimizer at tradingtools.software/optimizer
Discord: discord.gg/pGHHRczpbu
오픈 소스 스크립트

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

면책사항

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

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