LucasVivien

Stochastic Moving Average

LucasVivien Cập nhật   
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!
Phát hành các Ghi chú:
Updated default settings
Phát hành các Ghi chú:
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 :)
Phát hành các Ghi chú:
Typo in settings menu fixed

Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?