LeafAlgo

Macro Score - Dem. Fib. McGinley Dynamics

LeafAlgo מעודכן   
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.

The DFMG - Democratic Fibonacci McGinley Dynamic - is a separate indicator that we have released that takes 10 different Fibonacci McGinley Dynamics (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 these dynamic lines alone. Crossovers of the DFMG with the various McGinley 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 is printed in an underlay as a white line that goes between -10 and 10 for this strategy. In addition to the macro score line, a green 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 long and short thresholds for the macro score, defaulted to 5 and -5 respectively.

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”. 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.

Default Properties for AVAX 20M:
DPO - 35 , uncentered
CMO - 25, open
K/D - 3/3
RSI Stoch Length - 3
Stoch Length - 4
Stoch Source - open
JVB Length - 14
JVB Smoothing - 2
DFMG source - close
Macro Length - 14
TP % - 1.5%
TTP % - 0.005%
SL % - 1.8%, no trail
הערות שחרור:
-Added ATR take profit feature
-fixed issue with ATR stop loss not calculating properly
-debugged issue where multiple shorts would open and close simultaneously on one short execution call

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
סקריפט מוגן
סקריפט זה פורסם במקור סגור ותוכל להשתמש בו באופן חופשי. אתה יכול להגדירו כמועדף כדי להשתמש בו בגרף. אינך יכול להציג או לשנות את קוד המקור שלו.
כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.

רוצה להשתמש בסקריפ זה בגרף?