REV0LUTI0N

Supertrend Strategy

REV0LUTI0N 업데이트됨   
This Supertrend strategy will allow you to enter a long or short from a supertrend trend change. Both ATR period and ATR multiplier are adjustable. If you check off "Change ATR Calculation Method" it will base the calculation off the sma and give you slightly different results, which may work better depending on the asset. Be sure to enter slippage and commission into the properties to give you realistic results.

I've also built in backtesting date ranges and the ability to trade only within certain times of day and have it close all trades at the end of that time frame. This is especially useful for day trading stocks. If you check off "Enter First Trade ASAP" then when using the time frame option it will enter the current trade. If however you uncheck that box and instead check off "Wait To Enter First Trade" it will wait for the trend to change and then enter.

You can also specify a % based take profit and stop loss. In most cases the stop loss is not needed because of the atr based stop that supertrend provides so you could check only take profit and see if it works best to take profit or to let supertrend trend change get you out. Also keep in mind that if you have "Enter First Trade ASAP" checked off and use the stop loss and/or take profit then it will re-enter the current trend again.

Finally there's custom alert fields so you can send custom alert messages for strategy entry and exit for use with automated trading services. Simply enter your messages in the fields within the strategy properties and then put {{strategy.order.alert_message}} in your alert message body and it will dynamically pull in the appropriate message.
릴리즈 노트:
Added an EMA filter. To use this you must check off the "Enter First Trade ASAP" button so it will enter as soon as both the supertrend and ema conditions are met. Also uncheck "No EMA filter" and check off "Use EMA Filter".
릴리즈 노트:
Fixed start/end backtesting date.
릴리즈 노트:
Added the ability to exit trades in a different time frame than you enter trades. This is useful if you wanted to say enter trades only 0930-1030 but then hold the last trades until later and set the exit trades time from to 0930-1530. Then you would check off "Enable Close Trade At End Of Exit Time Frame" and it will close the last trade you enter at 1530.
릴리즈 노트:
Added CMF filter so you can select a CMF length and have it only enter a long if CMF is above zero and only enter a short if CMF is below zero. Also adding headlines in the properties to make the indicator more user friendly.
릴리즈 노트:
Added the ability to turn supertrend off. This is useful for situations where you want to use the other features of the indicator like ema and cmf and not supertrend. I also added the ability to choose the time frame for the EMA and CMF filters.
릴리즈 노트:
New updates are the ability to use contrarian signals. This is useful for some assets where it proves easier to find losing settings. Simply uncheck "Trade Regular Signals" and check "Trade Contrarian Signals" and the strategy will automatically reverse the signals for you! Please note there's a separate take profit and stop loss section for contrarian since this needed its own area to work properly. Finally I added a note section at the top since in some cases you may have multiple copies of the strategy on one chart and need a quick note to differentiate something like what time frame that copy is for.
릴리즈 노트:
Removed the multiple time frame selection from the ema and cmf filters since I discovered they do not perform the same live as in the back testing. I also made it so the one stop loss and take profit section works for both regular or contrarian trading.
릴리즈 노트:
Added price source to the ema filter. This allows you to select the source of the price that is compared to the ema to determine if price is over or under the ema. I also added a source for the cmf filter.
오픈 소스 스크립트

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

면책사항

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

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