REV0LUTI0N

Supertrend Strategy

REV0LUTI0N Diupdate   
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.
Catatan Rilis:
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".
Catatan Rilis:
Fixed start/end backtesting date.
Catatan Rilis:
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.
Catatan Rilis:
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.
Catatan Rilis:
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.
Catatan Rilis:
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.
Catatan Rilis:
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.
Catatan Rilis:
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.
Skrip open-source

Dalam semangat TradingView, penulis dari skrip ini telah mempublikasikannya ke sumber-terbuka, maka trader dapat mengerti dan memverifikasinya. Semangat untuk penulis! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.

Inggin menggunakan skrip ini pada chart?