LucasVivien

Stochastic Moving Average

LucasVivien Actualizado   
Hi all,

This Strategy script combines the power of EMAs along with the Stochastic Oscillator in a trend following / continuation manner, along with some cool functionalities.
I designed this script especially for trading altcoins, but it works just as good on Bitcoin itself and on some Forex pairs.

______ SIGNALS ______

The script has 4 mandatory conditions to unlock a trading signal. Find these conditions for a long trade below (works the exact other way round for shorts)
- Fast EMA must be higher than Slow EMA
- Stochastic K% line must be in oversold territory
- Stochastic K% line must cross over Stochastic D% line
- Price as to close between slow EMA and fast EMA
Once all the conditions are true, a trade will start at the opening of the next

______ SETTINGS ______

- Trade Setup:
Here you can choose to trade only longs or shorts and change your Risk:Reward.
You can also decide to adjust your volume per position according to your risk tolerance. With “% of Equity” your stop loss will always be equal to a fixed percentage of your initial capital (will “compound” overtime) and with “$ Amount” your stop loss will always be 'x' amount of the base currency (ex: USD, will not compound)
Stop Loss:
The ATR is used to create a stop loss that matches current volatility. The multiplier corresponds to how many times the ATR stop losses and take profits will be away from closing price.

- Stochastic:
Here you can find the usual K% & D% length and overbought (OB) and oversold (OS) levels.
The “Stochastic OB/OS lookback” increase the tolerance towards OB/OS territories. It allows to look 'x' bars back for a value of the Stochastic K line to be overbought or oversold when detecting an entry signal.
The “All must be OB/OS” refers to the previous “Stochastic OB/OS lookback” parameter. If this option is ticked, instead of needing only 1 OB/OS value within the lookback period to get a valid signal, now, all bars looked back must be OB/OS.
The color gradient drawn between the fast and slow EMAs is a representation of the Stochastic K% line position. With default setting colors, when fast EMA > slow EMA, gradient will become solid blue when Stochastic is oversold and when slow EMA > fast EMA, gradient will become solid blue when Stochastic is overbought

- EMAs:
Just pick your favorite ones

- Reference Market:
An additional filter to be certain to stay aligned with the current a market index trend (in our case: Bitcoin). If selected reference market (and timeframe) is trading above selected EMA, this strategy will only take long trades (vice-versa for shorts) Because, let’s face it… even if this filter isn’t bulletproof, you know for sure that when Bitcoin tanks, there won’t be many Alts going north simultaneously. Once again, this is a trend following strategy.

A few tips for increased performance: fast EMA and D% Line can be real fast… 😉

As always, my scripts evolve greatly with your ideas and suggestions, keep them coming! I will gladly incorporate more functionalities as I go.
All my script are tradable when published but remain work in progress, looking for further improvements.


Hope you like it!
Notas de prensa:
Updated default settings
Notas de prensa:
Alerts() functions added for:
- Long trade start
- Short trade start
- Long stop or target activated
- Long stop or target activated

User input added for alert messages
This was designed in order for 3Commas users to simply copy/paste the "Messages" of their bots using TradingView custom signals.
Otherwise, you can input any message you like!

Feel free to get in touch with me if you want help setting up trading automation with 3Commas :)
Notas de prensa:
Typo in settings menu fixed

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?