REV0LUTI0N

Supertrend Strategy

REV0LUTI0N Actualizado   
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.
Notas de prensa:
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".
Notas de prensa:
Fixed start/end backtesting date.
Notas de prensa:
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.
Notas de prensa:
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.
Notas de prensa:
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.
Notas de prensa:
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.
Notas de prensa:
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.
Notas de prensa:
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.
Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.

¿Quiere utilizar este script en un gráfico?