Automated Trading Guide for Daily Edge Strategies

Updated: Oct 24, 2020

The RSI-ATR DIVINE™ Strategy (and soon the RSI-Renko DIVINE™ Strategy) was recently updated to support the Dynamic Alert feature that was introduced in October, 2019. This feature is a long time coming and a complete game changer for a variety of reasons. The dynamic alert feature allows the injection of global variables and plot output variables directly into the alert message for a given study (and someday a strategy). This creates the mechanism to get data out of Trading View and into an exchange for order executions.

RSI-ATR DIVINE Strategy - Alertatron Guide


This guide instructs the subscriber of the strategy how to use the Alertatron bot to automate the trades.

Entry Order Types (To get into trades)

  • Stop-Limit (for swing and target trades)

  • Limit (for scalps)

Exit Order Types (To get out of trades)

  • Stop (for swings)

  • Limit (for targets)

Initial Long/Short Building


This trade alert is for the very first long/short after the Major ATR Trend direction changes to positive/negative. It is the trade that will execute the Swing, Target 1, and Target 2 trades (if desired). The long/short swing trade will only execute on this alert.














The initial long in the example above is triggered when after an RSI oversold condition occurs, and then the high of any subsequent candle breaks the high of a the previous candle by at least 1 tick/pip. It is marked by a larger arrow. To enter into a long or short trade apply this alert to the study (The study version of the strategy is for alerts only):














It is important that "once per bar close" is used so that the RSI oversold condition is confirmed by the candle before the order is submitted.


The alert message:


myApiKeys(XBTUSD){

# swing

limit(side=buy, position=20%,

offset=@{{plot("SwingORTarget-Stop-Limit-Order")}});


# target 1

limit(side=buy, position=15%,

offset=@{{plot("SwingORTarget-Stop-Limit-Order")}});


# target 2

limit(side=buy, position=15%,

offset=@{{plot("SwingORTarget-Stop-Limit-Order")}});

}

Notes:

  • It is important to always use "position=XXX" or "position=YYY%" for a long so that if this trade is closing out an existing short position by entering long, the desired position direction and quantity is achieved upon the long executed.

  • The {{plot("SwingORTarget-Stop-Limit-Order")}} is the mechanism to extract the stop-limit value for the long from Trading View. The value is injected into this placeholder when the alert fires. The @ symbol assures that this stop-limit order is executed AT the desired price.

  • Three separate orders are generated for the Swing, Target 1, and Target 2 trades. Depending on the settings of the strategy used for back testing, you may not execute all of these trades. Only include the trade types in the message that mirror the strategy settings used in Trading View.

  • When using the strategy version of the script, these three orders are executed separately, each with its own desired quantity or percent. For example, if the strategy settings were 20% Swing, 15% Target 1, and 15% Target 2.

  • Inline comments using "#" can be used in the message

  • The webhook URL is the special URL for each alertatron account holder.

  • See more here.

Pyramid Long/Short Building


This trade alert is for subsequent long/short after the initial long/short. It is the trade that will execute pyramid Target 1 and Target 2 trades (if desired).