Drun30

Momentum Strategy (BTC/USDT; 30m) - STOCH RSI (with source code)

Drun30 Cập nhật   
Here's a strategy for low time frames (30min suggested) for BTC , based on momentum Analysis using Stochastic RSI
By default the strategy will use the 50% of the specified capital for each trade; if "Gamble Sizing" is enabled, it will add the specified amount of capital (25% by default, until reaching the 100% limit or lower) for the next trade after having detected a loss in the previous trade; if the next trade is successful, the size for the next trade comes back to 50%

• Trend Filter LONG: If the fast exponential moving average is UNDER the slow exponential moving average , it won't open LONG positions

• Trend Filter SHORT: If the fast exponential moving average is ABOVE the slow exponential moving average , it won't open SHORT positions

• Bars delay: the strategy will wait the specified amount of bars before closing the current position; the counter is triggered as soon as the closing trade condition is verified

BY MAKING USE OF THIS STRATEGY, YOU ACKNOWLEDGE AND AGREE THAT: (1) YOU ARE AWARE OF THE RISKS ASSOCIATED WITH TRANSACTIONS OF DIGITAL CURRENCIES AND THEIR DERIVATIVES; (2) YOU SHALL ASSUME ALL RISKS RELATED TO THE USE OF THIS STRATEGY AND TRANSACTIONS OF DIGITAL CURRENCIES AND THEIR DERIVATIVES; AND (3) I SHALL NOT BE LIABLE FOR ANY SUCH RISKS OR ADVERSE OUTCOMES.

SOURCE CODE BELOW
Phát hành các Ghi chú:
EDIT:
Now you can integrate easily this strategy with your tv-hub account by changing values from line 8 to 18; these variables will be submitted by string-interpolation in the JSON messages sent to the webhook.
Please notice that TV-HUB integration will need the possibility of sending webhook messages, so it is supposed that you have a PRO TradingView account at least.

WARNING: The strategy is suited for taking a PERCENTAGE of the AVAILABLE balance you set. So, if you put on line 8 "BTCUSDT" and on line 9 "50", if the condition for opening a long position is triggered, the bot would spend the 50% of the USDT PRESENT ON YOUR EXCHANGE WALLET for buying the equivalent of BTC at the given price, indipendently from the initial capital you've set inside the strategy. So, for example, if you have 5000 USDT available in your SPOT wallet on Binance (or Bitmex or Bybit), in the previous case the bot will open a long position using 2500 USDT. If you want the bot to run with the full amount of USDT you have, just put "100" at line 9

What you need to do is

(0) Change the values of the specified lines submitting the values associated with the matching keys you see on the JSON generated by Tv-hub

(1) Set the strategy on the desired timeframe you want it to run;

(2) Create a new alert by clicking on the clock symbol present in the "Strategy tester" panel;

(3) Click on the dropdown associated with "Condition" on the alert-panel that would have popped up and then select "Momentum Strategy";

(4) Enable the checkbox called "Webhook URL" and type "https://alerts.tv-hub.org" in the input field (without ")

(5) Type the "Alert name" you want (that's the name for saving the alert, you can also type "Vires in Numeris" or whatever

(6) Type on "Message" "{{strategy.order.alert_message}}" (without "). In this way the message sent to the webhook url you've set at the fourth point would be the JSON associated with the triggered condition (open long, open short or close position)

(7) Click on "Create" and cross your fingers

PLEASE, BE AWARE THAT THIS TRADING STRATEGY DOES NOT GUARANTEE ANY KIND OF SUCCESS IN ADVANCE. YOU ARE THE ONE AND ONLY RESPONSIBLE OF YOUR OWN DECISIONS, I DON'T TAKE ANY RESPONSIBILITY ASSOCIATED WITH THEM. IF YOU RUN THIS STRATEGY YOU ACCEPT THE POSSIBILITY OF LOOSING MONEY, ALL OF MY PUBBLICATIONS ARE SUPPOSED TO BE JUST FOR EDUCATIONAL PURPOSES.
IT IS AT YOUR OWN RISK WHETHER TO USE IT OR NOT

Buy me a beer! (ETH) → 0x2a2595D95a54330BeB848F7BFAab1B4f1569D635

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 đồ?