Gesundheit

Trend-following Microprofit w/ Smart DCA + Profit Plot + Alerts

Gesundheit Mis à jour   
This alert script is oriented towards automated trading with Gunbot.

I call it "Options Galore" because of all the user-configurable settings it offers for up-trending and down-trending markets. (See: "Market Tone" study).

A strategy script for quantitative backtesting, smarter buy/sell indicator such as TSI or Stoch RSI, and stop loss/trailing stop are all in the pipeline. Please share any other suggestions in the comments!

Features:
  • Set backtesting range, or start forward testing from the current time. Historical Renko charts can lead to repainting, which is avoided by keeping the chart open in your browser and running with real time data.
  • Average protection: only buy if price drops by a certain % below your average price -- can be automatically toggled by market trender if we want to continue buying during an uptrend. This reduces net profit but increases gross profit.
  • Gain protection: only sell if price is a certain % above your average price -- can be automatically toggled by market trender. Wait for larger profits in an uptrend, but sell earlier in a down trend.
  • Minimum percent gain can also be set to a negative value to allow selling at a loss. This is not true stop loss behavior, we still need a sell signal from the indicator. This means we will try to get the best price above your price floor, but in some rare situations we may not sell before the price drops below your price floor.
  • Position plotter: plots average long position price relative to current price.
  • Plot loss level: plots average price - loss %. With pyramiding turned off, this can be used to find out where to set your stop loss.

This script is free to use, just comment or PM for access. It is mainly meant to showcase some new features, and is only safe to use in carefully selected markets such as USDT-BTC.

Stay posted for upcoming scripts with smarter signaling and additional features! If you would like to add these features to your own preferred strategy, please PM me.
Notes de version:
Added the ability to completely turn off buys during a downtrend. If using this you will want to make sure market trender is tuned well (e.g. by increasing smoothing length and lookback length).

This will allow us to buy buy buy during uptrends, but trigger stop loss (to be added) during downtrends and exit the market. When market looks good again, we re-enter. Especially helpful for BTC markets, I would use DCA for USDT-BTC.
Notes de version:
Updated chart preview
Notes de version:
Fixed ability to create alerts.

Set up buy alert like this.

Set up sell alert like this.
Notes de version:
Added true stop loss -- works with and without pyramiding. You can enable alerts to sell if price closes by "Loss Level" % below your average buy price. TV PROTECTION needs to be off to use this feature! We already have TV protection built into the script so it is OK.

When you add the study to the chart, the scale will now be messed up. To fix this, go to Format -> Style -> and uncheck "BUY ALERT," "SELL ALERT," and "STOPLOSS ALERT"

Also, the screenshots in the last update worked but sometimes gave incorrect alerts. Here is a better way to set up the alerts:

Buys imgur.com/Dwd3gRv
Sells imgur.com/u7nDrJk
Stop loss imgur.com/lZ1QNRv
Notes de version:
Added option to disable stop-loss when market is trending up. Thanks for the suggestion @Calvinz!
Notes de version:
Added much-needed RSI filtering for buys!
Script protégé
Ce script est publié en code source fermé et vous pouvez l'utiliser librement. Vous pouvez le préférer pour l'utiliser sur un graphique. Vous ne pouvez pas visualiser ou modifier son code source.
Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?