OPEN-SOURCE SCRIPT

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

Atualizado
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
Notas de Lançamento
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 "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
BTCcryptoCryptocurrencyExponential Moving Average (EMA)Stochastic RSI (STOCH RSI)strategytvhub

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?


Também em:

Aviso legal