LeafAlgo

LeafAlgo Premium Macro Strategies

LeafAlgo Aktualisiert   
A "macro score", as defined here, is created by giving various weights to different signals and adding them together to get one smooth score. Positive or negative values are assigned to each of the signals depending on if the statement is true or false (e.g. DPO > 0: +1, DPO < 0: -1). This manner of strategy allows for a subset of the available signals to be present at one time as opposed to every technical signal having to be active in order for a long/short signal to trigger.

This strategy contains SIX different macro score strategies -- "Base DFMA", "Base DFMG", "Ichimoku", "TSI", "Donchian DFMA", and "Donchian DFMG". These strategies have the signals and weights pre-determined in the code. The "Base DFMA" strategy is based on our Democratic Fibonacci Moving Average (DFMA) indicator; the "Donchian DFMA" is the same as the base DFMA strategy, but with a signal from our Donchian Cloud Score indicator as added confluence. The "Base DFMG" strategy is based on our Democratic Fibonacci McGinley Dynamics (DFMG) indicator; the "Donchian DFMG" is the same, but with the Donchian Cloud Score as added confluence. The "Ichimoku" strategy is based on the major sub-indicators found within an Ichimoku Cloud in addition to our Donchian Cloud Score. The "TSI" strategy is based on the True Strength Index.

The ability to select your strategy of choice can be found at the top of the strategy settings under "Strategy Options", then in the drop-down menu labeled "Strategy Choice".

The DFMA - Democratic Fibonacci Moving Average - is a separate indicator that we have released that takes 10 different Fibonacci MAs (lengths of 3 to 233, at Fibonacci intervals) and averages them to form the DFMA line. This helps by creating a consensus on the trend based on moving averages alone. Crossovers of the DFMA with the various Fib MA lengths as well as a cross of the price source and these lines can provide adequate long and short signals. In the two DFMA strategies, the heaviest weights have been given to crosses of the DFMA line/Fib MA (233) as well as the crosses of the Fib MA (3)/DFMA. Additionally, there are thresholds for DPO ( Detrended Price Oscillator , above or below 0), CMO ( Chande Momentum Oscillator , above or below 0), Jurik Volatility Bands (above or below 0), and Stoch RSI (above or below 50). These four signals hold a lighter weight than the MA cross signals. The macro score itself ranges between -10 and 10. In addition to the macro score line, a momentum line (sourced by the macro score itself) has been included. A crossover/crossunder of the macro score and the macro momentum line is included into the long/short signal syntax in addition to a threshold for the macro score.

The DFMG - Democratic Fibonacci McGinley Dynamics - is a separate indicator that we have released that takes 10 different Fibonacci McGinley Dynamic liness (lengths of 3 to 233, at Fibonacci intervals) and averages them to form the DFMG line. This helps by creating a consensus on the trend based on moving averages alone. Crossovers of the DFMG with the various Fib MG lengths as well as a cross of the price source and these lines can provide adequate long and short signals. This strategy has the signals and weights pre-determined in the code. Heaviest weights have been given to crosses of the DFMG line/ McGinley (233) as well as the crosses of the McGinley (3)/DFMG. Additionally, there are thresholds for DPO ( Detrended Price Oscillator , above or below 0), CMO ( Chande Momentum Oscillator , above or below 0), Jurik Volatility Bands (above or below 0), and Stoch RSI (above or below 50). These four signals hold a lighter weight than the McGinley cross signals. The macro score itself ranges between -10 and 10. In addition to the macro score line, a momentum line (sourced by the macro score itself) has been included. A crossover/crossunder of the macro score and the macro momentum line is included into the long/short signal syntax in addition to a threshold for the macro score.

For the Ichimoku macro score, five signals were considered and weighted equally:
- Kijun-sen < Ichimoku Source
- Tenkan-sen < Ichimoku Source
- Kijun-sen > Chikou-span
- Tenkan-sen > Kijun-sen
- Senkou Span A > Senkou Span B
In addition to these factors, the Ichimoku strategy utilizes the Donchian Cloud Score in the long and short entry signals. Thus, the Donchian Cloud settings are applicable to this strategy.

For the True Strength Index strategy, the heaviest weights have been given to various TSI signals, including a crossover/crossunder of TSI signal and TSI value, a threshold for the TSI Signal (above or below 0), and a crossover/crossunder of the CMO ( Chande Momentum Oscillator ) and the TSI signal line. Additionally, there are thresholds for DPO ( Detrended Price Oscillator , above or below 0), Jurik Volatility Bands (above or below 0), and Stoch RSI (above or below 50). These three signals hold a lighter weight than the three TSI signals. The macro score itself ranges between -10 and 10. In addition to the macro score line, a momentum line (sourced by the macro score itself) has been included. A crossover/crossunder of the macro score and the macro momentum line is included into the long/short signal syntax in addition to a threshold for the macro score.

The Donchian Cloud Score is derived from a set of 5 Donchian channels (upper, lower, and basis plotted) defaulted to lengths of 25, 50, 100, 150, and 200. A set of conditions associated with the channels aims to determine ranging versus trending markets. Weights are given to these conditions accordingly, then tallied up to determine the "cloud score", ranging between -25 and 25. In general, a ranging market is determined by a cloud score between -10 and 10, while a positive trending market has a score higher than 10 and a negative trending market has a score lower than -10. That said, long and short thresholds similar to the macro score itself are included in the user settings and set to a default of 5 or -5. The cloud score is plotted as a line in the underlay with coloration reflecting ranging or trending markets (green color above the long threshold, gray between the thresholds, and red below the short threshold). The cloud score is incorporated into the strategy syntax for long and short positions in that the score must be above or below the set threshold for a trade to be placed. A breakdown for the Donchian scoring is as follows:
- Broke the 25-length DC (DC(25)) upper band in the previous 3 bars - +1 if true, 0 if false
- Broke the DC(50) upper band in the previous 3 bars - +2 if true, 0 if false
- Broke the DC(100) upper band in the previous 3 bars - +3 if true, 0 if false
- Broke the DC(150) upper band in the previous 3 bars - +4 if true, 0 if false
- Broke the DC(200) upper band in the previous 3 bars - +5 if true, 0 if false

- Broke the DC(25) lower band in the previous 3 bars - -1 if true, 0 if false
- Broke the DC(50) lower band in the previous 3 bars - -2 if true, 0 if false
- Broke the DC(100) lower band in the previous 3 bars - -3 if true, 0 if false
- Broke the DC(150) lower band in the previous 3 bars - -4 if true, 0 if false
- Broke the DC(200) lower band in the previous 3 bars - -5 if true, 0 if false

- DC(25) basis line above the DC(50) basis line - +1 if true, -1 if false
- DC(25) basis line above the DC(100) basis line - +1 if true, -1 if false
- DC(25)basis line above the DC(150) basis line - +1 if true, -1 if false
- DC(25) basis line above the DC(200) basis line - +1 if true, -1 if false
- DC(50) basis line above the DC(100) basis line - +1 if true, -1 if false
- DC(50) basis line above the DC(150) basis line - +1 if true, -1 if false
- DC(50) basis line above the DC(200) basis line - +1 if true, -1 if false
- DC(100) basis line above the DC(150) basis line - +1 if true, -1 if false
- DC(100) basis line above the DC(200) basis line - +1 if true, -1 if false
- DC(150) basis line above the DC(200) basis line - +1 if true, -1 if false

Thresholds for both the respective macro score and the Donchian Cloud score have been included. Entry signals for each strategy require the score to be >= the respective thresholds for longs and <= the respective thresholds for shorts.

Additionally, a normalized z-score has been included. The z-score does not affect the entry and exit signals, however, it is displayed on the chart in the form of bar coloration. The z-score has been normalized to a range of -1 to +1. A z-score under -0.60 is displayed as a red bar color, a score between -0.60 and -0.2 is displayed as an orange bar color, a score between -0.2 and 0.2 is displayed as a gray bar color, a score between 0.2 and 0.6 is displayed as a lime bar color, and a score over 0.6 is displayed in green.

Data for each respective strategy will be displayed in an overlaid table. This includes the factors that comprise the macro score of choice, the values of each signal that adds up to the macro score, the macro score itself, the value of the momentum line of the macro score, the normalized z-score value, and the Donchian Cloud score (if applicable). Green coloration notes bullish sentiment within the signals or values, gray coloration is neutral, and red coloration notes bearish sentiment.

Take profit, stop loss, and trailing percentages are also included, found at the bottom of the Input tab under “TT and TTP” as well as “Stop Loss”. The take profit and stop loss levels will be reflected as green and red lines respectively on the chart as they occur. Make sure to understand the TP/SL ratio that you desire before use, as the desired hit rate/profitability percentage will be affected accordingly. The option for adding in a trailing stop has also been included, with options to choose between an ATR-based trail or a percentage-based trail. This strategy does NOT guarantee future returns. Apply caution in trading regardless of discretionary or algorithmic. Understand the concepts of risk/reward and the intricacies of each strategy choice before utilizing them in your personal trading.

Profitview/Pineconnector Settings:
If you wish to utilize Profitview’s automation system, find the included “Profitview Settings” under the Input tab of the strategy settings menu. If not, skip this section entirely as it can be left blank. Options will be “OPEN LONG TITLE”, “OPEN SHORT TITLE”, “CLOSE LONG TITLE”, and “CLOSE SHORT TITLE”. If you wished to trade SOL, for example, you would put “SOL LONG”, “SOL SHORT”, “SOL CLOSE LONG”, and “SOL CLOSE SHORT” in these areas. Within your Profitview extension, ensure that your Alerts all match these titles. To set an alert for use with Profitview, go to the “Alerts” tab in TradingView, then create an alert. Make sure that your desired asset and timeframe are currently displayed on your screen when creating the alert. Under the “Condition” option of the alert, select the strategy, then select the expiration time. If using TradingView Premium, this can be open-ended. Otherwise, select your desired expiration time and date. This can be updated whenever desired to ensure the strategy does not expire. Under “Alert actions”, nothing necessarily needs to be selected unless so desired. Leave the “Alert name” option empty. For the “Message”, delete the generated message and replace it with {{strategy.order.alert_message}} and nothing else. If using Pineconnector, follow the same directions for setting up an alert, but use the ",buy,,risk=" syntax as noted in the tooltips.

Versionshinweise:
Introduced another type of macro strategy - 'Triple Quadratic Regression'. This is based on our standalone indicator of the same name. It takes into account three quadratic regression lines of differing length and applies a strategy with similarities to a triple moving average strategy. The score is based on the source being above or below each of the three lines, the three lines being above or below each other, and if the Ax^2 value is positive or negative. For additional confluence, the Donchian Cloud Score has been utilized (the Cloud Score up and down thresholds are in effect here). These values are portrayed in a table setting the same as the other strategies. As this macro strategy takes nine points into account as opposed to five or six, it could be beneficial to use a slightly lower macro score threshold to increase trade frequency.

Take your trading to new heights with LeafAlgo Premium Indicators and Strategies. Use code SSMS4MGK at checkout for a 50% discount on your first purchase at www.LeafAlgo.com !

Join our Discord community today!
www.discord.gg/rNQ2QW59Pn
Skript nur auf Einladung

Der Zugriff auf dieses Skript ist auf vom Autor autorisierte User beschränkt und normalerweise kostenpflichtig. Sie können es zu Ihren Favoriten hinzufügen, aber Sie können es nur verwenden, nachdem Sie die Erlaubnis angefordert und vom Autor erhalten haben. Kontaktieren Sie LeafAlgo für weitere Informationen oder folgen Sie den Anweisungen des Autors unten.

TradingView rät davon ab, für ein Skript zu bezahlen und es zu verwenden, bis Sie dem Autor zu 100% vertrauen und verstehen wie das Skript funktioniert. In vielen Fällen können Sie eine gute Open-Source-Alternative kostenlos in unserer öffentlichen Bibliothek finden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Hinweise des Autors

Message directly through TradingView or via email at thubbard@plantfi.io

Möchten Sie dieses Skript auf einem Chart verwenden?

Warnung: Bitte lesen Sie dies, bevor Sie Zugriff anfordern.