Fourier For Loop [BackQuant]Fourier For Loop
PLEASE Read the following, as understanding an indicator's functionality is essential before integrating it into a trading strategy. Knowing the core logic behind each tool allows for a sound and strategic approach to trading.
Introducing BackQuant's Fourier For Loop (FFL) — a cutting-edge trading indicator that combines Fourier transforms with a for-loop scoring mechanism. This innovative approach leverages mathematical precision to extract trends and reversals in the market, helping traders make informed decisions. Let's break down the components, rationale, and potential use-cases of this indicator.
Understanding Fourier Transform in Trading
The Fourier Transform decomposes price movements into their frequency components, allowing for a detailed analysis of cyclical behavior in the market. By transforming the price data from the time domain into the frequency domain, this indicator identifies underlying patterns that traditional methods may overlook.
In this script, Fourier transforms are applied to the specified calculation source (defaulted to HLC3). The transformation yields magnitude values that can be used to score market movements over a defined range. This scoring process helps uncover long and short signals based on relative strength and trend direction.
Why Use Fourier Transforms?
Fourier Transforms excel in identifying recurring cycles and smoothing noisy data, making them ideal for fast-paced markets where price movements may be erratic. They also provide a unique perspective on market volatility, offering traders additional insights beyond standard indicators.
Calculation Logic: For-Loop Scoring Mechanism
The For Loop Scoring mechanism compares the magnitude of each transformed point in the series, summing the results to generate a score. This score forms the backbone of the signal generation system.
Long Signals: Generated when the score surpasses the defined long threshold (default set at 40). This indicates a strong bullish trend, signaling potential upward momentum.
Short Signals: Triggered when the score crosses under the short threshold (default set at -10). This suggests a bearish trend or potential downside risk.'
Thresholds & Customization
The indicator offers customizable settings to fit various trading styles:
Calculation Periods: Control how many periods the Fourier transform covers.
Long/Short Thresholds: Adjust the sensitivity of the signals to match different timeframes or risk preferences.
Visualization Options: Traders can visualize the thresholds, change the color of bars based on trend direction, and even color the background for enhanced clarity.
Trading Applications
This Fourier For Loop indicator is designed to be versatile across various market conditions and timeframes. Some of its key use-cases include:
Cycle Detection: Fourier transforms help identify recurring patterns or cycles, giving traders a head-start on market direction.
Trend Following: The for-loop scoring system helps confirm the strength of trends, allowing traders to enter positions with greater confidence.
Risk Management: With clearly defined long and short signals, traders can manage their positions effectively, minimizing exposure to false signals.
Final Note
Incorporating this indicator into your trading strategy adds a layer of mathematical precision to traditional technical analysis. Be sure to adjust the calculation start/end points and thresholds to match your specific trading style, and remember that no indicator guarantees success. Always backtest thoroughly and integrate the Fourier For Loop into a balanced trading system.
Thus following all of the key points here are some sample backtests on the 1D Chart
Disclaimer: Backtests are based off past results, and are not indicative of the future .
INDEX:BTCUSD
INDEX:ETHUSD
BINANCE:SOLUSD
Backtest
Interest Rate Trading (Manually Added Rate Decisions) [TANHEF]Interest Rate Trading: How Interest Rates Can Guide Your Next Move.
How were interest rate decisions added?
All interest rate decision dates were manually retrieved from the 'Record of Policy Actions' and 'Minutes of Actions' on the Federal Reserve's website due to inconsistent dates from other sources. These were manually added as Pine Script currently only identifies rate changes, not pauses.
█ Simple Explanation:
This script is designed for analyzing and backtesting trading strategies based on U.S. interest rate decisions which occur during Federal Open Market Committee (FOMC) meetings, to make trading decisions. No trading strategy is perfect, and it's important to understand that expectations won't always play out. The script leverages historical interest rate changes, including increases, decreases, and pauses, across multiple economic time periods from 1971 to the present. The tool integrates two key data sources for interest rates—USINTR and FEDFUNDS—to support decision-making around rate-based trades. The focus is on identifying opportunities and tracking trades driven by interest rate movements.
█ Interest Rate Decision Sources:
As noted above, each decision date has been manually added from the 'Record of Policy Actions' and 'Minutes of Actions' documents on the Federal Reserve's website. This includes +50 years of more than 600 rate decisions.
█ Interest Rate Data Sources:
USINTR: Reflects broader U.S. interest rate trends, including Treasury yields and various benchmarks. This is the preferred option as it corresponds well to the rate decision dates.
FEDFUNDS: Tracks the Federal Funds Rate, which is a more specific rate targeted by the Federal Reserve. This does not change on the exact same days as the rate decisions that occur at FOMC meetings.
█ Trade Criteria:
A variety of trading conditions are predefined to suit different trading strategies. These conditions include:
Increase/Decrease: Standard rate increases or decreases.
Double/Triple Increase/Decrease: A series of consecutive changes.
Aggressive Increase/Decrease: Rate changes that exceed recent movements.
Pause: Identification of no changes (pauses) between rate decisions, including double or triple pauses.
Complex Patterns: Combinations of pauses, increases, or decreases, such as "Pause after Increase" or "Pause or Increase."
█ Trade Execution and Exit:
The script allows automated trade execution based on selected criteria:
Auto-Entry: Option to enter trades automatically at the first valid period.
Max Trade Duration: Optional exit of trades after a specified number of bars (candles).
Pause Days: Minimum duration (in days) to validate rate pauses as entry conditions. This is especially useful for earlier periods (prior to the 2000s), where rate decisions often seemed random compared to the consistency we see today.
█ Visualization:
Several visual elements enhance the backtesting experience:
Time Period Highlighting: Economic time periods are visually segmented on the chart, each with a unique color. These periods include historical phases such as "Stagflation (1971-1982)" and "Post-Pandemic Recovery (2021-Present)".
Trade and Holding Results: Displays the profit and loss of trades and holding results directly on the chart.
Interest Rate Plot: Plots the interest rate movements on the chart, allowing for real-time tracking of rate changes.
Trade Status: Highlights active long or short positions on the chart.
█ Statistics and Criteria Display:
Stats Table: Summarizes trade results, including wins, losses, and draw percentages for both long and short trades.
Criteria Table: Lists the selected entry and exit criteria for both long and short positions.
█ Economic Time Periods:
The script organizes interest rate decisions into well-defined economic periods, allowing traders to backtest strategies specific to historical contexts like:
(1971-1982) Stagflation
(1983-1990) Reaganomics and Deregulation
(1991-1994) Early 1990s (Recession and Recovery)
(1995-2001) Dot-Com Bubble
(2001-2006) Housing Boom
(2007-2009) Global Financial Crisis
(2009-2015) Great Recession Recovery
(2015-2019) Normalization Period
(2019-2021) COVID-19 Pandemic
(2021-Present) Post-Pandemic Recovery
█ User-Configurable Inputs:
Rate Source Selection: Choose between USINTR or FEDFUNDS as the primary interest rate source.
Trade Criteria Customization: Users can select the criteria for long and short trades, specifying when to enter or exit based on changes in the interest rate.
Time Period: Select the time period that you want to isolate testing a strategy with.
Auto-Entry and Pause Settings: Options to automatically enter trades and specify the number of days to confirm a rate pause.
Max Trade Duration: Limits how long trades can remain open, defined by the number of bars.
█ Trade Logic:
The script manages entries and exits for both long and short trades. It calculates the profit or loss percentage based on the entry and exit prices. The script tracks ongoing trades, dynamically updating the profit or loss as price changes.
█ Examples:
One of the most popular opinions is that when rate starts begin you should sell, then buy back in when rate cuts stop dropping. However, this can be easily proven to be a difficult task. Predicting the end of a rate cut is very difficult to do with the the exception that assumes rates will not fall below 0.25%.
2001-2009
Trade Result: +29.85%
Holding Result: -27.74%
1971-2024
Trade Result: +533%
Holding Result: +5901%
█ Backtest and Real-Time Use:
This backtester is useful for historical analysis and real-time trading. By setting up various entry and exit rules tied to interest rate movements, traders can test and refine strategies based on real historical data and rate decision trends.
This powerful tool allows traders to customize strategies, backtest them through different economic periods, and get visual feedback on their trading performance, helping to make more informed decisions based on interest rate dynamics. The main goal of this indicator is to challenge the belief that future events must mirror the 2001 and 2007 rate cuts. If everyone expects something to happen, it usually doesn’t.
Descriptive Backtesting Framework (DBF)As the name suggests, this is a backtesting framework made to offer full backtesting functionality to any custom indicator in a visually descriptive way.
Any trade taken will be very clear to visualize on the chart and the equity line will be updated live allowing us to use the REPLAY feature to view the strategy performing in real time.
Stops and Targets will also get draw on the chart with labels and tooltips and there will be a table on the top right corner displaying lots of descriptive metrics to measure your strategy's performance.
IF YOU DECIDE TO USE THIS FRAMEWORK, PLEASE READ **EVERYTHING** BELOW
HOW TO USE IT
Step 1 - Insert Your Strategy Indicators:
Inside this framework's code, right at the beginning, you will find a dedicated section where you can manually insert any set of indicators you desire.
Just replace the example code in there with your own strategy indicators.
Step 2 - Specify The Conditions To Take Trades:
After that, there will be another section where you need to specify your strategy's conditions to enter and exit trades.
When met, those conditions will fire the trading signals to the trading engine inside the framework.
If you don't wish to use some of the available signals, please just assign false to the signal.
DO NOT DELETE THE SIGNAL VARIABLES
Step 3 - Specify Entry/Exit Prices, Stops & Targets:
Finally you'll reach the last section where you'll be able to specify entry/exit prices as well as add stops and targets.
On most cases, it's easier and more reliable to just use the close price to enter and exit trades.
If you decide to use the open price instead, please remember to change step 2 so that trades are taken on the open price of the next candle and not the present one to avoid the look ahead bias.
Stops and targets can be set in any way you want.
Also, please don't forget to update the spread. If your broker uses commissions instead of spreads or a combination of both, you'll need to manually incorporate those costs in this step.
And that's it! That's all you have to do.
Below this section you'll now see a sign warning you about not making any changes to the code below.
From here on, the framework will take care of executing the trades and calculating the performance metrics for you and making sure all calculations are consistent.
VISUAL FEATURES:
Price candles get painted according to the current trade.
They will be blue during long trades, purple on shorts and white when no trade is on.
When the framework receives the signals to start or close a trade, it will display those signals as shapes on the upper and lower limits of the chart:
DIAMOND: represents a signal to open a trade, the trade direction is represented by the shape's color;
CROSS: means a stop loss was triggered;
FLAG: means a take profit was triggered;
CIRCLE: means an exit trade signal was fired;
Hovering the mouse over the trade labels will reveal:
Asset Quantity;
Entry/Exit Prices;
Stops & Targets;
Trade Profit;
Profit As Percentage Of Trade Volume;
**Please note that there's a limit as to how many labels can be drawn on the chart at once.**
If you which to see labels from the beginning of the chart, you'll probably need to use the replay feature.
PERFORMANCE TABLE:
The performance table displays several performance metrics to evaluate the strategy.
All the performance metrics here are calculated by the framework. It does not uses the oficial pine script strategy tester.
All metrics are calculated in real time. If using the replay feature, they will be updated up to the last played bar.
Here are the available metrics and their definition:
INITIAL EQUITY: the initial amount of money we had when the strategy started, obviously...;
CURRENT EQUITY: the amount of money we have now. If using the replay feature, it will show the current equity up to the last bar played. The number on it's right side shows how many times our equity has been multiplied from it's initial value;
TRADE COUNT: how many trades were taken;
WIN COUNT: how many of those trades were wins. The percentage at the right side is the strategy WIN RATE;
AVG GAIN PER TRADE: the average percentage gain per trade. Very small values can indicate a fragile strategy that can behave in unexpected ways under high volatility conditions;
AVG GAIN PER WIN: the average percentage gain of trades that were profitable;
AVG GAIN PER LOSS: the average percentage loss on trades that were not profitable;
EQUITY MAX DD: the maximum drawdown experienced by our equity during the entire strategy backtest;
TRADE MAX DD: the maximum drawdown experienced by our equity after one single trade;
AVG MONTHLY RETURN: the compound monthly return that our strategy was able to create during the backtested period;
AVG ANNUAL RETURN: this is the strategy's CAGR (compound annual growth rate);
ELAPSED MONTHS: number of months since the backtest started;
RISK/REWARD RATIO: shows how profitable the strategy is for the amount of risk it takes. Values above 1 are very good (and rare). This is calculated as follows: (Avg Annual Return) / mod(Equity Max DD). Where mod() is the same as math.abs();
AVAILABLE SETTINGS:
SPREAD: specify your broker's asset spread
ENABLE LONGS / SHORTS: you can keep both enable or chose to take trades in only one direction
MINIMUM BARS CLOSED: to avoid trading before indicators such as a slow moving average have had time to populate, you can manually set the number of bars to wait before allowing trades.
INITIAL EQUITY: you can specify your starting equity
EXPOSURE: is the percentage of equity you wish to risk per trade. When using stops, the strategy will automatically calculate your position size to match the exposure with the stop distance. If you are not using stops then your trade volume will be the percentage of equity specified here. 100 means you'll enter trades with all your equity and 200 means you'll use a 2x leverage.
MAX LEVERAGE ALLOWED: In some situations a short stop distance can create huge levels of leverage. If you want to limit leverage to a maximum value you can set it here.
SEVERAL PLOTTING OPTIONS: You'll be able to specify which of the framework visuals you wish to see drawn on the chart.
FRAMEWORK **LIMITATIONS**:
When stop and target are both triggered in the same candle, this framework isn't able to enter faster timeframes to check which one was triggered first, so it will take the pessimistic assumption and annul the take profit signal;
This framework doesn't support pyramiding;
This framework doesn't support both long and short positions to be active at the same time. So for example, if a short signal is received while a long trade is open, the framework will close the long trade and then open a short trade;
FINAL CONSIDERATIONS:
I've been using this framework for a good time and I find it's better to use and easier to analyze a strategy's performance then relying on the oficial pine script strategy tester. However, I CANNOT GUARANTEE IT TO BE BUG FREE.
**PLEASE PERFORM A MANUAL BACKTEST BEFORE USING ANY STRATEGY WITH REAL MONEY**
Filtered MACD with Backtest [UAlgo]The "Filtered MACD with Backtest " indicator is an advanced trading tool designed for the TradingView platform. It combines the Moving Average Convergence Divergence (MACD) with additional filters such as Moving Average (MA) and Average Directional Index (ADX) to enhance trading signals. This indicator aims to provide more reliable entry and exit points by filtering out noise and confirming trends. Additionally, it includes a comprehensive backtesting module to simulate trading strategies and assess their performance based on historical data. The visual backtest module allows traders to see potential trades directly on the chart, making it easier to evaluate the effectiveness of the strategy.
🔶 Customizable Parameters :
Price Source Selection: Users can choose their preferred price source for calculations, providing flexibility in analysis.
Filter Parameters:
MA Filter: Option to use a Moving Average filter with types such as EMA, SMA, WMA, RMA, and VWMA, and a customizable length.
ADX Filter: Option to use an ADX filter with adjustable length and threshold to determine trend strength.
MACD Parameters: Customizable fast length, slow length, and signal smoothing for the MACD indicator.
Backtest Module:
Entry Type: Supports "Buy and Sell", "Buy", and "Sell" strategies.
Stop Loss Types: Choose from ATR-based, fixed point, or X bar high/low stop loss methods.
Reward to Risk Ratio: Set the desired take profit level relative to the stop loss.
Backtest Visuals: Display entry, stop loss, and take profit levels directly on the chart with
colored backgrounds.
Alerts: Configurable alerts for buy and sell signals.
🔶 Filtered MACD : Understanding How Filters Work with ADX and MA
ADX Filter:
The Average Directional Index (ADX) measures the strength of a trend. The script calculates ADX using the user-defined length and applies a threshold value.
Trading Signals with ADX Filter:
Buy Signal: A regular MACD buy signal (crossover of MACD line above the signal line) is only considered valid if the ADX is above the set threshold. This suggests a stronger uptrend to potentially capitalize on.
Sell Signal: Conversely, a regular MACD sell signal (crossunder of MACD line below the signal line) is only considered valid if the ADX is above the threshold, indicating a stronger downtrend for potential shorting opportunities.
Benefits: The ADX filter helps avoid whipsaws or false signals that might occur during choppy market conditions with weak trends.
MA Filter:
You can choose from various Moving Average (MA) types (EMA, SMA, WMA, RMA, VWMA) for the filter. The script calculates the chosen MA based on the user-defined length.
Trading Signals with MA Filter:
Buy Signal: A regular MACD buy signal is only considered valid if the closing price is above the MA value. This suggests a potential uptrend confirmed by the price action staying above the moving average.
Sell Signal: Conversely, a regular MACD sell signal is only considered valid if the closing price is below the MA value. This suggests a potential downtrend confirmed by the price action staying below the moving average.
Benefits: The MA filter helps identify potential trend continuation opportunities by ensuring the price aligns with the chosen moving average direction.
Combining Filters:
You can choose to use either the ADX filter, the MA filter, or both depending on your strategy preference. Using both filters adds an extra layer of confirmation for your signals.
🔶 Backtesting Module
The backtesting module in this script allows you to visually assess how the filtered MACD strategy would have performed on historical data. Here's a deeper dive into its features:
Backtesting Type: You can choose to backtest for buy signals only, sell signals only, or both. This allows you to analyze the strategy's effectiveness in different market conditions.
Stop-Loss Types: You can define how stop-loss orders are placed:
ATR (Average True Range): This uses a volatility measure (ATR) multiplied by a user-defined factor to set the stop-loss level.
Fixed Point: This allows you to specify a fixed dollar amount or percentage value as the stop-loss.
X bar High/Low: This sets the stop-loss at a certain number of bars (defined by the user) above/below the bar's high (for long positions) or low (for short positions).
Reward-to-Risk Ratio: Define the desired ratio between your potential profit and potential loss on each trade. The backtesting module will calculate take-profit levels based on this ratio and the stop-loss placement.
🔶 Disclaimer:
Use with Caution: This indicator is provided for educational and informational purposes only and should not be considered as financial advice. Users should exercise caution and perform their own analysis before making trading decisions based on the indicator's signals.
Not Financial Advice: The information provided by this indicator does not constitute financial advice, and the creator (UAlgo) shall not be held responsible for any trading losses incurred as a result of using this indicator.
Backtesting Recommended: Traders are encouraged to backtest the indicator thoroughly on historical data before using it in live trading to assess its performance and suitability for their trading strategies.
Risk Management: Trading involves inherent risks, and users should implement proper risk management strategies, including but not limited to stop-loss orders and position sizing, to mitigate potential losses.
No Guarantees: The accuracy and reliability of the indicator's signals cannot be guaranteed, as they are based on historical price data and past performance may not be indicative of future results.
MetaFOX DCA (ASAP-RSI-BB%B-TV)Welcome To ' MetaFOX DCA (ASAP-RSI-BB%B-TV) ' Indicator.
This is not a Buy/Sell signals indicator, this is an indicator to help you create your own strategy using a variety of technical analyzing options within the indicator settings with the ability to do DCA (Dollar Cost Average) with up to 100 safety orders.
It is important when backtesting to get a real results, but this is impossible, especially when the time frame is large, because we don't know the real price action inside each candle, as we don't know whether the price reached the high or low first. but what I can say is that I present to you a backtest results in the worst possible case, meaning that if the same chart is repeated during the next period and you traded for the same period and with the same settings, the real results will be either identical to the results in the indicator or better (not worst). There will be no other factors except the slippage in the price when executing orders in the real trading, So I created a feature for that to increase the accuracy rate of the results. For more information, read this description.
Below I will explain all the properties and settings of the indicator:
A) 'Buy Strategies' Section: Your choices of strategies to Start a new trade: (All the conditions works as (And) not (OR), You have to choose one at least and you can choose more than one).
- 'ASAP (New Candle)': Start a trade as soon as possible at the opening of a new candle after exiting the previous trade.
- 'RSI': Using RSI as a technical analysis condition to start a trade.
- 'BB %B': Using BB %B as a technical analysis condition to start a trade.
- 'TV': Using tradingview crypto screener as a technical analysis condition to start a trade.
B) 'Exit Strategies' Section: Your choices of strategies to Exit the trades: (All the conditions works as (And) not (OR), You can choose more than one, But if you don't want to use any of them you have to activate the 'Use TP:' at least).
- 'ASAP (New Candle)': Exit a trade as soon as possible at the opening of a new candle after opening the previous trade.
- 'RSI': Using RSI as a technical analysis condition to exit a trade.
- 'BB %B': Using BB %B as a technical analysis condition to exit a trade.
- 'TV': Using tradingview crypto screener as a technical analysis condition to exit a trade.
C) 'Main Settings' Section:
- 'Trading Fees %': The Exchange trading fees in percentage (trading Commission).
- 'Entry Price Slippage %': Since real trading differs from backtest calculations, while in backtest results are calculated based on the open price of the candle, but in real trading there is a slippage from the open price of the candle resulting from the supply and demand in the real time trading, so this feature is to determine the slippage Which you think it is appropriate, then the entry prices of the trades will calculated higher than the open price of the start candle by the percentage of slippage that you set. If you don't want to calculate any slippage, just set it to zero, but I don't recommend that if you want the most realistic results.
Note: If (open price + slippage) is higher than the high of the candle then don't worry, I've kept this in consideration.
- 'Use SL': Activate to use stop loss percentage.
- 'SL %': Stop loss percentage.
- 'SL settings options box':
'SL From Base Price': Calculate the SL from the base order price (from the trade first entry price).
'SL From Avg. Price': Calculate the SL from the average price in case you use safety orders.
'SL From Last SO.': Calculate the SL from the last (lowest) safety order deviation.
ex: If you choose 'SL From Avg. Price' and SL% is 5, then the SL will be lower than the average price by 5% (in this case your SL will be dynamic until the price reaches all the safety orders unlike the other two SL options).
Note: This indicator programmed to be compatible with '3COMMAS' platform, but I added more options that came to my mind.
'3COMMAS' DCA bots uses 'SL From Base Price'.
- 'Use TP': Activate to use take profit percentage.
- 'TP %': Take profit percentage.
- 'Pure TP,SL': This feature was created due to the differences in the method of calculations between API tools trading platforms:
If the feature is not activated and (for example) the TP is 5%, this means that the price must move upward by only 5%, but you will not achieve a net profit of 5% due to the trading fees. but If the feature is activated, this means that you will get a net profit of 5%, and this means that the price must move upward by (5% for the TP + the equivalent of trading fees). The same idea is applied to the SL.
Note: '3COMMAS' DCA bots uses activated 'Pure TP,SL'.
- 'SO. Price Deviation %': Determines the decline percentage for the first safety order from the trade start entry price.
- 'SO. Step Scale': Determines the deviation multiplier for the safety orders.
Note: I'm using the same method of calculations for SO. (safety orders) levels that '3COMMAS' platform is using. If there is any difference between the '3COMMAS' calculations and the platform that you are using, please let me know.
'3COMMAS' DCA bots minimum 'SO. Price Deviation %' is (0.21)
'3COMMAS' DCA bots minimum 'SO. Step Scale' is (0.1)
- 'SO. Volume Scale': Determines the base order size multiplier for the safety orders sizes.
ex: If you used 10$ to buy at the trade start (base order size) and your 'SO. Volume Scale' is 2, then the 1st SO. size will be 20, the 2nd SO. size will be 40 and so on.
- 'SO. Count': Determines the number of safety orders that you want. If you want to trade without safety orders set it to zero.
'3COMMAS' DCA bots minimum 'SO. Volume Scale' is (0.1)
- 'Exchange Min. Size': The exchange minimum size per trade, It's important to prevent you from setting the base order Size less than the exchange limit. It's also important for the backtest results calculations.
ex: If you setup your strategy settings and it led to a loss to the point that you can't trade any more due to insufficient funds and your base order size share from the strategy becomes less than the exchange minimum trade size, then the indicator will show you a warning and will show you the point where you stopped the trading (It works in compatible with the initial capital). I recommend to set it a little bit higher than the real exchange minimum trade size especially if you trade without safety orders to not stuck in the trade if you hit the stop loss
- 'BO. Size': The base order size (funds you use at the trade entry).
- 'Initial Capital': The total funds allocated for trading using your strategy settings, It can be more than what is required in the strategy to cover the deficit in case of a loss, but it should not exceed the funds that you actually have for trading using this strategy settings, It's important to prevent you from setting up a strategy which requires funds more than what you have. It's also has other important benefits (refer to 'Exchange Min. Size' for more information).
- 'Accumulative Results': This feature is also called re-invest profits & risk reduction. If it's not activated then you will use the same funds size in each new trade whether you are in profit or loss till the (initial capitals + net results) turns insufficient. If it's activated then you will reuse your profits and losses in each new trade.
ex: The feature is active and your first trade ended with a net profit of 1000$, the next trade will add the 1000$ to the trade funds size and it will be distributed as a percentage to the BO. & SO.s according to your strategy settings. The same idea in case of a loss, the trade funds size will be reduced.
D) 'RSI Strategy' Section:
- 'Buy': RSI technical condition to start a trade. Has no effect if you don't choose 'RSI' option in 'Buy Strategies'.
- 'Exit': RSI technical condition to exit a trade. Has no effect if you don't choose 'RSI' option in 'Exit Strategies'.
E) 'TV Strategy' Section:
- 'Buy': TradingView Crypto Screener technical condition to start a trade. Has no effect if you don't choose 'TV' option in 'Buy Strategies'.
- 'Exit': TradingView Crypto Screener technical condition to exit a trade. Has no effect if you don't choose 'TV' option in 'Exit Strategies'.
F) 'BB %B Strategy' Section:
- 'Buy': BB %B technical condition to start a trade. Has no effect if you don't choose 'BB %B' option in 'Buy Strategies'.
- 'Exit': BB %B technical condition to exit a trade. Has no effect if you don't choose 'BB %B' option in 'Exit Strategies'.
G) 'Plot' Section:
- 'Signals': Plots buy and exit signals.
- 'BO': Plots the trade entry price (base order price).
- 'AVG': Plots the trade average price.
- 'AVG options box': Your choice to plot the trade average price type:
'Avg. With Fees': The trade average price including the trading fees, If you exit the trade at this price the trade net profit will be 0.00
'Avg. Without Fees': The trade average price but not including the trading fees, If you exit the trade at this price the trade net profit will be a loss equivalent to the trading fees.
- 'TP': Plots the trade take profit price.
- 'SL': Plots the trade stop loss price.
- 'Last SO': Plots the trade last safety order that the price reached.
- 'Exit Price': Plots a mark on the trade exit price, It plots in 3 colors as below:
Red (Default): Trade exit at a loss.
Green (Default): Trade exit at a profit.
Yellow (Default): Trade exit at a profit but this is a special case where we have to calculate the profits before reaching the safety orders (if any) on that candle (compatible with the idea of getting strategy results at the worst case).
- 'Result Table': Plots your strategy result table. The net profit percentage shown is a percentage of the 'initial capital'.
- 'TA Values': Plots your used strategies Technical analysis values. (Green cells means valid condition).
- 'Help Table': Plots a table to help you discover 100 safety orders with its deviations and the total funds needed for your strategy settings. Deviations shown in red is impossible to use because its price is <= 0.00
- 'Portfolio Chart': Plots your Portfolio status during the entire trading period in addition to the highest and lowest level reached. It's important when evaluating any strategy not only to look at the final result, but also to look at the change in results over the entire trading period. Perhaps the results were worryingly negative at some point before they rose again and made a profit. This feature helps you to see the whole picture.
- 'Welcome Message': Plots a welcome message and showing you the idea behind this indicator.
- 'Green Net Profit %': It plots the 'Net Profit %' in the result table in green color if the result is equal to or above the value that you entered.
- 'Green Win Rate %': It plots the 'Win Rate %' in the result table in green color if the result is equal to or above the value that you entered.
- 'User Notes Area': An empty text area, Feel free to use this area to write your notes so you don't forget them.
The indicator will take care of you. In some cases, warning messages will appear for you. Read them carefully, as they mean that you have done an illogical error in the indicator settings. Also, the indicator will sometimes stop working for the same reason mentioned above. If that happens then click on the red (!) next to the indicator name and read the message to find out what illogical error you have done.
Please enjoy the indicator and let me know your thoughts in the comments below.
GKD-BT Optimizer SCSC Backtest [Loxx]The Giga Kaleidoscope GKD-BT Optimizer SCSC Backtest (Solo Confirmation Super Complex) is a Backtest module included in AlgxTrading's "Giga Kaleidoscope Modularized Trading System." (see the section Giga Kaleidoscope (GKD) Modularized Trading System below for an explanation of the GKD trading system)
**the backtest data rendered to the chart above and all screenshots below use $5 commission per trade and 10% equity per trade with $1 million initial capital**
█ GKD-BT Optimizer SCSC Backtest
The GKD-BT Optimizer SCSC Backtest is a comprehensive backtesting module designed to optimize the combination of key GKD indicators within AlgxTrading's "Giga Kaleidoscope Modularized Trading System." This module facilitates precise strategy refinement by allowing traders to configure and optimize the following critical GKD indicators:
GKD-B Baseline
GKD-V Volatility/Volume
GKD-C Confirmation 1
GKD-C Continuation
Each indicator is equipped with an "Optimizer" mode, enabling dynamic feedback and iterative improvements directly into the backtesting environment. This integrated approach ensures that each component contributes effectively to the overall strategy, providing a robust framework for achieving optimized trading outcomes.
The GKD-BT Optimizer supports granular test configurations including a single take profit and stop loss setting, and allows for targeted testing within specified date ranges to simulate forward testing with historical data. This feature is essential for evaluating the resilience and effectiveness of trading strategies under various market conditions.
Furthermore, the module is designed with user-centric features such as:
Customizable Trading Panel: Displays critical backtest results and trade statistics, which can be shown or hidden as per user preference.
Highlighting Thresholds: Users can set thresholds for Total Percent Wins, Percent Profitable, and Profit Factor, which helps in quickly identifying the most relevant metrics for analysis.
The detailed setup ensures that traders can not only adjust their strategies based on historical performance but also fine-tune their approach to meet specific trading objectives.
🔶 To configure this indicator: ***all GKD indicators listed below are all included in the AlgxTrading trading system package***
1. Add GKD-C Confirmation, GKD-B Baseline, GKD-V Volatility/Volume, and GKD-C Continuation to your chart
2. In the GKD-B Baseline indicator, change "Baseline Type" to "Optimizer"
3. In the GKD-V Volatility/Volume indicator, change "Volatility/Volume Type" to "Optimizer"
4. In the GKD-C Confirmation 1 indicator, change "Confirmation Type" to "Optimizer"
5. In the GKD-C Continuation indicator, change "Confirmation Type" to "Optimizer"
An example of steps 2-5. In the screenshot example below, we change the value "Confirmation Type" in the GKD-C Fisher Transform indicator to "Optimizer"
6. In the GKD-BT Optimizer SCSC Backtest, import the value "Input into NEW GKD-BT Backtest" from the GKD-B Baseline indicator into the field "Import GKD-B Baseline indicator"
7. In the GKD-BT Optimizer SCSC Backtest, import the value "Input into NEW GKD-BT Backtest" from the GKD-V Volatility/Volume indicator into the field "Import GKD-V Volatility/Volume indicator"
8. In the GKD-BT Optimizer SCSC Backtest, import the value "Input into NEW GKD-BT Backtest" from the GKD-C Confirmation 1 indicator into the field "Import GKD-C Confirmation 1 indicator"
9. In the GKD-BT Optimizer SCSC Backtest, import the value "Input into NEW GKD-BT Backtest" from the GKD-C Continuation indicator into the field "Import GKD-C Continuation indicator"
An example of steps 6-9. In the screenshot example below, we import the value "Input into NEW GKD-BT Backtest" from the GKD-C Fisher Transform indicator into the GKD-BT Optimizer SCSC Backtest
10. Decide which of the 5 indicators you wish to optimize in first in the GKD-BT Optimizer SCSC Backtest. Change the value of the import from "Input into NEW GKD-BT Backtest" to "Input into NEW GKD-BT Optimizer Signals"
An example of step 10. In the screenshot example below, we chose to optimize the Confirmation 1 indicator, the GKD-C Fisher Transform. We change the value of the field "Import GKD-C Confirmation 1 indicator" from "Input into NEW GKD-BT Backtest" to "Input into NEW GKD-BT Optimizer Signals"
11. In the GKD-BT Optimizer SCSC Backtest and under the "Optimization Settings", use the dropdown menu "Optimization Indicator" to select the type of indicator you selected from step 12 above: "Baseline", "Volatility/Volume", "Confirmation 1", or "Continuation"
12. In the GKD-BT Optimizer SCSC Backtest and under the "Optimization Settings", import the value "Input into NEW GKD-BT Optimizer Start" from the indicator you selected to optimize in step 12 above into the field "Import Optimization Indicator Start"
13. In the GKD-BT Optimizer SCSC Backtest and under the "Optimization Settings", import the value "Input into NEW GKD-BT Optimizer Skip" from the indicator you selected to optimize in step 12 above into the field "Import Optimization Indicator Skip"
An example of step 11. In the screenshot example below, we select "Confirmation 1" from the "Optimization Indicator" dropdown menu
An example of steps 12 and 13. In the screenshot example below, we import "Import Optimization Indicator Start" and "Import Optimization Indicator Skip" from the GKD-C Fisher Transform indicator into their respective fields
🔶 This backtest includes the following metrics
Net profit: Overall profit or loss achieved.
Total Closed Trades: Total number of closed trades, both winning and losing.
Total Percent Wins: Total wins, whether long or short, for the selected time interval regardless of commissions and other profit-modifying addons.
Percent Profitable: Total wins, whether long or short, that are also profitable, taking commissions into account.
Profit Factor: The ratio of gross profits to gross losses, indicating how much money the strategy made for every unit of money it lost.
Average Profit per Trade: The average gain or loss per trade, calculated by dividing the net profit by the total number of closed trades.
Average Number of Bars in Trade: The average number of bars that elapsed during trades for all closed trades.
🔶 Summary of notable settings not already explained above
🔹 Backtest Properties
These settings define the financial and logistical parameters of the trading simulation, including:
Initial Capital: Specifies the starting balance for the backtest, setting the baseline for measuring profitability and loss.
Order Size: Determines the size of trades, which can be fixed or a percentage of the equity, affecting risk and return.
Order Type: Chooses between fixed contract sizes or a percentage-based order size, allowing for static or dynamic trading volumes.
Commission per Order: Accounts for trading costs, subtracting these from profits to provide a more accurate net performance result.
🔹 Signal Qualifiers
This group of settings establishes criteria related to the strategy's Baseline, and Volatility/Volume indicators in relation to the GKD-C Confirmation 1 indicator, which is crucial for validating trade signals. These include:
Maximum Allowable Post Signal Baseline Cross Bars Back: Sets the maximum number of bars that can elapse after a signal generated by a GKD-C Confirmation 1 indicator triggers. If the GKD-C Confirmation 1 indicator generates a long/short signal that doesn't yet agree with the trend position of the Baseline, then should the Baseline "catch-up" to the long/short trend of the GKD-C Confirmation 1 indicator within the number of bars specified by this setting, then a signal is generated.
Maximum Allowable Post Signal Volatility/Volume Cross Bars Back: Sets the maximum number of bars that can elapse after a signal generated by a GKD-C Confirmation 1 indicator triggers. If the GKD-C Confirmation 1 indicator generates a long/short signal that doesn't yet agree with the position of the Volatility/Volume, then should the Volatility/Volume "catch-up" with the long/short of the GKD-C Confirmation 1 indicator within the number of bars specified by this setting, then a signal is generated.
🔹 Signal Settings
Signal Options: These settings allow users to toggle the visibility of different types of entries based on the strategy criteria, such as standard entries, baseline entries, and continuation entries.
Standard Entry Rules Settings: Detailed criteria for standard entries can be customized here, including conditions on baseline agreement, price within specific zones, and agreement with other confirmation indicators.
1-Candle Rule Standard Entry Rules Settings: Similar to standard entries, but with a focus on conditions that must be met within a one-candle timeframe.
Baseline Entry Rules Settings: Specifies rules for entries based on the baseline, including conditions on confirmation agreement and price zones.
Volatility/Volume Entry Rules Settings: This includes settings for entries based on volatility or volume conditions, with specific rules on confirmation agreement and baseline agreement.
Continuation Entry Rules Settings: This group outlines the conditions for continuation entries, focusing on agreement with baseline and confirmation indicators since the entry signal trigger.
🔹 Volatility Settings
Volatility PnL Settings: Parameters for defining the type of volatility measure to use, its period, and multipliers for profit and stop levels.
Volatility Types Included
Standard Deviation of Logarithmic Returns: Quantifies asset volatility using the standard deviation applied to logarithmic returns, capturing symmetric price movements and financial returns' compound nature.
Exponential Weighted Moving Average (EWMA) for Volatility: Focuses on recent market information by applying exponentially decreasing weights to squared logarithmic returns, offering a dynamic view of market volatility.
Roger-Satchell Volatility Measure: Estimates asset volatility by analyzing the high, low, open, and close prices, providing a nuanced view of intraday volatility and market dynamics.
Close-to-Close Volatility Measure: Calculates volatility based on the closing prices of stocks, offering a streamlined but limited perspective on market behavior.
Parkinson Volatility Measure: Enhances volatility estimation by including high and low prices of the trading day, capturing a more accurate reflection of intraday market movements.
Garman-Klass Volatility Measure: Incorporates open, high, low, and close prices for a comprehensive daily volatility measure, capturing significant price movements and market activity.
Yang-Zhang Volatility Measure: Offers an efficient estimation of stock market volatility by combining overnight and intraday price movements, capturing opening jumps and overall market dynamics.
Garman-Klass-Yang-Zhang Volatility Measure: Merges the benefits of Garman-Klass and Yang-Zhang measures, providing a fuller picture of market volatility including opening market reactions.
Pseudo GARCH(2,2) Volatility Model: Mimics a GARCH(2,2) process using exponential moving averages of squared returns, highlighting volatility shocks and their future impact.
ER-Adaptive Average True Range (ATR): Adjusts the ATR period length based on market efficiency, offering a volatility measure that adapts to changing market conditions.
Adaptive Deviation: Dynamically adjusts its calculation period to offer a nuanced measure of volatility that responds to the market's intrinsic rhythms.
Median Absolute Deviation (MAD): Provides a robust measure of statistical variability, focusing on deviations from the median price, offering resilience against outliers.
Mean Absolute Deviation (MAD): Measures the average magnitude of deviations from the mean price, facilitating a straightforward understanding of volatility.
ATR (Average True Range): Finds the average of true ranges over a specified period, indicating the expected price movement and market volatility.
True Range Double (TRD): Offers a nuanced view of volatility by considering a broader range of price movements, identifying significant market sentiment shifts.
🔹 Other Settings
Backtest Dates: Users can specify the timeframe for the backtest, including start and end dates, as well as the acceptable entry time window.
Volatility Inputs: Additional settings related to volatility calculations, such as static percent, internal filter period for median absolute deviation, and parameters for specific volatility models.
UI Options: Settings to customize the user interface, including table activation, date panel visibility, and aesthetics like color and text size.
Export Options: Allows users to select the type of data to export from the backtest, focusing on metrics like net profit, total closed trades, and average profit per trade.
█ Giga Kaleidoscope (GKD) Modularized Trading System
The GKD Trading System is a comprehensive, algorithmic trading framework from AlgxTrading, designed to optimize trading strategies across various market conditions. It employs a modular approach, incorporating elements such as volatility assessment, trend identification through a baseline, multiple confirmation strategies for signal accuracy, and volume analysis. Key components also include specialized strategies for entry and exit, enabling precise trade execution. The system allows for extensive backtesting, providing traders with the ability to evaluate the effectiveness of their strategies using historical data. Aimed at reducing setup time, the GKD system empowers traders to focus more on strategy refinement and execution, leveraging a wide array of technical indicators for informed decision-making.
🔶 Core components of a GKD Algorithmic Trading System
Each GKD indicator is denoted with a module identifier of either: GKD-BT, GKD-B, GKD-C, GKD-V, GKD-M, or GKD-E. This allows traders to understand to which module each indicator belongs and where each indicator fits into the GKD system. The GKD algorithm is built on the principles of trend, momentum, and volatility. There are eight core components in the GKD trading algorithm:
🔹 Volatility - In the GKD trading system, volatility is used as a part of the system to help determine the appropriate stop loss and take profit levels for a trade. There are 17+ different types of volatility available in the GKD system including Average True Range (ATR), True Range Double (TRD), Close-to-Close, Garman-Klass, and more.
🔹 Baseline (GKD-B) - The baseline is essentially a moving average and is used to determine the overall direction of the market. The baseline in the GKD trading system is used to filter out trades that are not in line with the long-term trend of the market. The baseline is plotted on the chart along with other GKD indicators.
Trades are only taken when the price is in the same direction as the baseline. For example, if the baseline is sloping upwards or price is above the baseline, then only long trades are taken, and if the baseline is sloping downwards or price is below the baseline, then only short trades are taken. This approach helps to ensure that trades are in line with the overall trend of the market, and reduces the risk of entering trades that are likely to fail.
🔹 Confirmation 1, Confirmation 2, Continuation (GKD-C) - The GKD trading system incorporates technical confirmation indicators for the generation of its primary long and short signals, essential for its operation.
The GKD trading system distinguishes three specific categories. The first category, Confirmation 1 , encompasses technical indicators designed to identify trends and generate explicit trading signals. The second category, Confirmation 2 , a technical indicator used to identify trends; this type of indicator is primarily used to filter the Confirmation 1 indicator signals; however, this type of confirmation indicator also generates signals*. Lastly, the Continuation category includes technical indicators used in conjunction with Confirmation 1 and Confirmation 2 to generate a special type of trading signal called a "Continuation"
In a full GKD trading system all three categories generate signals. (see the section “GKD Trading System Signals” below)
🔹 Volatility/Volume (GKD-V) - Volatility/Volume indicators are used to measure the amount of buying and selling activity in a market. They are based on the trading Volatility/Volume of the market, and can provide information about the strength of the trend. In the GKD trading system, Volatility/Volume indicators are used to confirm trading signals generated by the various other GKD indicators. In the GKD trading system, Volatility is a proxy for Volume and vice versa.
Volatility/Volume indicators reduce the risk of false signals and improve the overall profitability of trades. These indicators can provide additional information about the market that is not captured by GKD-C confirmation and GKD-B baseline indicators.
🔹 Exit (GKD-E) - The exit indicator in the GKD system is an indicator that is deemed effective at identifying optimal exit points. The purpose of the exit indicator is to identify when a trend is likely to reverse or when the market conditions have changed, signaling the need to exit a trade. By using an exit indicator, traders can manage their risk and prevent significant losses.
🔹 Backtest (GKD-BT) - The GKD-BT backtest indicators link all other GKD-C, GKD-B, GKD-E, GKD-V, and GKD-M components together to create a GKD trading system. GKD-BT backtests generate signals (see the section “GKD Trading System Signals” below) from the confluence of various GKD indicators that are imported into the GKD-BT backtest. Backtest types include: GKD-BT solo and full GKD backtest strategies used for a single ticker; GKD-BT optimizers used to optimize a single indicator or the full GKD trading system; GKD-BT Multi-ticker used to backtest a single indicator or the full GKD trading system across up to ten tickers; GKD-BT exotic backtests like CC, Baseline, and Giga Stacks used to test confluence between GKD components to then be injected into a core GKD-BT Multi-ticker backtest or single ticker strategy.
🔹 Metamorphosis (GKD-M) ** - The concept of a metamorphosis indicator involves the integration of two or more GKD indicators to generate a compound signal. This is achieved by evaluating the accuracy of each indicator and selecting the signal from the indicator with the highest accuracy. As an illustration, let's consider a scenario where we calculate the accuracy of 10 indicators and choose the signal from the indicator that demonstrates the highest accuracy.
The resulting output from the metamorphosis indicator can then be utilized in a GKD-BT backtest by occupying a slot that aligns with the purpose of the metamorphosis indicator. The slot can be a GKD-B, GKD-C, GKD-E, or GKD-V slot, depending on the specific requirements and objectives of the indicator. This allows for seamless integration and utilization of the compound signal within the GKD-BT framework.
*see the section “GKD Trading System Signals” below
**not a required component of the GKD algorithm
🔶 What does the application of the GKD trading system look like?
Example trading system:
Volatility: Average True Range (ATR) (selectable in all backtests and other related GKD indicators)
GKD-B Baseline: GKD-B Multi-Ticker Baseline using Hull Moving Average
GKD-C Confirmation 1 : GKD-C Advance Trend Pressure
GKD-C Confirmation 2: GKD-C Dorsey Inertia
GKD-C Continuation: GKD-C Stochastic of RSX
GKD-V Volatility/Volume: GKD-V Damiani Volatmeter
GKD-E Exit: GKD-E MFI
GKD-BT Backtest: GKD-BT Multi-Ticker Full GKD Backtest
GKD-M Metamorphosis: GKD-M Baseline Optimizer
**all indicators mentioned above are included in the same AlgxTrading package**
Each module is passed to a GKD-BT backtest module. In the backtest module, all components are combined to formulate trading signals and statistical output. This chaining of indicators requires that each module conform to AlgxTrading's GKD protocol, therefore allowing for the testing of every possible combination of technical indicators that make up the various indictor types in the GKD algorithm.
🔶 GKD Trading System Signals
Standard Entry requires a sequence of conditions including a confirmation signal from GKD-C, baseline agreement, price criteria related to the Goldie Locks Zone, and concurrence from a second confirmation and volatility/volume indicators.
1-Candle Standard Entry introduces a two-phase process where initial conditions must be met, followed by a retraction in price and additional confirmations in the subsequent candle, including baseline, confirmations 1 and 2, and volatility/volume criteria.
Baseline Entry focuses on signals generated by the GKD-B Baseline, requiring agreement from confirmation signals, specific price conditions within the Goldie Locks Zone, and a timing condition related to the confirmation 1 signal.
1-Candle Baseline Entry mirrors the baseline entry but adds a requirement for a price retraction and subsequent confirmations in the following candle, maintaining the focus on the baseline's guidance.
Volatility/Volume Entry is predicated on signals from volatility/volume indicators, requiring support from confirmations, price criteria within the Goldie Locks Zone, baseline agreement, and a timing condition for the confirmation 1 signal.
1-Candle Volatility/Volume Entry adapts the volatility/volume entry to include a phase of initial signal and agreement, followed by a retracement phase that seeks further agreement from the system's components in the subsequent candle.
Confirmation 2 Entry is based on the second confirmation signal, requiring the first confirmation's agreement, specific price criteria, agreement from volatility/volume indicators, and baseline, with a timing condition for the confirmation 1 signal.
1-Candle Confirmation 2 Entry adds a retracement requirement to the confirmation 2 entry, necessitating additional agreements from the system's components in the candle following the signal.
PullBack Entry initiates with a baseline signal and agreement from the first confirmation, with a price condition related to volatility. It then looks for price to return within the Goldie Locks Zone and seeks further agreement from the system's components in the subsequent candle.
Continuation Entry allows for the continuation of an active position, based on a previously triggered entry strategy. It requires that the baseline hasn't crossed since the initial trigger, alongside ongoing agreements from confirmations and the baseline.
█ Conclusion
The GKD-BT Optimizer SCSC Backtest is a critical tool within the Giga Kaleidoscope Modularized Trading System, designed for precise strategy refinement and evaluation within the GKD framework. It enables the optimization and testing of various trading indicators and strategies under different market conditions. The module's design facilitates detailed analysis of individual trading components' performance, allowing for the optimization of indicators like Baseline, Volatility/Volume, Confirmation, and Continuation. This optimization process aids traders in identifying the most effective configurations, thereby enhancing trading outcomes and strategy efficiency within the GKD ecosystem.
█ How to Access
You can see the Author's Instructions below to learn how to get access.
GKD-BT Optimizer Full GKD Backtest [Loxx]The Giga Kaleidoscope GKD-BT Optimizer Full GKD Backtest is a Backtest module included in AlgxTrading's "Giga Kaleidoscope Modularized Trading System." (see the section Giga Kaleidoscope (GKD) Modularized Trading System below for an explanation of the GKD trading system)
**the backtest data rendered to the chart above and all screenshots below use $5 commission per trade and 10% equity per trade with $1 million initial capital**
█ GKD-BT Optimizer Full GKD Backtest
The GKD-BT Optimizer Full GKD Backtest is a comprehensive backtesting module designed to optimize the combination of key GKD indicators within AlgxTrading's "Giga Kaleidoscope Modularized Trading System." This module facilitates precise strategy refinement by allowing traders to configure and optimize the following critical GKD indicators:
GKD-B Baseline
GKD-V Volatility/Volume
GKD-C Confirmation 1
GKD-C Confirmation 2
GKD-C Continuation
Each indicator is equipped with an "Optimizer" mode, enabling dynamic feedback and iterative improvements directly into the backtesting environment. This integrated approach ensures that each component contributes effectively to the overall strategy, providing a robust framework for achieving optimized trading outcomes.
The GKD-BT Optimizer supports granular test configurations including a single take profit and stop loss setting, and allows for targeted testing within specified date ranges to simulate forward testing with historical data. This feature is essential for evaluating the resilience and effectiveness of trading strategies under various market conditions.
Furthermore, the module is designed with user-centric features such as:
Customizable Trading Panel: Displays critical backtest results and trade statistics, which can be shown or hidden as per user preference.
Highlighting Thresholds: Users can set thresholds for Total Percent Wins, Percent Profitable, and Profit Factor, which helps in quickly identifying the most relevant metrics for analysis.
The detailed setup ensures that traders can not only adjust their strategies based on historical performance but also fine-tune their approach to meet specific trading objectives.
🔶 To configure this indicator: ***all GKD indicators listed below are all included in the AlgxTrading trading system package***
1. Add GKD-C Confirmation, GKD-B Baseline, GKD-V Volatility/Volume, GKD-C Confirmation 2, and GKD-C Continuation to your chart
2. In the GKD-B Baseline indicator, change "Baseline Type" to "Optimizer"
3. In the GKD-V Volatility/Volume indicator, change "Volatility/Volume Type" to "Optimizer"
4. In the GKD-C Confirmation 1 indicator, change "Confirmation Type" to "Optimizer"
5. In the GKD-C Confirmation 2 indicator, change "Confirmation Type" to "Optimizer"
6. In the GKD-C Continuation indicator, change "Confirmation Type" to "Optimizer"
An example of steps 2-6. In the screenshot example below, we change the value "Confirmation Type" in the GKD-C Fisher Transform indicator to "Optimizer"
7. In the GKD-BT Optimizer Full GKD Backtest, import the value "Input into NEW GKD-BT Backtest" from the GKD-B Baseline indicator into the field "Import GKD-B Baseline indicator"
8. In the GKD-BT Optimizer Full GKD Backtest, import the value "Input into NEW GKD-BT Backtest" from the GKD-V Volatility/Volume indicator into the field "Import GKD-V Volatility/Volume indicator"
9. In the GKD-BT Optimizer Full GKD Backtest, import the value "Input into NEW GKD-BT Backtest" from the GKD-C Confirmation 1 indicator into the field "Import GKD-C Confirmation 1 indicator"
10. In the GKD-BT Optimizer Full GKD Backtest, import the value "Input into NEW GKD-BT Backtest" from the GKD-C Confirmation 2 indicator into the field "Import GKD-C Confirmation 2 indicator"
11. In the GKD-BT Optimizer Full GKD Backtest, import the value "Input into NEW GKD-BT Backtest" from the GKD-C Continuation indicator into the field "Import GKD-C Continuation indicator"
An example of steps 7-11. In the screenshot example below, we import the value "Input into NEW GKD-BT Backtest" from the GKD-C Coppock Curve indicator into the GKD-BT Optimizer Full GKD Backtest
12. Decide which of the 5 indicators you wish to optimize in first in the GKD-BT Optimizer Full GKD Backtest. Change the value of the import from "Input into NEW GKD-BT Backtest" to "Input into NEW GKD-BT Optimizer Signals"
An example of step 12. In the screenshot example below, we chose to optimize the Confirmation 1 indicator, the GKD-C Fisher Transform. We change the value of the field "Import GKD-C Confirmation 1 indicator" from "Input into NEW GKD-BT Backtest" to "Input into NEW GKD-BT Optimizer Signals"
13. In the GKD-BT Optimizer Full GKD Backtest and under the "Optimization Settings", use the dropdown menu "Optimization Indicator" to select the type of indicator you selected from step 12 above: "Baseline", "Volatility/Volume", "Confirmation 1", "Confirmation 2", or "Continuation"
14. In the GKD-BT Optimizer Full GKD Backtest and under the "Optimization Settings", import the value "Input into NEW GKD-BT Optimizer Start" from the indicator you selected to optimize in step 12 above into the field "Import Optimization Indicator Start"
15. In the GKD-BT Optimizer Full GKD Backtest and under the "Optimization Settings", import the value "Input into NEW GKD-BT Optimizer Skip" from the indicator you selected to optimize in step 12 above into the field "Import Optimization Indicator Skip"
An example of step 13. In the screenshot example below, we select "Confirmation 1" from the "Optimization Indicator" dropdown menu
An example of steps 14 and 15. In the screenshot example below, we import "Import Optimization Indicator Start" and "Import Optimization Indicator Skip" from the GKD-C Fisher Transform indicator into their respective fields
🔶 This backtest includes the following metrics
Net profit: Overall profit or loss achieved.
Total Closed Trades: Total number of closed trades, both winning and losing.
Total Percent Wins: Total wins, whether long or short, for the selected time interval regardless of commissions and other profit-modifying addons.
Percent Profitable: Total wins, whether long or short, that are also profitable, taking commissions into account.
Profit Factor: The ratio of gross profits to gross losses, indicating how much money the strategy made for every unit of money it lost.
Average Profit per Trade: The average gain or loss per trade, calculated by dividing the net profit by the total number of closed trades.
Average Number of Bars in Trade: The average number of bars that elapsed during trades for all closed trades.
🔶 Summary of notable settings not already explained above
🔹 Backtest Properties
These settings define the financial and logistical parameters of the trading simulation, including:
Initial Capital: Specifies the starting balance for the backtest, setting the baseline for measuring profitability and loss.
Order Size: Determines the size of trades, which can be fixed or a percentage of the equity, affecting risk and return.
Order Type: Chooses between fixed contract sizes or a percentage-based order size, allowing for static or dynamic trading volumes.
Commission per Order: Accounts for trading costs, subtracting these from profits to provide a more accurate net performance result.
🔹 Signal Qualifiers
This group of settings establishes criteria related to the strategy's Baseline, Volatility/Volume, and Confirmation 2 indicators in relation to the GKD-C Confirmation 1 indicator, which is crucial for validating trade signals. These include:
Maximum Allowable Post Signal Baseline Cross Bars Back: Sets the maximum number of bars that can elapse after a signal generated by a GKD-C Confirmation 1 indicator triggers. If the GKD-C Confirmation 1 indicator generates a long/short signal that doesn't yet agree with the trend position of the Baseline, then should the Baseline "catch-up" to the long/short trend of the GKD-C Confirmation 1 indicator within the number of bars specified by this setting, then a signal is generated.
Maximum Allowable Post Signal Volatility/Volume Cross Bars Back: Sets the maximum number of bars that can elapse after a signal generated by a GKD-C Confirmation 1 indicator triggers. If the GKD-C Confirmation 1 indicator generates a long/short signal that doesn't yet agree with the position of the Volatility/Volume, then should the Volatility/Volume "catch-up" with the long/short of the GKD-C Confirmation 1 indicator within the number of bars specified by this setting, then a signal is generated.
Maximum Allowable Post Signal Confirmation 2 Cross Bars Back: Sets the maximum number of bars that can elapse after a signal generated by a GKD-C Confirmation 1 indicator triggers. If the GKD-C Confirmation 1 indicator generates a long/short signal that doesn't yet agree with the trend position of the Confirmation 2, then should the Confirmation 2 "catch-up" to the long/short trend of the GKD-C Confirmation 1 indicator within the number of bars specified by this setting, then a signal is generated.
🔹 Signal Settings
Signal Options: These settings allow users to toggle the visibility of different types of entries based on the strategy criteria, such as standard entries, baseline entries, and continuation entries.
Standard Entry Rules Settings: Detailed criteria for standard entries can be customized here, including conditions on baseline agreement, price within specific zones, and agreement with other confirmation indicators.
1-Candle Rule Standard Entry Rules Settings: Similar to standard entries, but with a focus on conditions that must be met within a one-candle timeframe.
Baseline Entry Rules Settings: Specifies rules for entries based on the baseline, including conditions on confirmation agreement and price zones.
Volatility/Volume Entry Rules Settings: This includes settings for entries based on volatility or volume conditions, with specific rules on confirmation agreement and baseline agreement.
Confirmation 2 Entry Rules Settings: Settings here define the rules for entries based on a second confirmation indicator, detailing the required agreements and conditions.
Continuation Entry Rules Settings: This group outlines the conditions for continuation entries, focusing on agreement with baseline and confirmation indicators since the entry signal trigger.
🔹 Volatility Settings
Volatility PnL Settings: Parameters for defining the type of volatility measure to use, its period, and multipliers for profit and stop levels.
Volatility Types Included
Standard Deviation of Logarithmic Returns: Quantifies asset volatility using the standard deviation applied to logarithmic returns, capturing symmetric price movements and financial returns' compound nature.
Exponential Weighted Moving Average (EWMA) for Volatility: Focuses on recent market information by applying exponentially decreasing weights to squared logarithmic returns, offering a dynamic view of market volatility.
Roger-Satchell Volatility Measure: Estimates asset volatility by analyzing the high, low, open, and close prices, providing a nuanced view of intraday volatility and market dynamics.
Close-to-Close Volatility Measure: Calculates volatility based on the closing prices of stocks, offering a streamlined but limited perspective on market behavior.
Parkinson Volatility Measure: Enhances volatility estimation by including high and low prices of the trading day, capturing a more accurate reflection of intraday market movements.
Garman-Klass Volatility Measure: Incorporates open, high, low, and close prices for a comprehensive daily volatility measure, capturing significant price movements and market activity.
Yang-Zhang Volatility Measure: Offers an efficient estimation of stock market volatility by combining overnight and intraday price movements, capturing opening jumps and overall market dynamics.
Garman-Klass-Yang-Zhang Volatility Measure: Merges the benefits of Garman-Klass and Yang-Zhang measures, providing a fuller picture of market volatility including opening market reactions.
Pseudo GARCH(2,2) Volatility Model: Mimics a GARCH(2,2) process using exponential moving averages of squared returns, highlighting volatility shocks and their future impact.
ER-Adaptive Average True Range (ATR): Adjusts the ATR period length based on market efficiency, offering a volatility measure that adapts to changing market conditions.
Adaptive Deviation: Dynamically adjusts its calculation period to offer a nuanced measure of volatility that responds to the market's intrinsic rhythms.
Median Absolute Deviation (MAD): Provides a robust measure of statistical variability, focusing on deviations from the median price, offering resilience against outliers.
Mean Absolute Deviation (MAD): Measures the average magnitude of deviations from the mean price, facilitating a straightforward understanding of volatility.
ATR (Average True Range): Finds the average of true ranges over a specified period, indicating the expected price movement and market volatility.
True Range Double (TRD): Offers a nuanced view of volatility by considering a broader range of price movements, identifying significant market sentiment shifts.
🔹 Other Settings
Backtest Dates: Users can specify the timeframe for the backtest, including start and end dates, as well as the acceptable entry time window.
Volatility Inputs: Additional settings related to volatility calculations, such as static percent, internal filter period for median absolute deviation, and parameters for specific volatility models.
UI Options: Settings to customize the user interface, including table activation, date panel visibility, and aesthetics like color and text size.
Export Options: Allows users to select the type of data to export from the backtest, focusing on metrics like net profit, total closed trades, and average profit per trade.
█ Giga Kaleidoscope (GKD) Modularized Trading System
The GKD Trading System is a comprehensive, algorithmic trading framework from AlgxTrading, designed to optimize trading strategies across various market conditions. It employs a modular approach, incorporating elements such as volatility assessment, trend identification through a baseline, multiple confirmation strategies for signal accuracy, and volume analysis. Key components also include specialized strategies for entry and exit, enabling precise trade execution. The system allows for extensive backtesting, providing traders with the ability to evaluate the effectiveness of their strategies using historical data. Aimed at reducing setup time, the GKD system empowers traders to focus more on strategy refinement and execution, leveraging a wide array of technical indicators for informed decision-making.
🔶 Core components of a GKD Algorithmic Trading System
Each GKD indicator is denoted with a module identifier of either: GKD-BT, GKD-B, GKD-C, GKD-V, GKD-M, or GKD-E. This allows traders to understand to which module each indicator belongs and where each indicator fits into the GKD system. The GKD algorithm is built on the principles of trend, momentum, and volatility. There are eight core components in the GKD trading algorithm:
🔹 Volatility - In the GKD trading system, volatility is used as a part of the system to help determine the appropriate stop loss and take profit levels for a trade. There are 17+ different types of volatility available in the GKD system including Average True Range (ATR), True Range Double (TRD), Close-to-Close, Garman-Klass, and more.
🔹 Baseline (GKD-B) - The baseline is essentially a moving average and is used to determine the overall direction of the market. The baseline in the GKD trading system is used to filter out trades that are not in line with the long-term trend of the market. The baseline is plotted on the chart along with other GKD indicators.
Trades are only taken when the price is in the same direction as the baseline. For example, if the baseline is sloping upwards or price is above the baseline, then only long trades are taken, and if the baseline is sloping downwards or price is below the baseline, then only short trades are taken. This approach helps to ensure that trades are in line with the overall trend of the market, and reduces the risk of entering trades that are likely to fail.
🔹 Confirmation 1, Confirmation 2, Continuation (GKD-C) - The GKD trading system incorporates technical confirmation indicators for the generation of its primary long and short signals, essential for its operation.
The GKD trading system distinguishes three specific categories. The first category, Confirmation 1 , encompasses technical indicators designed to identify trends and generate explicit trading signals. The second category, Confirmation 2 , a technical indicator used to identify trends; this type of indicator is primarily used to filter the Confirmation 1 indicator signals; however, this type of confirmation indicator also generates signals*. Lastly, the Continuation category includes technical indicators used in conjunction with Confirmation 1 and Confirmation 2 to generate a special type of trading signal called a "Continuation"
In a full GKD trading system all three categories generate signals. (see the section “GKD Trading System Signals” below)
🔹 Volatility/Volume (GKD-V) - Volatility/Volume indicators are used to measure the amount of buying and selling activity in a market. They are based on the trading Volatility/Volume of the market, and can provide information about the strength of the trend. In the GKD trading system, Volatility/Volume indicators are used to confirm trading signals generated by the various other GKD indicators. In the GKD trading system, Volatility is a proxy for Volume and vice versa.
Volatility/Volume indicators reduce the risk of false signals and improve the overall profitability of trades. These indicators can provide additional information about the market that is not captured by GKD-C confirmation and GKD-B baseline indicators.
🔹 Exit (GKD-E) - The exit indicator in the GKD system is an indicator that is deemed effective at identifying optimal exit points. The purpose of the exit indicator is to identify when a trend is likely to reverse or when the market conditions have changed, signaling the need to exit a trade. By using an exit indicator, traders can manage their risk and prevent significant losses.
🔹 Backtest (GKD-BT) - The GKD-BT backtest indicators link all other GKD-C, GKD-B, GKD-E, GKD-V, and GKD-M components together to create a GKD trading system. GKD-BT backtests generate signals (see the section “GKD Trading System Signals” below) from the confluence of various GKD indicators that are imported into the GKD-BT backtest. Backtest types include: GKD-BT solo and full GKD backtest strategies used for a single ticker; GKD-BT optimizers used to optimize a single indicator or the full GKD trading system; GKD-BT Multi-ticker used to backtest a single indicator or the full GKD trading system across up to ten tickers; GKD-BT exotic backtests like CC, Baseline, and Giga Stacks used to test confluence between GKD components to then be injected into a core GKD-BT Multi-ticker backtest or single ticker strategy.
🔹 Metamorphosis (GKD-M) ** - The concept of a metamorphosis indicator involves the integration of two or more GKD indicators to generate a compound signal. This is achieved by evaluating the accuracy of each indicator and selecting the signal from the indicator with the highest accuracy. As an illustration, let's consider a scenario where we calculate the accuracy of 10 indicators and choose the signal from the indicator that demonstrates the highest accuracy.
The resulting output from the metamorphosis indicator can then be utilized in a GKD-BT backtest by occupying a slot that aligns with the purpose of the metamorphosis indicator. The slot can be a GKD-B, GKD-C, GKD-E, or GKD-V slot, depending on the specific requirements and objectives of the indicator. This allows for seamless integration and utilization of the compound signal within the GKD-BT framework.
*see the section “GKD Trading System Signals” below
**not a required component of the GKD algorithm
🔶 What does the application of the GKD trading system look like?
Example trading system:
Volatility: Average True Range (ATR) (selectable in all backtests and other related GKD indicators)
GKD-B Baseline: GKD-B Multi-Ticker Baseline using Hull Moving Average
GKD-C Confirmation 1 : GKD-C Advance Trend Pressure
GKD-C Confirmation 2: GKD-C Dorsey Inertia
GKD-C Continuation: GKD-C Stochastic of RSX
GKD-V Volatility/Volume: GKD-V Damiani Volatmeter
GKD-E Exit: GKD-E MFI
GKD-BT Backtest: GKD-BT Multi-Ticker Full GKD Backtest
GKD-M Metamorphosis: GKD-M Baseline Optimizer
**all indicators mentioned above are included in the same AlgxTrading package**
Each module is passed to a GKD-BT backtest module. In the backtest module, all components are combined to formulate trading signals and statistical output. This chaining of indicators requires that each module conform to AlgxTrading's GKD protocol, therefore allowing for the testing of every possible combination of technical indicators that make up the various indictor types in the GKD algorithm.
🔶 GKD Trading System Signals
Standard Entry requires a sequence of conditions including a confirmation signal from GKD-C, baseline agreement, price criteria related to the Goldie Locks Zone, and concurrence from a second confirmation and volatility/volume indicators.
1-Candle Standard Entry introduces a two-phase process where initial conditions must be met, followed by a retraction in price and additional confirmations in the subsequent candle, including baseline, confirmations 1 and 2, and volatility/volume criteria.
Baseline Entry focuses on signals generated by the GKD-B Baseline, requiring agreement from confirmation signals, specific price conditions within the Goldie Locks Zone, and a timing condition related to the confirmation 1 signal.
1-Candle Baseline Entry mirrors the baseline entry but adds a requirement for a price retraction and subsequent confirmations in the following candle, maintaining the focus on the baseline's guidance.
Volatility/Volume Entry is predicated on signals from volatility/volume indicators, requiring support from confirmations, price criteria within the Goldie Locks Zone, baseline agreement, and a timing condition for the confirmation 1 signal.
1-Candle Volatility/Volume Entry adapts the volatility/volume entry to include a phase of initial signal and agreement, followed by a retracement phase that seeks further agreement from the system's components in the subsequent candle.
Confirmation 2 Entry is based on the second confirmation signal, requiring the first confirmation's agreement, specific price criteria, agreement from volatility/volume indicators, and baseline, with a timing condition for the confirmation 1 signal.
1-Candle Confirmation 2 Entry adds a retracement requirement to the confirmation 2 entry, necessitating additional agreements from the system's components in the candle following the signal.
PullBack Entry initiates with a baseline signal and agreement from the first confirmation, with a price condition related to volatility. It then looks for price to return within the Goldie Locks Zone and seeks further agreement from the system's components in the subsequent candle.
Continuation Entry allows for the continuation of an active position, based on a previously triggered entry strategy. It requires that the baseline hasn't crossed since the initial trigger, alongside ongoing agreements from confirmations and the baseline.
█ Conclusion
The GKD-BT Optimizer Full GKD Backtest is a critical tool within the Giga Kaleidoscope Modularized Trading System, designed for precise strategy refinement and evaluation within the GKD framework. It enables the optimization and testing of various trading indicators and strategies under different market conditions. The module's design facilitates detailed analysis of individual trading components' performance, allowing for the optimization of indicators like Baseline, Volatility/Volume, Confirmation, and Continuation. This optimization process aids traders in identifying the most effective configurations, thereby enhancing trading outcomes and strategy efficiency within the GKD ecosystem.
█ How to Access
You can see the Author's Instructions below to learn how to get access.
GKD-BT Multi-Ticker Baseline Backtest [Loxx]The Giga Kaleidoscope GKD-BT Multi-Ticker Baseline Backtest is a backtesting module included in Loxx's "Giga Kaleidoscope Modularized Trading System."
█ Giga Kaleidoscope GKD-BT Multi-Ticker Baseline Backtest
The Multi-Ticker SCSC Backtest is a Solo Confirmation Super Complex backtest that allows traders to test GKD-B Multi-Ticker Baseline series baselines indicators filtered. The purpose of this backtest is to enable traders to quickly evaluate the viability of a Baseline across hundreds of tickers within 30-60 minutes.
The backtest module supports testing with 1 take profit and 1 stop loss. It also offers the option to limit testing to a specific date range, allowing simulated forward testing using historical data. This backtest module only includes standard long and short signals. Additionally, users can choose to display or hide a trading panel that provides relevant information about the backtest, statistics, and the current trade. Traders can also select a highlighting threshold for Total Percent Wins and Percent Profitable, and Profit Factor.
To use this indicator:
1. Import 1-10 tickers into the GKD-B Multi-Ticker Baseline indicator
2. Import the value "Input into NEW GKD-BT Multi-ticker Backtest" from the GKD-B Multi-Ticker Baseline indicator (Volatility-Adaptive, Stepped, etc.) into the GKD-BT Multi-Ticker Baseline Backtest.
3. Import the same 1-10 tickers from number step 1 above into the GKD-BT Multi-Ticker Baseline Backtest indicator into the text area field "Input Tickers separated by commas".
3. When importing tickers, ensure that you import the same type of tickers for all 1-10 tickers. For example, test only FX or Cryptocurrency or Stocks. Do not combine different tradable asset types.
4. Make sure that your chart is set to a ticker that corresponds to the tradable asset type. For cryptocurrency testing, set the chart to BTCUSDT. For Forex testing, set the chart to EURUSD.
This backtest includes the following metrics:
1. Net profit: Overall profit or loss achieved.
2. Total Closed Trades: Total number of closed trades, both winning and losing.
3. Total Percent Wins: Total wins, whether long or short, for the selected time interval regardless of commissions and other profit-modifying add-ons.
4. Percent Profitable: Total wins, whether long or short, that are also profitable, taking commissions into account.
5. Profit Factor: The ratio of gross profits to gross losses, indicating how much money the strategy made for every unit of money it lost.
6. Average Profit per Trade: The average gain or loss per trade, calculated by dividing the net profit by the total number of closed trades.
7. Average Number of Bars in Trade: The average number of bars that elapsed during trades for all closed trades.
Summary of notable settings:
Input Tickers separated by commas: Allows the user to input tickers separated by commas, specifying the symbols or tickers of financial instruments used in the backtest. The tickers should follow the format "EXCHANGE:TICKER" (e.g., "NASDAQ:AAPL, NYSE:MSFT").
Import GKD-B Baseline: Imports the "GKD-B Multi-Ticker Baseline" indicator.
Initial Capital: Represents the starting account balance for the backtest, denominated in the base currency of the trading account.
Order Size: Determines the quantity of contracts traded in each trade.
Order Type: Specifies the type of order used in the backtest, either "Contracts" or "% Equity."
Commission: Represents the commission per order or transaction cost incurred in each trade.
**the backtest data rendered to the chart above uses $5 commission per trade and 10% equity per trade with $1 million initial capital. Each backtest result for each ticker assumes these same inputs. The results are NOT cumulative, they are separate and isolated per ticker and trading side, long or short**
█ Volatility Types included
The GKD system utilizes volatility-based take profits and stop losses. Each take profit and stop loss is calculated as a multiple of volatility. You can change the values of the multipliers in the settings as well.
This module includes 17 types of volatility:
Close-to-Close
Parkinson
Garman-Klass
Rogers-Satchell
Yang-Zhang
Garman-Klass-Yang-Zhang
Exponential Weighted Moving Average
Standard Deviation of Log Returns
Pseudo GARCH(2,2)
Average True Range
True Range Double
Standard Deviation
Adaptive Deviation
Median Absolute Deviation
Efficiency-Ratio Adaptive ATR
Mean Absolute Deviation
Static Percent
Various volatility estimators and indicators that investors and traders can use to measure the dispersion or volatility of a financial instrument's price. Each estimator has its strengths and weaknesses, and the choice of estimator should depend on the specific needs and circumstances of the user.
Close-to-Close
Close-to-Close volatility is a classic and widely used volatility measure, sometimes referred to as historical volatility.
Volatility is an indicator of the speed of a stock price change. A stock with high volatility is one where the price changes rapidly and with a larger amplitude. The more volatile a stock is, the riskier it is.
Close-to-close historical volatility is calculated using only a stock's closing prices. It is the simplest volatility estimator. However, in many cases, it is not precise enough. Stock prices could jump significantly during a trading session and return to the opening value at the end. That means that a considerable amount of price information is not taken into account by close-to-close volatility.
Despite its drawbacks, Close-to-Close volatility is still useful in cases where the instrument doesn't have intraday prices. For example, mutual funds calculate their net asset values daily or weekly, and thus their prices are not suitable for more sophisticated volatility estimators.
Parkinson
Parkinson volatility is a volatility measure that uses the stock’s high and low price of the day.
The main difference between regular volatility and Parkinson volatility is that the latter uses high and low prices for a day, rather than only the closing price. This is useful as close-to-close prices could show little difference while large price movements could have occurred during the day. Thus, Parkinson's volatility is considered more precise and requires less data for calculation than close-to-close volatility.
One drawback of this estimator is that it doesn't take into account price movements after the market closes. Hence, it systematically undervalues volatility. This drawback is addressed in the Garman-Klass volatility estimator.
Garman-Klass
Garman-Klass is a volatility estimator that incorporates open, low, high, and close prices of a security.
Garman-Klass volatility extends Parkinson's volatility by taking into account the opening and closing prices. As markets are most active during the opening and closing of a trading session, it makes volatility estimation more accurate.
Garman and Klass also assumed that the process of price change follows a continuous diffusion process (Geometric Brownian motion). However, this assumption has several drawbacks. The method is not robust for opening jumps in price and trend movements.
Despite its drawbacks, the Garman-Klass estimator is still more effective than the basic formula since it takes into account not only the price at the beginning and end of the time interval but also intraday price extremes.
Researchers Rogers and Satchell have proposed a more efficient method for assessing historical volatility that takes into account price trends. See Rogers-Satchell Volatility for more detail.
Rogers-Satchell
Rogers-Satchell is an estimator for measuring the volatility of securities with an average return not equal to zero.
Unlike Parkinson and Garman-Klass estimators, Rogers-Satchell incorporates a drift term (mean return not equal to zero). As a result, it provides better volatility estimation when the underlying is trending.
The main disadvantage of this method is that it does not take into account price movements between trading sessions. This leads to an underestimation of volatility since price jumps periodically occur in the market precisely at the moments between sessions.
A more comprehensive estimator that also considers the gaps between sessions was developed based on the Rogers-Satchel formula in the 2000s by Yang-Zhang. See Yang Zhang Volatility for more detail.
Yang-Zhang
Yang Zhang is a historical volatility estimator that handles both opening jumps and the drift and has a minimum estimation error.
Yang-Zhang volatility can be thought of as a combination of the overnight (close-to-open volatility) and a weighted average of the Rogers-Satchell volatility and the day’s open-to-close volatility. It is considered to be 14 times more efficient than the close-to-close estimator.
Garman-Klass-Yang-Zhang
Garman-Klass-Yang-Zhang (GKYZ) volatility estimator incorporates the returns of open, high, low, and closing prices in its calculation.
GKYZ volatility estimator takes into account overnight jumps but not the trend, i.e., it assumes that the underlying asset follows a Geometric Brownian Motion (GBM) process with zero drift. Therefore, the GKYZ volatility estimator tends to overestimate the volatility when the drift is different from zero. However, for a GBM process, this estimator is eight times more efficient than the close-to-close volatility estimator.
Exponential Weighted Moving Average
The Exponentially Weighted Moving Average (EWMA) is a quantitative or statistical measure used to model or describe a time series. The EWMA is widely used in finance, with the main applications being technical analysis and volatility modeling.
The moving average is designed such that older observations are given lower weights. The weights decrease exponentially as the data point gets older – hence the name exponentially weighted.
The only decision a user of the EWMA must make is the parameter lambda. The parameter decides how important the current observation is in the calculation of the EWMA. The higher the value of lambda, the more closely the EWMA tracks the original time series.
Standard Deviation of Log Returns
This is the simplest calculation of volatility. It's the standard deviation of ln(close/close(1)).
Pseudo GARCH(2,2)
This is calculated using a short- and long-run mean of variance multiplied by ?.
avg(var;M) + (1 ? ?) avg(var;N) = 2?var/(M+1-(M-1)L) + 2(1-?)var/(M+1-(M-1)L)
Solving for ? can be done by minimizing the mean squared error of estimation; that is, regressing L^-1var - avg(var; N) against avg(var; M) - avg(var; N) and using the resulting beta estimate as ?.
Average True Range
The average true range (ATR) is a technical analysis indicator, introduced by market technician J. Welles Wilder Jr. in his book New Concepts in Technical Trading Systems, that measures market volatility by decomposing the entire range of an asset price for that period.
The true range indicator is taken as the greatest of the following: current high less the current low; the absolute value of the current high less the previous close; and the absolute value of the current low less the previous close. The ATR is then a moving average, generally using 14 days, of the true ranges.
True Range Double
A special case of ATR that attempts to correct for volatility skew.
Standard Deviation
Standard deviation is a statistic that measures the dispersion of a dataset relative to its mean and is calculated as the square root of the variance. The standard deviation is calculated as the square root of variance by determining each data point's deviation relative to the mean. If the data points are further from the mean, there is a higher deviation within the data set; thus, the more spread out the data, the higher the standard deviation.
Adaptive Deviation
By definition, the Standard Deviation (STD, also represented by the Greek letter sigma ? or the Latin letter s) is a measure that is used to quantify the amount of variation or dispersion of a set of data values. In technical analysis, we usually use it to measure the level of current volatility.
Standard Deviation is based on Simple Moving Average calculation for mean value. This version of standard deviation uses the properties of EMA to calculate what can be called a new type of deviation, and since it is based on EMA, we can call it EMA deviation. Additionally, Perry Kaufman's efficiency ratio is used to make it adaptive (since all EMA type calculations are nearly perfect for adapting).
The difference when compared to the standard is significant--not just because of EMA usage, but the efficiency ratio makes it a "bit more logical" in very volatile market conditions.
Median Absolute Deviation
The median absolute deviation is a measure of statistical dispersion. Moreover, the MAD is a robust statistic, being more resilient to outliers in a data set than the standard deviation. In the standard deviation, the distances from the mean are squared, so large deviations are weighted more heavily, and thus outliers can heavily influence it. In the MAD, the deviations of a small number of outliers are irrelevant.
Because the MAD is a more robust estimator of scale than the sample variance or standard deviation, it works better with distributions without a mean or variance, such as the Cauchy distribution.
For this indicator, a manual recreation of the quantile function in Pine Script is used. This is so users have a full inside view into how this is calculated.
Efficiency-Ratio Adaptive ATR
Average True Range (ATR) is a widely used indicator for many occasions in technical analysis. It is calculated as the RMA of the true range. This version adds a "twist": it uses Perry Kaufman's Efficiency Ratio to calculate adaptive true range.
Mean Absolute Deviation
The mean absolute deviation (MAD) is a measure of variability that indicates the average distance between observations and their mean. MAD uses the original units of the data, which simplifies interpretation. Larger values signify that the data points spread out further from the average. Conversely, lower values correspond to data points bunching closer to it. The mean absolute deviation is also known as the mean deviation and average absolute deviation.
This definition of the mean absolute deviation sounds similar to the standard deviation (SD). While both measure variability, they have different calculations. In recent years, some proponents of MAD have suggested that it replace the SD as the primary measure because it is a simpler concept that better fits real life.
█ Giga Kaleidoscope Modularized Trading System
Core components of an NNFX algorithmic trading strategy
The NNFX algorithm is built on the principles of trend, momentum, and volatility. There are six core components in the NNFX trading algorithm:
1. Volatility - price volatility; e.g., Average True Range, True Range Double, Close-to-Close, etc.
2. Baseline - a moving average to identify price trend
3. Confirmation 1 - a technical indicator used to identify trends
4. Confirmation 2 - a technical indicator used to identify trends
5. Continuation - a technical indicator used to identify trends
6. Volatility/Volume - a technical indicator used to identify volatility/volume breakouts/breakdown
7. Exit - a technical indicator used to determine when a trend is exhausted
8. Metamorphosis - a technical indicator that produces a compound signal from the combination of other GKD indicators*
*(not part of the NNFX algorithm)
What is Volatility in the NNFX trading system?
In the NNFX (No Nonsense Forex) trading system, ATR (Average True Range) is typically used to measure the volatility of an asset. It is used as a part of the system to help determine the appropriate stop loss and take profit levels for a trade. ATR is calculated by taking the average of the true range values over a specified period.
True range is calculated as the maximum of the following values:
-Current high minus the current low
-Absolute value of the current high minus the previous close
-Absolute value of the current low minus the previous close
ATR is a dynamic indicator that changes with changes in volatility. As volatility increases, the value of ATR increases, and as volatility decreases, the value of ATR decreases. By using ATR in NNFX system, traders can adjust their stop loss and take profit levels according to the volatility of the asset being traded. This helps to ensure that the trade is given enough room to move, while also minimizing potential losses.
Other types of volatility include True Range Double (TRD), Close-to-Close, and Garman-Klass
What is a Baseline indicator?
The baseline is essentially a moving average, and is used to determine the overall direction of the market.
The baseline in the NNFX system is used to filter out trades that are not in line with the long-term trend of the market. The baseline is plotted on the chart along with other indicators, such as the Moving Average (MA), the Relative Strength Index (RSI), and the Average True Range (ATR).
Trades are only taken when the price is in the same direction as the baseline. For example, if the baseline is sloping upwards, only long trades are taken, and if the baseline is sloping downwards, only short trades are taken. This approach helps to ensure that trades are in line with the overall trend of the market, and reduces the risk of entering trades that are likely to fail.
By using a baseline in the NNFX system, traders can have a clear reference point for determining the overall trend of the market, and can make more informed trading decisions. The baseline helps to filter out noise and false signals, and ensures that trades are taken in the direction of the long-term trend.
What is a Confirmation indicator?
Confirmation indicators are technical indicators that are used to confirm the signals generated by primary indicators. Primary indicators are the core indicators used in the NNFX system, such as the Average True Range (ATR), the Moving Average (MA), and the Relative Strength Index (RSI).
The purpose of the confirmation indicators is to reduce false signals and improve the accuracy of the trading system. They are designed to confirm the signals generated by the primary indicators by providing additional information about the strength and direction of the trend.
Some examples of confirmation indicators that may be used in the NNFX system include the Bollinger Bands, the MACD (Moving Average Convergence Divergence), and the MACD Oscillator. These indicators can provide information about the volatility, momentum, and trend strength of the market, and can be used to confirm the signals generated by the primary indicators.
In the NNFX system, confirmation indicators are used in combination with primary indicators and other filters to create a trading system that is robust and reliable. By using multiple indicators to confirm trading signals, the system aims to reduce the risk of false signals and improve the overall profitability of the trades.
What is a Continuation indicator?
In the NNFX (No Nonsense Forex) trading system, a continuation indicator is a technical indicator that is used to confirm a current trend and predict that the trend is likely to continue in the same direction. A continuation indicator is typically used in conjunction with other indicators in the system, such as a baseline indicator, to provide a comprehensive trading strategy.
What is a Volatility/Volume indicator?
Volume indicators, such as the On Balance Volume (OBV), the Chaikin Money Flow (CMF), or the Volume Price Trend (VPT), are used to measure the amount of buying and selling activity in a market. They are based on the trading volume of the market, and can provide information about the strength of the trend. In the NNFX system, volume indicators are used to confirm trading signals generated by the Moving Average and the Relative Strength Index. Volatility indicators include Average Direction Index, Waddah Attar, and Volatility Ratio. In the NNFX trading system, volatility is a proxy for volume and vice versa.
By using volume indicators as confirmation tools, the NNFX trading system aims to reduce the risk of false signals and improve the overall profitability of trades. These indicators can provide additional information about the market that is not captured by the primary indicators, and can help traders to make more informed trading decisions. In addition, volume indicators can be used to identify potential changes in market trends and to confirm the strength of price movements.
What is an Exit indicator?
The exit indicator is used in conjunction with other indicators in the system, such as the Moving Average (MA), the Relative Strength Index (RSI), and the Average True Range (ATR), to provide a comprehensive trading strategy.
The exit indicator in the NNFX system can be any technical indicator that is deemed effective at identifying optimal exit points. Examples of exit indicators that are commonly used include the Parabolic SAR, and the Average Directional Index (ADX).
The purpose of the exit indicator is to identify when a trend is likely to reverse or when the market conditions have changed, signaling the need to exit a trade. By using an exit indicator, traders can manage their risk and prevent significant losses.
In the NNFX system, the exit indicator is used in conjunction with a stop loss and a take profit order to maximize profits and minimize losses. The stop loss order is used to limit the amount of loss that can be incurred if the trade goes against the trader, while the take profit order is used to lock in profits when the trade is moving in the trader's favor.
Overall, the use of an exit indicator in the NNFX trading system is an important component of a comprehensive trading strategy. It allows traders to manage their risk effectively and improve the profitability of their trades by exiting at the right time.
What is an Metamorphosis indicator?
The concept of a metamorphosis indicator involves the integration of two or more GKD indicators to generate a compound signal. This is achieved by evaluating the accuracy of each indicator and selecting the signal from the indicator with the highest accuracy. As an illustration, let's consider a scenario where we calculate the accuracy of 10 indicators and choose the signal from the indicator that demonstrates the highest accuracy.
The resulting output from the metamorphosis indicator can then be utilized in a GKD-BT backtest by occupying a slot that aligns with the purpose of the metamorphosis indicator. The slot can be a GKD-B, GKD-C, or GKD-E slot, depending on the specific requirements and objectives of the indicator. This allows for seamless integration and utilization of the compound signal within the GKD-BT framework.
How does Loxx's GKD (Giga Kaleidoscope Modularized Trading System) implement the NNFX algorithm outlined above?
Loxx's GKD v2.0 system has five types of modules (indicators/strategies). These modules are:
1. GKD-BT - Backtesting module (Volatility, Number 1 in the NNFX algorithm)
2. GKD-B - Baseline module (Baseline and Volatility/Volume, Numbers 1 and 2 in the NNFX algorithm)
3. GKD-C - Confirmation 1/2 and Continuation module (Confirmation 1/2 and Continuation, Numbers 3, 4, and 5 in the NNFX algorithm)
4. GKD-V - Volatility/Volume module (Confirmation 1/2, Number 6 in the NNFX algorithm)
5. GKD-E - Exit module (Exit, Number 7 in the NNFX algorithm)
6. GKD-M - Metamorphosis module (Metamorphosis, Number 8 in the NNFX algorithm, but not part of the NNFX algorithm)
(additional module types will added in future releases)
Each module interacts with every module by passing data to A backtest module wherein the various components of the GKD system are combined to create a trading signal.
That is, the Baseline indicator passes its data to Volatility/Volume. The Volatility/Volume indicator passes its values to the Confirmation 1 indicator. The Confirmation 1 indicator passes its values to the Confirmation 2 indicator. The Confirmation 2 indicator passes its values to the Continuation indicator. The Continuation indicator passes its values to the Exit indicator, and finally, the Exit indicator passes its values to the Backtest strategy.
This chaining of indicators requires that each module conform to Loxx's GKD protocol, therefore allowing for the testing of every possible combination of technical indicators that make up the six components of the NNFX algorithm.
What does the application of the GKD trading system look like?
Example trading system:
Backtest: Multi-Ticker CC Backtest
Baseline: Hull Moving Average
Volatility/Volume: Hurst Exponent
Confirmation 1: Advance Trend Pressure as shown on the chart above
Confirmation 2: uf2018
Continuation: Coppock Curve
Exit: Rex Oscillator
Metamorphosis: Baseline Optimizer
Each GKD indicator is denoted with a module identifier of either: GKD-BT, GKD-B, GKD-C, GKD-V, GKD-M, or GKD-E. This allows traders to understand to which module each indicator belongs and where each indicator fits into the GKD system.
█ Giga Kaleidoscope Modularized Trading System Signals
Standard Entry
1. GKD-C Confirmation gives signal
2. Baseline agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Volatility/Volume agrees
1-Candle Standard Entry
1a. GKD-C Confirmation gives signal
2a. Baseline agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
Next Candle
1b. Price retraced
2b. Baseline agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Baseline Entry
1. GKD-B Baseline gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Volatility/Volume agrees
7. Confirmation 1 signal was less than 'Maximum Allowable PSBC Bars Back' prior
1-Candle Baseline Entry
1a. GKD-B Baseline gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSBC Bars Back' prior
Next Candle
1b. Price retraced
2b. Baseline agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Volatility/Volume Entry
1. GKD-V Volatility/Volume gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Baseline agrees
7. Confirmation 1 signal was less than 7 candles prior
1-Candle Volatility/Volume Entry
1a. GKD-V Volatility/Volume gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSVVC Bars Back' prior
Next Candle
1b. Price retraced
2b. Volatility/Volume agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Baseline agrees
Confirmation 2 Entry
1. GKD-C Confirmation 2 gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Volatility/Volume agrees
6. Baseline agrees
7. Confirmation 1 signal was less than 7 candles prior
1-Candle Confirmation 2 Entry
1a. GKD-C Confirmation 2 gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSC2C Bars Back' prior
Next Candle
1b. Price retraced
2b. Confirmation 2 agrees
3b. Confirmation 1 agrees
4b. Volatility/Volume agrees
5b. Baseline agrees
PullBack Entry
1a. GKD-B Baseline gives signal
2a. Confirmation 1 agrees
3a. Price is beyond 1.0x Volatility of Baseline
Next Candle
1b. Price inside Goldie Locks Zone Minimum
2b. Price inside Goldie Locks Zone Maximum
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Continuation Entry
1. Standard Entry, 1-Candle Standard Entry, Baseline Entry, 1-Candle Baseline Entry, Volatility/Volume Entry, 1-Candle Volatility/Volume Entry, Confirmation 2 Entry, 1-Candle Confirmation 2 Entry, or Pullback entry triggered previously
2. Baseline hasn't crossed since entry signal trigger
4. Confirmation 1 agrees
5. Baseline agrees
6. Confirmation 2 agrees
FreedX Grid Backtest█ FreedX Grid Backtest is an open-source tool that offers accurate GRID calculations for GRID trading strategies. This advanced tool allows users to backtest GRID trading parameters with precision, accurately reflecting exchange functionalities. We are committed to enhancing trading strategies through precise backtesting solutions and address the issue of unreliable backtesting practices observed on GRID trading strategies. FreedX Grid Backtest is designed for optimal calculation speed and plotting efficiency, ensuring users to achieve fastest calculations during their analysis.
█ GRID TRADING STRATEGY SETTINGS
The core of the FreedX Grid Backtest tool lies in its ability to simulate grid trading strategies. Grid trading involves placing orders at regular intervals within a predefined price range, creating a grid of orders that capitalize on market volatility.
Features:
⚙️ Backtest Range:
→ Purpose: Allows users to specify the backtesting range of GRID strategy. Closes all positions at the end of this range.
→ How to Use: Drag the dates to fit the desired backtesting range.
⚙️ Investment & Compounding:
→ Purpose: Allows users to specify the total investment amount and select between fixed and compound investment strategies. Compounding adjusts trade quantities based on performance, enhancing the grid strategy's adaptability to market changes.
→ How to Use: Set the desired investment amount and choose between "Fixed" or "Compound" for the investment method.
⚙️ Leverage & Grid Levels:
→ Purpose: Leverage amplifies the investment amount, increasing potential returns (and risks). Users can define the number of grid levels, which determines how the investment is distributed across the grid.
→ How to Use: Input the desired leverage and number of grids. The tool automatically calculates the distribution of funds across each grid level.
⚙️ Distribution Type & Mode:
→ Purpose: Users can select the distribution type (Arithmetic or Geometric) to set how grid levels are determined. The mode (Neutral, Long, Short) dictates the direction of trades within the grid.
→ How to Use: Choose the distribution type and mode based on the desired trading strategy and market outlook.
⚙️ Enable LONG/SHORT Grids exclusively:
█ MANUAL LEVELS AND STOP TRIGGERS
Beyond automated settings, the tool offers manual adjustments for traders seeking finer control over their grid strategies.
Features:
⚙️ Manual Level Adjustment:
→ Purpose: Enables traders to manually set the top, reference, and bottom levels of the grid, offering precision control over the trading range.
→ How to Use: Activate manual levels and adjust the top, reference, and bottom levels as needed to define the grid's scope.
⚙️ Stop Triggers:
→ Purpose: Provides an option to set upper and lower price limits, acting as stop triggers to close or terminate trades. This feature safeguards investments against significant market movements outside the anticipated range.
→ How to Use: Enable stop triggers and specify the upper and lower limits. The tool will automatically manage positions based on these parameters.
---
This guide gives you a quick and clear overview of the FreedX Grid Backtest tool, explaining how you can use this cutting-edge tool to improve your trading strategies.
FreedX Backtest Plus█ Our new FreedX Backtest PLUS template enhances TradingView backtesting with smart features like Mean Reversion, Flexible Volatility, Liquidation Filter, and Better Trend Filtering, making strategies more effective. It lets users set up automated alerts easily. This guide explains how to make the most of these improved features.
The Trading Date Settings feature in our TradingView script allows you to refine their backtesting parameters by specifying trading dates and hours. This feature enhances the accuracy of the backtest by aligning it with specific time frames and days, ensuring that the strategy is tested under relevant market conditions.
Features:
⚙️ Enable Trading Between Specific Dates:
🎯 Purpose:
→ Allows you to limit the backtesting of their strategy to a specific date range.
💡 How to Use:
→ Input the Start Date and End Date for the backtest period.
→ The script will execute the strategy only within this specified date range.
⚙️ Enable Trading Between Specific Hours:
🎯 Purpose:
→ Allows you to limit the backtesting of their strategy to a specific hour range.
💡 How to Use:
→ Input the start and end hour for in Trading Session section.
→ The script will execute the strategy only within this specified hour range.
⚙️ Enable Trading on Specified Days of the Week:
🎯 Purpose:
→ Gives you the option to conduct backtesting on selected days of the week, tailoring the strategy to particular market behaviours that may occur on these days.
💡 How to Use:
→ Select the days of the week for the backtest.
→ The script will activate the trading strategy only on these chosen days.
█ BUY/SELL TRIGGER SETTINGS
The Buy/Sell Trigger Settings feature is designed to provide users with flexibility in defining the conditions for 'LONG' and 'SHORT' signals based on various indicator types. This customization is crucial for tailoring strategies to different trading styles and market conditions.
Features:
⚙️ Single-Line Plotted Indicators :
🎯 Purpose:
→ Enables you to select a single-line plotted indicator as a source for backtesting. You can define specific levels to trigger 'LONG' or 'SHORT' signals.
💡 How to Use:
→ Choose a Single-Line Plotted indicator as the source.
→ Set the top and bottom levels for the indicator.
→ The script triggers 'LONG' signals at the bottom level and 'SHORT' signals at the top level.
⚙️ Two-Line Plotted Indicators :
🎯 Purpose:
→ Allows backtesting with two-line cross plot sources. Signals are generated based on the crossover of these lines.
💡 How to Use:
→ Select two lines as 'Source 1' and 'Source 2' for the indicator.
→ The script triggers a 'LONG' signal when 'Source 1' crosses above 'Source 2'.
→ Conversely, a 'SHORT' signal is triggered when 'Source 2' crosses above 'Source 1'.
⚙️ Custom Signals :
🎯 Purpose:
→ This setting enables users to define their own criteria for LONG, SHORT, and CLOSE signals based on custom indicator outputs.
💡 How to Use:
→ Select the custom source for your signals.
→ Define the output values that correspond to each signal type (e.g., “1” for 'LONG', “-1” for SHORT, and “0” for CLOSE).
→ The script will trigger signals according to these custom-defined values.
█ TP/SL SETTINGS
The TP/SL (Take Profit/Stop Loss) Settings feature is designed to give users control over their profit securing and risk mitigation strategies. This feature allows for setting custom TP and SL levels, which can be critical in managing trades effectively.
Features:
Custom TP/SL Levels for Long/Short Signals:
🎯 Purpose:
→ Enables users to set specific percentage levels for Take Profit and Stop Loss on long and short signals.
💡 How to Use:
→ In the TP/SL Settings, input the desired percentage for Take Profit (TP) and Stop Loss (SL).
→ For example, to secure a profit at a 10% price increase on LONG signals, set the “Long TP Percentage” to “10”.
█ STRATEGY SETTINGS
Strategy Settings provide a range of options to customize the trading strategy. These settings include leverage, position direction changes, and more, allowing users to tailor their strategy to their risk tolerance and market view.
Features:
⚙️ Enable Reverse Position:
🎯 Purpose:
→ Automatically closes a current position and opens a new one in the opposite direction upon detecting a signal for a market trend change.
🎯 Example:
→ If a LONG signal is received while in a SHORT position, the script will close the SHORT position and open a LONG position.
💡 How to Use:
→ Activate this feature in the Strategy Settings.
⚙️ Enable Spot Mode:
🎯 Purpose:
→ Disables short orders, using short signals only for closing long positions.
💡 How to Use:
→ Select the 'Spot Mode' option in the Strategy Settings.
⚙️ Enable Invert Signals:
🎯 Purpose:
→ Inverts all indicator signals, changing LONG signals to SHORT and vice versa.
💡 How to Use:
→ Opt for the 'Invert Signals' feature in the Strategy Settings.
⚙️ Enable Trailing Stop:
🎯 Purpose:
→ Triggers a trailing stop order on the exchange instead of a standard stop market order.
☢️ Caution:
→ The backtesting of this feature on TradingView may not accurately reflect actual strategy performance due to discrepancies between TradingView and exchange mechanisms.
💡 How to Use:
→ Select 'Trailing Stop' in the Strategy Settings.
⚙️ Enable Realistic TP & SL:
🎯 Purpose:
→ Goal is protect the user from unrealistic stop loss and take profit prices in live exchange trading conditions.
→ That feature continuously checks the take profit, stop loss and move stop loss prices to prevent unrealistic values. It changes their values according to (minimum realistic percent %)
💡 How to Use:
→ Select 'Enable Realistic TP & SL' in the Strategy Settings. Write min allowed percents.
█ LIMITER SETTINGS
Limiter Settings provide a range of options to customize the trading strategy. These settings include drawdown limits,contract limit, tradable ratio, for allowing users to tailor their strategy to their risk tolerance and market view.
⚙️ Leverage :
🎯 Purpose:
→ Allows users to apply leverage to their trades.
☢️ Caution:
→ High leverage can significantly increase the risk of liquidation.
→ High leverage and a high stop-loss price may override your fixed stoploss percentage, adjusting the stop-loss to the liquidation price.
💡 How to Use:
→ Set the desired leverage ratio in the Strategy Settings.
⚙️ Drawdown Limit:
🎯 Purpose:
→ Sets a maximum drawdown limit, automatically halting the strategy if this limit is reached, thereby controlling risk.
💡 How to Use:
→ Input the maximum drawdown limit (default: 100, min: 0, max: 100).
⚙️ Contract Limit:
🎯 Purpose:
→ Sets a maximum contract limit, beyond which the compound effect cannot be used. This is important to prevent market manipulation through large-volume orders.
💡 How to Use:
→ Input the maximum contract limit (min: 0).
⚙️ Tradable Ratio:
🎯 Purpose:
→ Sets a tradable ratio, it uses that ratio calculating entry cost for position. Main purpose is cash-out and cash-in according to balance change.
💡 How to Use:
→ Input the tradable ratio percent (default: 98, min: 0.1, max: 100).
█ CASH-OUT SETTINGS
Cash-Out Settings offer a money-saving mechanism that prevents entering positions with the entire balance due to cashed-out funds. It functions with a webhook alerts, but the 'Override Allocation %' option must be enabled.
⚙️ Cash-out Threshold %:
🎯 Purpose:
→ It is cash-out mechanism, it saves money with a target threshold.
💡 How to Use:
→ Input the threshold (min: 0).
⚙️ Cash-out Per Profitable Trades %:
🎯 Purpose:
→ It is cash-out mechanism, it saves money from every trade with a percent like commission.
💡 How to Use:
→ Input save percent% (min: 0).
█ ADAPTIVE VOLATILITY STRATEGY SETTINGS
Advanced Strategy Settings offer sophisticated methods for managing Stop Loss (SL) and Take Profit (TP) using the Average True Range (ATR). These settings are ideal for traders who want to incorporate volatility into their exit strategies.
Features:
⚙️ Enable ATR Stop Loss:
🎯 Purpose:
→ Automatically sets the Stop Loss price using the Average True Range at the time of entry.
💡 How to Use:
→ Activate 'ATR Stop Loss' to have the SL price calculated based on the current ATR.
⛓ Enable ATR Trailing Stop:
→ Dynamically updates the Stop Loss price with each new bar, according to the Average True Range.
→ Activate 'ATR Trailing Stop'.
→ Set the ATR Period to define the number of bars for ATR calculation.
→ Adjust the ATR SL Multiplier to determine the stop loss distance.
→ Modify the ATR TP Multiplier for setting the take profit distance.
⚙️ Enable ATR Take Profit:
🎯 Purpose:
→ Sets the Take Profit price based on the Average True Range at the time of entry.
💡 How to Use:
→ Choose 'ATR Take Profit' for TP price determination using ATR.
⚙️ Enable ATR Limit Entry:
🎯 Purpose:
→ Trade can not open in candle close price. Price should hit target price that based on average true range value.
💡 How to Use:
→ Choose 'ATR Limit Entry' for entry price determination using ATR.
⛓ Enable ATR Limit Entry Trailing Price:
→ Dynamically updates the entry price with each new bar, according to the Average True Range.
→ Activate 'ATR Limit Entry Trailing Price'.
→ Set the ATR Period to define the number of bars for ATR calculation.
→ Adjust the ATR SL Multiplier to determine the stop loss distance.
→ Modify the ATR TP Multiplier for setting the take profit distance.
█ TREND FILTERING SETTINGS
Trend Filtering Settings are designed to align trading strategies with the prevailing market trend, enhancing the precision of trade entries and exits. These settings utilize moving averages for trend analysis and decision-making.
Features:
⚙️ Enable Moving Average Filtering:
🎯 Purpose:
→ Limits trades based on moving average trends, blocking short trades in an uptrend and vice versa.
💡 How to Use:
→ Enable 'Trend Filtering'.
→ Set Fast and Slow MA Lengths for trend analysis.
→ Select the Timeframe for moving averages.
→ Choose the Moving Average Type for trend filtering.
🎯 Note:
→ Be cautious with timeframe selections; lower timeframes than the base may cause inconsistencies.
⛓ Exit on Trend Reversal:
→ Automatically closes a position when a market trend reversal is detected.
→ Turn on 'Exit on Trend Reversal' in the settings.
⛓ Ignore Counter Signals:
→ Ignores counter signals during trending market way.
→ If the trend way is long. All short signals will ignore and vice versa.
⛓ Enable Drawing On Chart:
→ Visually represents the trend filter directly on the chart for easy reference.
→ Activate 'Drawing On Chart' to see the trend filter overlaid on the trading chart.
⚙️ Enable Adx Filtering:
🎯 Purpose:
→ Limits trades based on adx value, blocking trades if trend strength is not enough or vice versa for invert mode.
💡 How to Use:
→ Enable 'Adx Filtering'.
→ Set Smoothing and Lengths for adx trend analysis.
→ Select level barrier for trend strength.
⚙️ Enable Custom Filtering:
🎯 Purpose:
→ Limits trades based on custom sources, blocking trades according to custom trades.
💡 How to Use:
→ Enable 'Custom Filtering'.
→ Select fast source.
→ Select slow source.
→ Enable lag mode.
█ MEAN REVERSION FILTERING SETTINGS
Mean Reversion Filtering Settings are designed to align trading strategies during accumulation market conditions. They set a distance from a line to permit trading. The purpose is to ensure that when the price strays too far from the mean line, it should revert back. In accumulation markets, price movements are generally horizontal. In such situations, mean reversion will operate like a grid, enabling profitable trades with low drawdown. However, when the market structure begins to trend, mean reversion filters may not be as profitable as in accumulation markets. For instance, let's say the price is rising and we are shorting the market until it reaches the mean price line. As the price goes up and the mean also rises, we will end up closing the position at a higher price, rendering the mean reversion system non-profitable. Therefore, consider this filter wisely; greater distances might work better in trending markets.
Features:
⚙️ Enable Kairi Filter:
🎯 Purpose:
→ Blocks trades based on distance percent between price and moving average.
💡 How to Use:
→ Enable 'Kairi Filter'.
→ Set Length and Distance Percent.
⛓ Enable Trend Drawing On Chart:
→ Visually represents the trend filter directly on the chart for easy reference.
→ Enable 'Drawing On Chart' to see the allowed regions overlaid on the trading chart with arrows.
⚙️ Enable VWAP Filter:
🎯 Purpose:
→ Blocks trades based on distance percent between price and volume weighted average price.
💡 How to Use:
→ Enable 'VWAP Filter'.
→ Set Timeframe as minutes and distance as percent.
⛓ Exit on Crossing with VWAP:
→ Automatically closes a position when the closing price of a candle crosses the VWAP.
→ Choose "Enable", 'Exit on Crossing with VWAP' in the settings.
⛓ Enable Drawing On Chart:
→ Visually represents the trend filter directly on the chart for easy reference.
→ Enable 'Drawing On Chart' to see the allowed regions overlaid on the trading chart with arrows.
█ LIQUIDATION FILTER SETTINGS
Liquidation filter compares the volume data of futures and spot markets.
Large differences in volume indicate unexpected market conditions, such as massive trading activities, which may signal liquidations.
Features:
⚙️ Enable Liquidation Filter:
🎯 Purpose:
→ Blocks trades based on extra ordinary volume differences in spot and futures market.
💡 How to Use:
→ Enable 'Liquidation Filter'.
→ Set behavior to react during that market conditions.
→ Set base amount to filter volume. This amount changes according to timeframe, you should find right amounts.
→ Liquidation candle count means, it is sum of liquidated candle count in last 20 bars.If you set 0, it means feature is disabled.
→ Detection, try to select the spot and perpetual symbols automatically, symbol names varies, it do not support all symbols, you should choose manually in that situation.
█ AUTOMATED ALERT SETTINGS
Automated Alert Settings are designed to integrate your TradingView script with webhook alerts. These settings allow for enhanced strategy execution and management.
Features:
Enable Webhook Alerts:
🎯 Purpose:
→ Trigger BUY, SELL, CHANGE_DIRECTION or MOVE_STOP_LOSS .
💡 How to Use:
→ Enable 'Webhook Alerts' in the settings.
→ Enter your Strategy Key.
→ Optionally, activate 'Override Allocation Percentage' to bypass the preset allocation percentage.
☢️ Caution:
→ Overriding the allocation percentage may result in trade entry errors due to misalignment between entry cost and available balance.
Enable Custom Alerts:
🎯 Purpose:
→ User can produce unique messages for different purposes.
💡 How to Use:
→ Enable 'Custom Alerts' in the settings.
→ Enter your message format type.
█ DEBUGGING SETTINGS
Debugging Settings are crucial for users who want to analyze and optimize their strategies. These settings provide tools for visualizing alerts on charts and accessing detailed data outputs.
Features:
⚙️ Enable Alert Plotting:
🎯 Purpose:
→ Allows users to visualize trading alerts directly on the chart, aiding in strategy analysis and refinement.
💡 How to Use:
→ Activate 'Alert Plotting' to draw alerts on the chart.
☢️ Caution:
→ It is recommended to disable this feature when creating actual trading alerts, as it can cause latency in signal processing.
⚙️ Enable Debugger Mode:
🎯 Purpose:
→ Facilitates strategy debugging by providing detailed data output in the TradingView Data Window.
💡 How to Use:
→ Turn on 'Debugger Mode' to access real-time data and metrics relevant to your strategy.
⚙️ Enable Table:
🎯 Purpose:
→ Facilitates strategy debugging by providing detailed data output in the TradingView Table on chart.
💡 How to Use:
→ Turn on 'Table' to access last closed candle data and metrics relevant to your strategy.
█ ADDITIONAL SETTINGS
⚙️ Enable Bar Magnifier
⚙️ Enable Using standard OHLC
Grid Bot BacktestingBinance, Bybit, Bitget, and other cross-exchange (grid) trading bot backtesting.
Auto bound: Automatically setting upper and lower price bounds.
Manual: Setting upper and lower price bounds manually.
The graph below represents the overall asset changes (initial investment amount + current position profit + grid profit).
Try using backtesting when setting up a grid bot on the exchange!
바이낸스, 바이비트, 비트겟 등 교차거래(그리드) 봇 백테스팅
Auto bound : 자동으로 상,하단 가격 설정
Manual : 직접 상,하단 가격 설정
아래 그래프는 총 자산 변화입니다.(초기투자금액 + 현재 포지션 수익 + 그리드 수익)
거래소에서 그리드 봇 설정할 때 백테스팅 유용하게 써보세요!
FreedX Backtest█ Our strategy template empowers TradingView users to effortlessly backtest any indicator, enhancing their trading strategy's effectiveness. In addition, users can create automated webhook alerts from the template. This document details our template's features and how to utilize them effectively.
█ TRADE DATE SETTINGS
The Trading Date Settings feature in our TradingView script allows you to refine their backtesting parameters by specifying trading dates and hours. This feature enhances the accuracy of the backtest by aligning it with specific time frames and days, ensuring that the strategy is tested under relevant market conditions.
Features:
⚙️ Enable Trading Between Specific Dates:
🎯 Purpose:
→ Allows you to limit the backtesting of their strategy to a specific date range.
💡 How to Use:
→ Input the Start Date and End Date for the backtest period.
→ The script will execute the strategy only within this specified date range.
⚙️ Enable Trading Between Specific Hours:
🎯 Purpose:
→ Allows you to limit the backtesting of their strategy to a specific hour range.
💡 How to Use:
→ Input the start and end hour for in Trading Session section.
→ The script will execute the strategy only within this specified hour range.
⚙️ Enable Trading on Specified Days of the Week:
🎯 Purpose:
→ Gives you the option to conduct backtesting on selected days of the week, tailoring the strategy to particular market behaviours that may occur on these days.
💡 How to Use:
→ Select the days of the week for the backtest.
→ The script will activate the trading strategy only on these chosen days.
█ BUY/SELL TRIGGER SETTINGS
The Buy/Sell Trigger Settings feature is designed to provide users with flexibility in defining the conditions for 'LONG' and 'SHORT' signals based on various indicator types. This customization is crucial for tailoring strategies to different trading styles and market conditions.
Features:
⚙️ Single-Line Plotted Indicators :
🎯 Purpose:
→ Enables you to select a single-line plotted indicator as a source for backtesting. You can define specific levels to trigger 'LONG' or 'SHORT' signals.
💡 How to Use:
→ Choose a Single-Line Plotted indicator as the source.
→ Set the top and bottom levels for the indicator.
→ The script triggers 'LONG' signals at the bottom level and 'SHORT' signals at the top level.
⚙️ Two-Line Plotted Indicators :
🎯 Purpose:
→ Allows backtesting with two-line cross plot sources. Signals are generated based on the crossover of these lines.
💡 How to Use:
→ Select two lines as 'Source 1' and 'Source 2' for the indicator.
→ The script triggers a 'LONG' signal when 'Source 1' crosses above 'Source 2'.
→ Conversely, a 'SHORT' signal is triggered when 'Source 2' crosses above 'Source 1'.
⚙️ Custom Signals :
🎯 Purpose:
→ This setting enables users to define their own criteria for LONG, SHORT, and CLOSE signals based on custom indicator outputs.
💡 How to Use:
→ Select the custom source for your signals.
→ Define the output values that correspond to each signal type (e.g., “1” for 'LONG', “-1” for SHORT, and “0” for CLOSE).
→ The script will trigger signals according to these custom-defined values.
█ TP/SL SETTINGS
The TP/SL (Take Profit/Stop Loss) Settings feature is designed to give users control over their profit securing and risk mitigation strategies. This feature allows for setting custom TP and SL levels, which can be critical in managing trades effectively.
Features:
Custom TP/SL Levels for Long/Short Signals:
🎯 Purpose:
→ Enables users to set specific percentage levels for Take Profit and Stop Loss on long and short signals.
💡 How to Use:
→ In the TP/SL Settings, input the desired percentage for Take Profit (TP) and Stop Loss (SL).
→ For example, to secure a profit at a 10% price increase on LONG signals, set the “Long TP Percentage” to “10”.
█ STRATEGY SETTINGS
Strategy Settings provide a range of options to customize the trading strategy. These settings include leverage, drawdown limits, position direction changes, and more, allowing users to tailor their strategy to their risk tolerance and market view.
Features:
⚙️ Enable Leverage :
🎯 Purpose:
→ Allows users to apply leverage to their trades.
☢️ Caution:
→ High leverage can significantly increase the risk of liquidation.
→ High leverage and a high stop-loss price may override your fixed stoploss percentage, adjusting the stop-loss to the liquidation price.
💡 How to Use:
→ Set the desired leverage ratio in the Strategy Settings.
⚙️ Enable Drawdown Limit:
🎯 Purpose:
→ Sets a maximum drawdown limit, automatically halting the strategy if this limit is reached, thereby controlling risk.
💡 How to Use:
→ Input the maximum drawdown limit (default: 100, min: 0, max: 100).
⚙️ Enable Reverse Position:
🎯 Purpose:
→ Automatically closes a current position and opens a new one in the opposite direction upon detecting a signal for a market trend change.
🎯 Example:
→ If a LONG signal is received while in a SHORT position, the script will close the SHORT position and open a LONG position.
💡 How to Use:
→ Activate this feature in the Strategy Settings.
⚙️ Enable Spot Mode:
🎯 Purpose:
→ Disables short orders, using short signals only for closing long positions.
💡 How to Use:
→ Select the 'Spot Mode' option in the Strategy Settings.
⚙️ Enable Invert Signals:
🎯 Purpose:
→ Inverts all indicator signals, changing LONG signals to SHORT and vice versa.
💡 How to Use:
→ Opt for the 'Invert Signals' feature in the Strategy Settings.
⚙️ Enable Trailing Stop:
🎯 Purpose:
→ Triggers a trailing stop order on the exchange instead of a standard stop market order.
☢️ Caution:
→ The backtesting of this feature on TradingView may not accurately reflect actual strategy performance due to discrepancies between TradingView and exchange mechanisms.
💡 How to Use:
→ Select 'Trailing Stop' in the Strategy Settings.
█ ADVANCED STRATEGY SETTINGS
Advanced Strategy Settings offer sophisticated methods for managing Stop Loss (SL) and Take Profit (TP) using the Average True Range (ATR). These settings are ideal for traders who want to incorporate volatility into their exit strategies.
Features:
⚙️ Enable ATR Stop Loss:
🎯 Purpose:
→ Automatically sets the Stop Loss price using the Average True Range at the time of entry.
💡 How to Use:
→ Activate 'ATR Stop Loss' to have the SL price calculated based on the current ATR.
⚙️ Enable ATR Take Profit:
🎯 Purpose:
→ Sets the Take Profit price based on the Average True Range at the time of entry.
💡 How to Use:
→ Choose 'ATR Take Profit' for TP price determination using ATR.
⚙️ Enable ATR Trailing Stop:
🎯 Purpose:
→ Dynamically updates the Stop Loss price with each new bar, according to the Average True Range.
💡 How to Use:
→ Activate 'ATR Trailing Stop'.
→ Set the ATR Period to define the number of bars for ATR calculation.
→ Adjust the ATR SL Multiplier to determine the stop loss distance.
→ Modify the ATR TP Multiplier for setting the take profit distance.
█ TREND FILTERING SETTINGS
Trend Filtering Settings are designed to align trading strategies with the prevailing market trend, enhancing the precision of trade entries and exits. These settings utilize moving averages for trend analysis and decision-making.
Features:
⚙️ Enable Trend Filtering:
🎯 Purpose:
→ Limits trades based on moving average trends, blocking short trades in an uptrend and vice versa.
💡 How to Use:
→ Enable 'Trend Filtering'.
→ Set Fast and Slow MA Lengths for trend analysis.
→ Select the Timeframe for moving averages.
→ Choose the Moving Average Type for trend filtering.
🎯 Note:
→ Be cautious with timeframe selections; lower timeframes than the base may cause inconsistencies.
⚙️ Enable Exit on Trend Reversal:
🎯 Purpose:
→ Automatically closes a position when a market trend reversal is detected.
💡 How to Use:
→ Turn on 'Exit on Trend Reversal' in the settings.
⚙️ Enable Trend Drawing On Chart:
🎯 Purpose:
→ Visually represents the trend filter directly on the chart for easy reference.
💡 How to Use:
→ Activate 'Trend Drawing On Chart' to see the trend filter overlaid on the trading chart.
█ AUTOMATED ALERT SETTINGS
Automated Alert Settings are designed to integrate your TradingView script with webhook alerts. These settings allow for enhanced strategy execution and management.
Features:
Enable Webhook Alerts:
🎯 Purpose:
→ Trigger BUY, SELL, CHANGE_DIRECTION or MOVE_STOP_LOSS .
💡 How to Use:
→ Enable 'Webhook Alerts' in the settings.
→ Enter your Strategy ID.
→ Optionally, activate 'Override Allocation Percentage' to bypass the preset allocation percentage.
☢️ Caution:
→ Overriding the allocation percentage may result in trade entry errors due to misalignment between entry cost and available balance.
█ DEBUGGING SETTINGS
Debugging Settings are crucial for users who want to analyze and optimize their strategies. These settings provide tools for visualizing alerts on charts and accessing detailed data outputs.
Features:
⚙️ Enable Alert Plotting:
🎯 Purpose:
→ Allows users to visualize trading alerts directly on the chart, aiding in strategy analysis and refinement.
💡 How to Use:
→ Activate 'Alert Plotting' to draw alerts on the chart.
☢️ Caution:
→ It is recommended to disable this feature when creating actual trading alerts, as it can cause latency in signal processing.
⚙️ Enable Debugger Mode:
🎯 Purpose:
→ Facilitates strategy debugging by providing detailed data output in the TradingView Data Window.
💡 How to Use:
→ Turn on 'Debugger Mode' to access real-time data and metrics relevant to your strategy.
█ ADDITIONAL SETTINGS
⚙️ Enable Bar Magnifier
⚙️ Enable Using standard OHLC
Ehlers Combo Strategy🚀 Presenting the Enhanced Ehlers Combo Strategy 🚀
Hello Traders! 👋 I'm thrilled to share the latest version of the Ehlers Combo Strategy v2.0. This powerful algorithm combines Ehlers Elegant Oscillator, Decycler, Instantaneous Trendline, Spearman Rank, and introduces the Signal to Noise Ratio for even more precise trading signals.
📊 Strategy Highlights:
Ehlers Elegant Oscillator: Captures market momentum and turning points.
Ehlers Decycler: Filters out market noise for clearer trend signals.
Instantaneous Trendline: Offers a dynamic view of the market trend.
Spearman Rank: Analyzes market rank correlations for enhanced insights.
Signal to Noise Ratio (SNR): Filters out noise for more accurate signals.
💡 Key Features & Customizations:
Adaptive Length: Enable adaptive length based on the market's current conditions.
SNR Threshold: Set your desired SNR threshold for filtering signals.
Exit Length: Define the length for exit signals.
📈 Trading Signals:
Long Entry: Elegant Oscillator and Decycler cross above 0, source crosses above Decycler, source is greater than an increasing Instantaneous Trendline, Spearman Rank is positive, and SNR exceeds the threshold.
Long Exit: Source crosses below the Instantaneous Trendline after entering a long position.
Short Entry: Elegant Oscillator and Decycler cross below 0, source crosses below Decycler, source is less than a decreasing Instantaneous Trendline, Spearman Rank is negative, and SNR exceeds the threshold.
Short Exit: Source crosses above the Instantaneous Trendline after entering a short position.
📊 Insights & Enhancements:
Dynamic Length: The strategy adapts its length dynamically based on market conditions.
Improved SNR: Signal to Noise Ratio ensures better filtering of signals.
Enhanced Visualization: The Elegant Oscillator now features improved color coding for a clearer interpretation.
🚨 Disclaimer:
Trading involves risk, and this script should be used judiciously. It's not a guaranteed profit machine, but with careful use, it can be a valuable addition to your toolkit.
Feel free to backtest, tweak, and make it your own! Let's conquer the markets together! 💪📈
🚀✨ Happy Trading! ✨🚀
---
🙌 Credits:
A big shoutout to the original contributors:
@blackcat1402
@cheatcountry
@DasanC
Back Week For BacktestIt is Backtest Calculator For Essential and Plus plan holders, the length of available intraday data is calculated as follows: from now to 6 weeks back multiplied by timeframe(in minutes), i.e. you can go 6 weeks back on the 1-minute chart, 12 weeks back on the 2-minute chart, 30 weeks back on the 5-minute chart, 90 weeks back on the 15-minute chart and so on. The higher timeframe is selected, the more intraday data is available.
This show creates a weekday label based on the data in the plans allowed by TradingView. This show creates a weekday label based on the data in the plans allowed by TradingView. How much data is available for Bar Replay? According to the article, we can replay 6 weeks backwards for a 1-minute chart. This indicator is a label that shows how far we can go back, consisting of multiplying each minute by 6 between 1 minute and 60 minutes.
1 minute => 6 week backtest
2 minutes => 12 week backtest
.....
15 minutes => 90 week backtest
...
59 minutes => 354 week backtest
Backtesting ModuleDo you often find yourself creating new 'strategy()' scripts for each trading system? Are you unable to focus on generating new systems due to fatigue and time loss incurred in the process? Here's a potential solution: the 'Backtesting Module' :)
INTRODUCTION
Every trading system is based on four basic conditions: long entry, long exit, short entry and short exit (which are typically defined as boolean series in Pine Script).
If you can define the conditions generated by your trading system as a series of integers, it becomes possible to use these variables in different scripts in efficient ways. (Pine Script is a convenient language that allows you to use the integer output of one indicator as a source in another.)
The 'Backtesting Module' is a dynamic strategy script designed to adapt to your signals. It boasts two notable features:
⮞ It produces a backtest report using the entry and exit variables you define.
⮞ It not only serves for system testing but also to combine independent signals into a single system. (This functionality enables to create complex strategies and report on their success!)
The module tests Golden and Death cross signals by default, when you enter your own conditions the default signals will be neutralized. The methodology is described below.
PREPARATION
There are three simple steps to connect your own indicator to the Module.
STEP 1
Firstly, you must define entry and exit variables in your own script. Let's elucidate it with a straightforward example. Consider a system generating long and short signals based on the intersections of two moving averages. Consequently, our conditions would be as follows:
// Signals
long = ta.crossover(ta.sma(close, 14), ta.sma(close, 28))
short = ta.crossunder(ta.sma(close, 14), ta.sma(close, 28))
Now, the question is: How can we convert boolean variables into integer variables? The answer is conditional ternary block, defined as follows:
// Entry & Exit
long_entry = long ? 1 : 0
long_exit = short ? 1 : 0
short_entry = short ? 1 : 0
short_exit = long ? 1 : 0
The mechanics of the Entry & Exit variables are simple. The variable takes on a value of 1 when your trading system generates the signal and if your system does not produce any signal, variable returns 0. In this example, you see how exit signals can be generated in a trading system that only contains entry signals. If you have a system with original exit signals, you can also use them directly. (Please mind the NOTES section below).
STEP 2
To utilize the Entry & Exit variables as source in another script, they must be plotted on the chart. Therefore, the final detail to include in the script containing your trading system would be as follows:
// Plot The Output
plot(long_entry, "Long Entry", display=display.data_window, editable=false)
plot(long_exit, "Long Exit", display=display.data_window, editable=false)
plot(short_entry, "Short Entry", display=display.data_window, editable=false)
plot(short_exit, "Short Exit", display=display.data_window, editable=false)
STEP 3
Now, we are ready to test the system! Load the Backtesting Module indicator onto the chart along with your trading system/indicator. Then set the outputs of your system (Long Entry, Long Exit, Short Entry, Short Exit) as source in the module. That's it.
FEATURES & ORIGINALITY
⮞ Primarily, this script has been created to provide you with an easy and practical method when testing your trading system.
⮞ I thought it might be nice to visualize a few useful results. The Backtesting Module provides insights into the outcomes of both long and short trades by computing the number of trades and the success percentage.
⮞ Through the 'Trade' parameter, users can specify the market direction in which the indicator is permitted to initiate positions.
⮞ Users have the flexibility to define the date range for the test.
⮞ There are optional features allowing users to plot entry prices on the chart and customize bar colors.
⮞ The report and the test date range are presented in a table on the chart screen. The entry price can be monitored in the data window.
⮞ Note that results are based on realized returns, and the open trade is not included in the displayed results. (The only exception is the 'Unrealized PNL' result in the table.)
STRATEGY SETTINGS
The default parameters are as follows:
⮞ Initial Balance : 10000 (in units of currency)
⮞ Quantity : 10% of equity
⮞ Commission : 0.04%
⮞ Slippage : 0
⮞ Dataset : All bars in the chart
For a realistic backtest result, you should size trades to only risk sustainable amounts of equity. Do not risk more than 5-10% on a trade. And ALWAYS configure your commission and slippage parameters according to pessimistic scenarios!
NOTES
⮞ This script is intended solely for development purposes. And it'll will be available for all the indicators I publish.
⮞ In this version of the module, all order types are designed as market orders. The exit size is the sum of the entry size.
⮞ As your trading conditions grow more intricate, you might need to define the outputs of your system in alternative ways. The method outlined in this description is tailored for straightforward signal structures.
⮞ Additionally, depending on the structure of your trading system, the backtest module may require further development. This encompasses stop-loss, take-profit, specific exit orders, quantity, margin and risk management calculations. I am considering releasing improvements that consider these options in future versions.
⮞ An example of how complex trading signals can be generated is the OTT Collection. If you're interested in seeing how the signals are constructed, you can use the link below.
THANKS
Special thanks to PineCoders for their valuable moderation efforts.
I hope this will be a useful example for the TradingView community...
DISCLAIMER
This is just an indicator, nothing more. It is provided for informational and educational purposes exclusively. The utilization of this script does not constitute professional or financial advice. The user solely bears the responsibility for risks associated with script usage. Do not forget to manage your risk. And trade as safely as possible. Best of luck!
Captain Backtest Model [TFO]Created by @imjesstwoone and @mickey1984, this trade model attempts to capture the expansion from the 10:00-14:00 EST 4h candle using just 3 simple steps. All of the information presented in this description has been outlined by its creators, all I did was translate it to Pine Script. All core settings of the trade model may be edited so that users can test several variations, however this description will cover its default, intended behavior using NQ 5m as an example.
Step 1 is to identify our Price Range. In this case, we are concerned with the highest high and the lowest low created from 6:00-10:00 EST.
Step 2 is to wait for either the high or low of said range to be taken out. Whichever side gets taken first determines the long/short bias for the remainder of the Trade Window (i.e. if price takes the range high, bias is long, and vice versa). Bias must be determined by 11:15 EST, otherwise no trades will be taken. This filter is intended to weed out "choppy" trading days.
Step 3 is to wait for a retracement and enter with a close through the previous candle's high (if long biased) or low (if short biased). There are a couple toggleable criteria that we use to define a retracement; one is checking for opposite close candles that indicate a pullback; another is checking if price took the previous candle's low (if long biased) or high (if short biased).
This trade model was initially tested for index futures, particularly ES and NQ, using a 5m chart, however this indicator allows us to backtest any symbol on any timeframe. Creators @imjesstwoone and @mickey1984 specified a 5 point stop loss on ES and a 25 point stop loss on NQ with their testing.
I've personally found some success in backtesting NQ 5m using a 25 point stop loss and 75 point profit target (3:1 R). Enabling the Use Fixed R:R parameter will ensure that these stops and targets are utilized, otherwise it will enter and hold the position until the close of the Trade Window.
MMI Auto Backtesting StrategyDescription:
A strategy based on ATR with auto-backtesting capabilities, Take Profit and Stop Loss (either Normal or Trailing). It allows you to select ranges of values and step for each parameter, and backtest the strategy on a multitude of input combinations at once. You can alternatively use a constant value for each parameter. The backtesting results strive to be as close as possible to those given by Tradingview Strategy Tester.
The strategy displays a table with results for different input combinations. This has columns showing current input combination as well as the following stats: Net Profit, Number of trades, % of Profitable trades, Profit Factor, Max Drawdown, Max Runup, Average Trade and Average number of bars in a trade.
You can sort the table by any column (including sorting by multiple columns at the same time) to find, for example, input combination that gives highest Net Profit (or, if sorting by multiple columns, to find input combination with the best balance of Net Profit and % of Profitable trades). You can filter by any column as well (or multiple columns at the same time), using logical expressions like "< value", "> value", "<= value", ">= value". And you can use logical expressions like "< value%" for Net Profit, Max Drawdown, Max Runup and Average trade to filter by percentage value. You will see a "↓" symbol in column's header if that column is sorted from Highest to Lowest, a "↑" symbol if it's sorted from Lowest to Highest and a "𐕢" symbol if that column is being filtered.
The table has customisable styles (like text color, background color of cells, etc.), and can show the total number of backtested combinations with the time taken to test them. You can also change Initial Capital and Position Size (either Contracts, Currency or % of Equity).
Parameters:
The following parameters are located in the "INPUTS (USUAL STRATEGY)" group, and control the behaviour of strategy itself (not the auto-backtesting functionality):
- Period: ATR Length
- Multiplier: ATR Multiplier
- DPO: length of the filtering moving average
- SL: stop loss
- TP: take profit
- Use Stop Loss: enable stop loss
- Stop Loss Mode: stop loss mode (either Normal or Trailing)
- Use Take Profit: enable take profit
- Wicks: use high & low price, or close price
The strategy also has various parameters separated by different groups:
- INPUTS (AUTO-BACKTESTING): has the same parameters as the "INPUTS (USUAL STRATEGY)" group, but controls the input combinations for auto-backtesting; all the numeric parameters have 3 values: F/V (from), T (to) and S (step); if the checkbox to the left of F/V parameter is off, the value of F/V will indicate the constant value used for that parameter (if the checkbox is on, the values will be from F/V to T using step S)
- STRATEGY: contains strategy related parameters like Initial Capital and Position Size
- BACKTESTING: allows you to display either Percentage, Absolute or Both values in the table and has checkboxes that allow you to exclude certain columns from the table
- SORTING: allows you to select sorting mode (Highest to Lowest or vice versa) and has checkboxes in case you want to sort by multiple columns at the same time
- FILTERING: has a text field for each column of the strategy where you can type logical expressions to filter the values
- TABLE: contains styling parameters
Many parameters have the "(i)" description marker, so hover over it to see more details.
Problems:
- The script works best on lower timeframes and continuous markets (trades 24/7), in other cases the backtesting results may vary from those that Tradingview shows
- The script shows closest results when Take Profit and Stop Loss are not used
- Max Runup percentage value is often wrong
Limitations:
- As we are limited by the maximum time a script can be running (which is 20s for Free plan and 40s for Paid plans), we can only backtest several hundreds of combinations within that timeframe (though it depends on the parameters, market and timeframe of the chart you use)
TradeMaster SignalsTrading effectively requires a range of techniques, experience, and expertise. From technical analysis to market fundamentals, traders must navigate multiple factors, including market sentiment and economic conditions. However, traders often find themselves overwhelmed by market noise, making it challenging to filter out distractions and make informed decisions. To address this, we present a powerful indicator package designed to assist traders on their journey to success.
The TradeMaster indicator package encompasses a variety of trading strategies, including the SMC (Supply, Demand, and Price Action) approach, along with many other techniques. By leveraging concepts such as price action trading, support and resistance analysis, supply and demand dynamics, these indicators can empower traders to analyze entry and exit positions with precision. Unlike other forms of technical analysis that produce values or plots based on historical price data, Price Action brings you the facts straight from the source - the current price movements.
The indicator package consists of three powerful indicators that can be used individually or together to maximize trading effectiveness.
⭐ About the Signals Indicator
This indicator offers a unique opportunity for traders to design their own personalized trading strategy. It has a built-in backtesting system, which allows you to thoroughly analyze the performance of your strategy before implementing it in live trading. With the ability to customize and test your strategy using historical data, the Signals indicator empowers you to make data-driven decisions and refine your trading approach.
👉 How does it work?
The Signals indicator provides users with the ability to select trigger conditions and further narrow them down using confirmations.
Conditions are quantitative factors that influence the generation of signals on the chart and in the backtest table. You can enable multiple conditions to create a comprehensive set of criteria for signal generation.
Confirmations, on the other hand, are qualitative factors that selectively filter out conditions based on their alignment with the chosen confirmations. This helps refine the signals and provide more targeted trading opportunities. Multiple confirmations can be enabled to further enhance the precision of the signals.
A well-balanced strategy in the Signals indicator involves carefully selecting a combination of conditions and confirmations to generate accurate trading signals. Finding the right balance between them is crucial for consistent and profitable trading.
To offer even more flexibility, the Signals indicator includes two powerful main functions:
Target Placement System: This feature allows you to set up to 6 targets with a stop loss level and partial exit percentages. You can choose between automatic target creation or manual customization, giving you control over your profit targets.
Exit Strategy: With this feature, you can define your preferred trailing stop strategy, allowing you to implement a systematic approach to exiting trades. By setting appropriate trailing stop levels, you can limit potential losses, while the system secures profits by automatically closing positions partially when certain price targets are reached. This may help you to maintain discipline in your trading and optimize your risk-reward ratio.
With over 30 unique conditions, 10 confirmations, and the deep Target Placement and Exit Strategy systems, the Signals indicator offers a vast array of possibilities. In fact, there are potentially millions of different strategy outputs available for each ticker. Despite its complexity, the script remains lightweight and fast, ensuring smooth performance.
The Signals Backtest table provides a comprehensive overview of your strategy's performance. You can track your current position with all the necessary details, allowing you to monitor your trades effectively and make informed decisions based on the backtest results.
⚠️ WARNING!
Backtest results do not guarantee future performance. Strategies tested on synthetic data may not accurately represent real-world results. Testing should be conducted on charts that reflect actual closing prices.
The indicator displays buy/sell signals intended to support traders' analysis. There are numerous possibilities and combinations available to create your own unique strategies, whether trading with or against the trend or capturing oversold bounces. These are just a few of the many options! Our indicator can easily be tailored to fit your trading strategy.
The settings that influence the signal-generating algorithm play a crucial role in effectively utilizing the signals. We provide users with the flexibility to modify the settings to align with their trading style, while also offering simple adjustment methods using various techniques.
Each method for modifying the signal settings has been designed to meet specific user needs. It is important to understand that one method is not necessarily more accurate than another.
It is essential to understand that signal indications generally serve as trend confirmations, rather than direct entry and exit points. Focusing on the easy use of signal settings and utilizing other functionalities in our toolkit will likely be a better decision than attempting to find the "holy grail" of optimized signal settings and solely relying on following the signals.
⭐ Conclusion
We hold the view that the true path to success is the synergy between the trader and the tool, contrary to the common belief that the tool itself is the sole determinant of profitability. The actual scenario is more nuanced than such an oversimplification. Our aim is to offer useful features that meet the needs of the 21st century and that we actually use.
🛑 Risk Notice:
Everything provided by trademasterindicator – from scripts, tools, and articles to educational materials – is intended solely for educational and informational purposes. Past performance does not assure future returns.
GKD-BT Baseline Backtest [Loxx]The Giga Kaleidoscope GKD-BT Baseline Backtest is a backtesting module included in Loxx's "Giga Kaleidoscope Modularized Trading System."
█ GKD-BT Baseline Backtest
The GKD-BT Baseline Backtest allows traders to backtest the Regular and Stepped baselines used in the GKD trading system. This module includes 65+ moving averages and 15+ types of volatility to choose from.
Additionally, this backtest module provides the option to test the GKD-B indicator with 1 to 3 take profits and 1 stop loss. The Trading backtest allows for the use of 1 to 3 take profits, while the Full backtest is limited to 1 take profit. The Trading backtest also offers the capability to apply a trailing take profit.
In terms of the percentage of trade removed at each take profit, this backtest module has the following hardcoded values:
Take profit 1: 50% of the trade is removed
Take profit 2: 25% of the trade is removed
Take profit 3: 25% of the trade is removed
Stop loss: 100% of the trade is removed
After each take profit is achieved, the stop loss level is adjusted. When take profit 1 is reached, the stop loss is moved to the entry point. Similarly, when take profit 2 is reached, the stop loss is shifted to take profit 1. The trailing take profit feature comes into play after take profit 2 or take profit 3, depending on the number of take profits selected in the settings. The trailing take profit is always activated on the final take profit when 2 or more take profits are chosen.
The backtest also offers the capability to restrict by a specific date range, allowing for simulated forward testing based on past data. Additionally, users have the option to display or hide a trading panel that provides relevant information about the backtest, statistics, and the current trade. It is also possible to activate alerts and toggle sections of the trading panel on or off. On the chart, historical take profit and stop loss levels are represented by horizontal lines overlaid for reference.
This backtest also includes an optional GKD-E Exit indicator that can be used to test early exits.
The GKD system utilizes volatility-based take profits and stop losses. Each take profit and stop loss is calculated as a multiple of volatility. You can change the values of the multipliers in the settings as well.
To utilize this strategy, follow these steps:
1. (Required) Import the value "Input into NEW GKD-BT Backtest" from the GKD-B Baseline indicator into the GKD-BT Baseline Backtest field "Import GKD-B Baseline"
2. (Optional) Import the value "Input into NEW GKD-BT Backtest" from the GKD-E Exit indicator into the GKD-BT Baseline Backtest field "Import GKD-E Exit". You can toggle the Exit on or off using the "Activate GKD-E Exit" option.
Baselines that are compatible with this backtest module:
GKD-B Baseline
GKD-B Stepped Baseline
Volatility Types Included
17 types of volatility are included in this indicator
Close-to-Close
Parkinson
Garman-Klass
Rogers-Satchell
Yang-Zhang
Garman-Klass-Yang-Zhang
Exponential Weighted Moving Average
Standard Deviation of Log Returns
Pseudo GARCH(2,2)
Average True Range
True Range Double
Standard Deviation
Adaptive Deviation
Median Absolute Deviation
Efficiency-Ratio Adaptive ATR
Mean Absolute Deviation
Static Percent
█ Giga Kaleidoscope Modularized Trading System
Core components of an NNFX algorithmic trading strategy
The NNFX algorithm is built on the principles of trend, momentum, and volatility. There are six core components in the NNFX trading algorithm:
1. Volatility - price volatility; e.g., Average True Range, True Range Double, Close-to-Close, etc.
2. Baseline - a moving average to identify price trend
3. Confirmation 1 - a technical indicator used to identify trends
4. Confirmation 2 - a technical indicator used to identify trends
5. Continuation - a technical indicator used to identify trends
6. Volatility/Volume - a technical indicator used to identify volatility/volume breakouts/breakdown
7. Exit - a technical indicator used to determine when a trend is exhausted
8. Metamorphosis - a technical indicator that produces a compound signal from the combination of other GKD indicators*
*(not part of the NNFX algorithm)
What is Volatility in the NNFX trading system?
In the NNFX (No Nonsense Forex) trading system, ATR (Average True Range) is typically used to measure the volatility of an asset. It is used as a part of the system to help determine the appropriate stop loss and take profit levels for a trade. ATR is calculated by taking the average of the true range values over a specified period.
True range is calculated as the maximum of the following values:
-Current high minus the current low
-Absolute value of the current high minus the previous close
-Absolute value of the current low minus the previous close
ATR is a dynamic indicator that changes with changes in volatility. As volatility increases, the value of ATR increases, and as volatility decreases, the value of ATR decreases. By using ATR in NNFX system, traders can adjust their stop loss and take profit levels according to the volatility of the asset being traded. This helps to ensure that the trade is given enough room to move, while also minimizing potential losses.
Other types of volatility include True Range Double (TRD), Close-to-Close, and Garman-Klass
What is a Baseline indicator?
The baseline is essentially a moving average, and is used to determine the overall direction of the market.
The baseline in the NNFX system is used to filter out trades that are not in line with the long-term trend of the market. The baseline is plotted on the chart along with other indicators, such as the Moving Average (MA), the Relative Strength Index (RSI), and the Average True Range (ATR).
Trades are only taken when the price is in the same direction as the baseline. For example, if the baseline is sloping upwards, only long trades are taken, and if the baseline is sloping downwards, only short trades are taken. This approach helps to ensure that trades are in line with the overall trend of the market, and reduces the risk of entering trades that are likely to fail.
By using a baseline in the NNFX system, traders can have a clear reference point for determining the overall trend of the market, and can make more informed trading decisions. The baseline helps to filter out noise and false signals, and ensures that trades are taken in the direction of the long-term trend.
What is a Confirmation indicator?
Confirmation indicators are technical indicators that are used to confirm the signals generated by primary indicators. Primary indicators are the core indicators used in the NNFX system, such as the Average True Range (ATR), the Moving Average (MA), and the Relative Strength Index (RSI).
The purpose of the confirmation indicators is to reduce false signals and improve the accuracy of the trading system. They are designed to confirm the signals generated by the primary indicators by providing additional information about the strength and direction of the trend.
Some examples of confirmation indicators that may be used in the NNFX system include the Bollinger Bands, the MACD (Moving Average Convergence Divergence), and the MACD Oscillator. These indicators can provide information about the volatility, momentum, and trend strength of the market, and can be used to confirm the signals generated by the primary indicators.
In the NNFX system, confirmation indicators are used in combination with primary indicators and other filters to create a trading system that is robust and reliable. By using multiple indicators to confirm trading signals, the system aims to reduce the risk of false signals and improve the overall profitability of the trades.
What is a Continuation indicator?
In the NNFX (No Nonsense Forex) trading system, a continuation indicator is a technical indicator that is used to confirm a current trend and predict that the trend is likely to continue in the same direction. A continuation indicator is typically used in conjunction with other indicators in the system, such as a baseline indicator, to provide a comprehensive trading strategy.
What is a Volatility/Volume indicator?
Volume indicators, such as the On Balance Volume (OBV), the Chaikin Money Flow (CMF), or the Volume Price Trend (VPT), are used to measure the amount of buying and selling activity in a market. They are based on the trading volume of the market, and can provide information about the strength of the trend. In the NNFX system, volume indicators are used to confirm trading signals generated by the Moving Average and the Relative Strength Index. Volatility indicators include Average Direction Index, Waddah Attar, and Volatility Ratio. In the NNFX trading system, volatility is a proxy for volume and vice versa.
By using volume indicators as confirmation tools, the NNFX trading system aims to reduce the risk of false signals and improve the overall profitability of trades. These indicators can provide additional information about the market that is not captured by the primary indicators, and can help traders to make more informed trading decisions. In addition, volume indicators can be used to identify potential changes in market trends and to confirm the strength of price movements.
What is an Exit indicator?
The exit indicator is used in conjunction with other indicators in the system, such as the Moving Average (MA), the Relative Strength Index (RSI), and the Average True Range (ATR), to provide a comprehensive trading strategy.
The exit indicator in the NNFX system can be any technical indicator that is deemed effective at identifying optimal exit points. Examples of exit indicators that are commonly used include the Parabolic SAR, the Average Directional Index (ADX), and the Chandelier Exit.
The purpose of the exit indicator is to identify when a trend is likely to reverse or when the market conditions have changed, signaling the need to exit a trade. By using an exit indicator, traders can manage their risk and prevent significant losses.
In the NNFX system, the exit indicator is used in conjunction with a stop loss and a take profit order to maximize profits and minimize losses. The stop loss order is used to limit the amount of loss that can be incurred if the trade goes against the trader, while the take profit order is used to lock in profits when the trade is moving in the trader's favor.
Overall, the use of an exit indicator in the NNFX trading system is an important component of a comprehensive trading strategy. It allows traders to manage their risk effectively and improve the profitability of their trades by exiting at the right time.
What is an Metamorphosis indicator?
The concept of a metamorphosis indicator involves the integration of two or more GKD indicators to generate a compound signal. This is achieved by evaluating the accuracy of each indicator and selecting the signal from the indicator with the highest accuracy. As an illustration, let's consider a scenario where we calculate the accuracy of 10 indicators and choose the signal from the indicator that demonstrates the highest accuracy.
The resulting output from the metamorphosis indicator can then be utilized in a GKD-BT backtest by occupying a slot that aligns with the purpose of the metamorphosis indicator. The slot can be a GKD-B, GKD-C, or GKD-E slot, depending on the specific requirements and objectives of the indicator. This allows for seamless integration and utilization of the compound signal within the GKD-BT framework.
How does Loxx's GKD (Giga Kaleidoscope Modularized Trading System) implement the NNFX algorithm outlined above?
Loxx's GKD v2.0 system has five types of modules (indicators/strategies). These modules are:
1. GKD-BT - Backtesting module (Volatility, Number 1 in the NNFX algorithm)
2. GKD-B - Baseline module (Baseline and Volatility/Volume, Numbers 1 and 2 in the NNFX algorithm)
3. GKD-C - Confirmation 1/2 and Continuation module (Confirmation 1/2 and Continuation, Numbers 3, 4, and 5 in the NNFX algorithm)
4. GKD-V - Volatility/Volume module (Confirmation 1/2, Number 6 in the NNFX algorithm)
5. GKD-E - Exit module (Exit, Number 7 in the NNFX algorithm)
6. GKD-M - Metamorphosis module (Metamorphosis, Number 8 in the NNFX algorithm, but not part of the NNFX algorithm)
(additional module types will added in future releases)
Each module interacts with every module by passing data to A backtest module wherein the various components of the GKD system are combined to create a trading signal.
That is, the Baseline indicator passes its data to Volatility/Volume. The Volatility/Volume indicator passes its values to the Confirmation 1 indicator. The Confirmation 1 indicator passes its values to the Confirmation 2 indicator. The Confirmation 2 indicator passes its values to the Continuation indicator. The Continuation indicator passes its values to the Exit indicator, and finally, the Exit indicator passes its values to the Backtest strategy.
This chaining of indicators requires that each module conform to Loxx's GKD protocol, therefore allowing for the testing of every possible combination of technical indicators that make up the six components of the NNFX algorithm.
What does the application of the GKD trading system look like?
Example trading system:
Backtest: GKD-BT Baseline Backtest as shown on the chart above
Baseline: Hull Moving Average as shown on the chart above
Volatility/Volume: Hurst Exponent
Confirmation 1: Sherif's HiLo
Confirmation 2: uf2018
Continuation: Coppock Curve
Exit: Fisher Transform as shown on the chart above
Metamorphosis: Baseline Optimizer
Each GKD indicator is denoted with a module identifier of either: GKD-BT, GKD-B, GKD-C, GKD-V, GKD-M, or GKD-E. This allows traders to understand to which module each indicator belongs and where each indicator fits into the GKD system.
█ Giga Kaleidoscope Modularized Trading System Signals
Standard Entry
1. GKD-C Confirmation gives signal
2. Baseline agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Volatility/Volume agrees
1-Candle Standard Entry
1a. GKD-C Confirmation gives signal
2a. Baseline agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
Next Candle
1b. Price retraced
2b. Baseline agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Baseline Entry
1. GKD-B Baseline gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Volatility/Volume agrees
7. Confirmation 1 signal was less than 'Maximum Allowable PSBC Bars Back' prior
1-Candle Baseline Entry
1a. GKD-B Baseline gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSBC Bars Back' prior
Next Candle
1b. Price retraced
2b. Baseline agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Volatility/Volume Entry
1. GKD-V Volatility/Volume gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Baseline agrees
7. Confirmation 1 signal was less than 7 candles prior
1-Candle Volatility/Volume Entry
1a. GKD-V Volatility/Volume gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSVVC Bars Back' prior
Next Candle
1b. Price retraced
2b. Volatility/Volume agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Baseline agrees
Confirmation 2 Entry
1. GKD-C Confirmation 2 gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Volatility/Volume agrees
6. Baseline agrees
7. Confirmation 1 signal was less than 7 candles prior
1-Candle Confirmation 2 Entry
1a. GKD-C Confirmation 2 gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSC2C Bars Back' prior
Next Candle
1b. Price retraced
2b. Confirmation 2 agrees
3b. Confirmation 1 agrees
4b. Volatility/Volume agrees
5b. Baseline agrees
PullBack Entry
1a. GKD-B Baseline gives signal
2a. Confirmation 1 agrees
3a. Price is beyond 1.0x Volatility of Baseline
Next Candle
1b. Price inside Goldie Locks Zone Minimum
2b. Price inside Goldie Locks Zone Maximum
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Continuation Entry
1. Standard Entry, 1-Candle Standard Entry, Baseline Entry, 1-Candle Baseline Entry, Volatility/Volume Entry, 1-Candle Volatility/Volume Entry, Confirmation 2 Entry, 1-Candle Confirmation 2 Entry, or Pullback entry triggered previously
2. Baseline hasn't crossed since entry signal trigger
4. Confirmation 1 agrees
5. Baseline agrees
6. Confirmation 2 agrees
Easy Trade Pro [Buy and Sell Strategy + Backtesting System]Hello Traders,
Easy Trade Pro is a comprehensive tool that combines multiple technical indicators into a single customizable one. This tool is the culmination of an extensive trading career, it is designed to help traders navigate the markets in any timeframe and financial asset, like Equities, Futures, Crypto, Forex and Commodities.
Before we deep dive into the comprehensive guide on what Easy Trade Pro is, let's kick off by showcasing the strategy used in this example. Please note, we have adopted an extremely conservative approach strictly following the Tradingview House Rules, which you can review here: www.tradingview.com
The backtest strategy parameters:
Currency pair: EUR USD
Timeframe: 15-min chart
Market: Spot, no leverage
Broker: FXCM
Trading range: 2022-09-01 07:30 — 2023-06-26 20:00
Backtesting range: 2022-08-31 23:00 — 2023-06-26 20:00
Initial Capital: $10,000
Buy Order Size: 20% of the capital, $2,000
Stop Loss: 0.50%
Sell orders: Four different take profits where we unload the position by 25% each time
Broker Fees: Commission set at 0.08$
Slippage: 10 ticks
Understanding FXCM Commissions and Setting Realistic Slippage for EUR/USD Spot Trading:
◉I would like to provide some clarity on the commission structure and slippage setting used in the study for trading the EUR/USD pair on the FXCM spot market. Based on the information available, FXCM charges a commission of $4.00 per standard lot (100,000) on both sides of the trade (meaning at open and close) for the EUR/USD pair. Since the study involve an order size of $2,000 USD, which is equivalent to 0.02 lots, the commission fee for one side of the trade (either buying or selling) would be calculated as $4.00 multiplied by 0.02, which is $0.08. This means that for each individual trade, whether it be a buy or sell, the commission fee would be $0.08.
◉As for slippage, it is crucial to account for the inherent uncertainty in the execution price due to market fluctuations. In the forex market, the EUR/USD pair is quoted with a precision of five decimal places, with the smallest price change being a "pipette" (0.00001). Given that slippage can vary based on market conditions, it is considered fair practice to use a slippage of around 10 ticks under normal market conditions for the EUR/USD pair. This allows for a more realistic representation of the execution price, especially in a liquid and fast-moving market such as forex.
More detailed information about FXCM fees structure in the link below:
docs.fxcorporate.com
Enter a Trade conditions:
For our buy order, we utilize a custom buy signal called 'Bullish Reversal'. A detailed explanation of this and other buy orders can be found later in the guide, specifically in section 1).
To enhance realism in our trading strategy, we have implemented a confirmation mechanism. When utilizing the strategy tester, you have the option to input a value to determine the number of confirmation candles to consider.
For example, if you set the input to 1, the system will check if the next candle following the signal meets the criteria for confirmation. If set to 2, the system will evaluate the second candle, and so on for higher values. The confirmation is determined by comparing the closing or opening price of the selected buy signal candle with the corresponding closing price of the confirmation candle.
In this case we choose as buy signal: 'Bullish Reversal' + 2 candle of confirmation
Exit a trade conditions:
On the sell side, we exit a trade in four different types of sell orders where we take profits. Inside '', you will encounter unique labels attributed to our custom sell signals. A detailed explanation of these sell orders can be found later in the guide, specifically in section 1). We used custom order called:
1TP 'Good Sell'
2TP 'Good Sell'
3TP 'Good Sell'
4TP 'Bearish Reversal' + 4 confirmation candles
Our confirmation logic, for sell signals, is applied only to 'Bearish Reversal' signal. The confirmation is determined by comparing the closing or opening price of the selected 'Bearish Reversal' candle with the corresponding closing price of the confirmation candle. In this case, we wait for the fourth candle from the 'Bearish Reversal' signal to confirm the sell trade.
Protect your capital:
This super-conservative study involves a clear low risk, with the use of $2,000, 20% of our capital. If the stop loss of 0.5% were triggered, we lose 10$, equating to 0.10% of $10,000 - thus affecting only 0.10% of our capital.
Super Conservative Approach & Results:
With 353 closed trades, we achieved a net profit of 2.03%, or $203.34$ relative to our initial $10,000 capital, and a win rate of 73.37%.
Less Conservative Approach & Results:
We could also consider increasing our risk to 0.5% of our capital per trade. We would maintain our stop loss at 0.50%, but we would need to use all our capital to enter the market. If the stop loss of 0.5% will be triggered, we would lose 50$, equating to 0.5% of $10,000.
In this scenario, our net profit would have increased to 10.15%, equivalent to $1015.
Please be aware:
While fully automated strategies can bring considerable advantages, they are not without their cons. For one, relying solely on an automated system may not take into account the potential confluence of other strategies or indicators, such as the significance of support and resistance zones. These elements often require a more nuanced, human understanding of the markets and cannot always be perfectly replicated by an algorithm.
Additionally, it's essential to remember that a significant percentage of traders are not consistently profitable. As such, prudent risk management, a conservative approach, and acceptance of a reasonable profit are crucial aspects of successful trading. While the allure of high returns can be tempting, the sustainability of your trading strategy should always take precedence. Achieving steady, reliable profits over time often outweighs the appeal of a risky, high-return strategy that could potentially lead to substantial losses.
So, while automation can be a powerful tool in your trading arsenal, it's also important to consider other strategies and factors. Always ensure you're managing your risk effectively and approaching trading with a realistic and informed perspective.
------------------------------------------------------------------------ Why Easy Trade Pro is Original? ----------------------------------------------------------------------------------
We developed Easy Trade Pro as a unique and comprehensive solution, and we decided to protect our code to preserve its originality. We invested significant time and effort into making it a realistic trading strategy simulator. The standout features that set Easy Trade Pro apart include:
☀ Versatile Stop Loss Mechanisms: Stop loss execution can be complex and often requires careful coding to work as intended. In most freely available open-source codes, stop losses are implemented using the Average True Range (ATR). ATR can be beneficial but has limitations:
☁ Lagging Indicator - Like most technical indicators, the ATR is a lagging indicator. This means it is based on past data, and so it may not accurately reflect future market volatility. If market conditions change rapidly, the ATR may not adjust quickly enough, potentially leading to suboptimal stop loss levels.
☁ No Directional Information - The ATR measures volatility, but it does not provide any indication of the direction of the trend. Therefore, it should not be used as a standalone tool for making trading decisions, but should be used in conjunction with other technical analysis tools that can provide directional cues.
☁ Inefficiency in Trending Markets - In strongly trending markets, ATR-based stops can sometimes be too far from the current price level. This could lead to larger losses if the price moves against your trade before hitting the stop loss. On the flip side, in less volatile, sideways markets, an ATR-based stop might be set too close to the entry point, leading to premature stop outs.
☁ Overoptimization Risk - If you're backtesting a trading strategy, there's a risk of overoptimizing your stop loss settings by fine-tuning them to past data. The best ATR multiplier that worked in the past might not necessarily work in the future, leading to potential performance issues.
☀ We countered these by implementing four different types of 'protect the trade' mechanisms:
✔ Fixed Percentage Stop Loss
✔ Trailing Stop Loss
✔ Stop Loss Moved to Entry Upon Reaching Certain Gain
✔ Stop Loss Moved to Entry Upon Reaching First Take Profit Order ("Custom Order").
☀ Dual Exit Strategy: We incorporated two distinct methods of exiting a trade. The first uses our custom signals, while the second triggers exit at a certain percentage of gain.
☀ Multiple Take Profit Orders: You have the flexibility to establish up to four different sell orders. This feature enables you to fractionate your exit strategy according to your needs. You can choose to trigger these fractions based on our custom signals or determine your own exit points by setting targeted gains at a fixed percentage.
☀ Confirmation Candle System: This feature enhances trade precision by requiring confirmation candles after a buy or sell signal. This confirmation, dependent on the next candle's closing price, helps reduce false signals and improves entry and exit points. While our confirmation system is applicable to all custom buy signals, it's solely dedicated for the bearish reversal when it comes to sell signals.
☀ Universal Compatibility: Easy Trade Pro's Strategy Tester works perfectly with any asset class. The code can handle different contract types, including the SPX contracts and fractional assets like Bitcoin. It's optimized to ensure proper execution of trades without rounding issues.
☀ Bullish and Bearish Reversal candles: Our method of detecting these pivotal candles combines conditions from buy and sell signals with pertinent divergences in Price, RSI, and Volume (OBV). The distinguishing factor, however, lies in recognizing significant shifts in market structure and liquidity grabs. To further enhance the credibility of our indicator, we've incorporated Bollinger Bands, serving as an additional layer in spotting potential trend reversals, particularly when aligned with long-wick candlesticks, engulfing patterns, and morning or evening star formations.
☀ Non-Repainting Indicator: Our indicator signals are designed not to repaint. Once a signal appears, it stays fixed, offering a reliable tool for your trading decisions.
================================================== EXTENSIVE TECHNICAL DESCRIPTION ====================================================
Easy Trade Pro is versatile, allowing you to analyze market trends across any financial asset. With its rigorous testing, our tool can be used confidently on any timeframe, from 1D to 1min, whether you prefer longer-term or shorter-term trades.
Although we recommend trading on timeframes between 1D and 1min, higher timeframes like 1W chart, can also provide broader insights.
Our study combines a variety of popular technical indicators, such as RSI, Stochastic RSI, MACD, DMI, Bollinger Bands as well as relevant EMAs. On the volume side OBV and MFI. Using a data-driven approach, “Easy Trade Pro” analyzes historical market trends to identify optimal ways to combine these indicators with significant divergences between price and oscillators. On top of that the code considers relevant changes in market structure and liquidity grabs, to generate reliable and accurate signals for potential buy and sell opportunities.
* ☎ --> Please not that MACD, BBs, and EMAs account for a minimal part of our script <--- ☎, If you're looking for a simpler tool, consider checking out our open-source indicator, 'RSI, SRSI, MACD, and DMI cross - Open source code'. You can find it here:
With our customizable system, traders will be able to identify:
1) Three types of buy signals🐂,💰,💎 and sell signals 🐻,🔨,💀
2) Bullish and bearish reversal candles with support and resistance lines
3) Bull and bear momentum signals
4) A function that utilizes Color bars to identify the strength of the trend
5) Three customizable moving averages
6) Alerts direct to your email or phone
7) Advanced and customizable settings menu
8) Our software also includes a backtesting system that that allows users to test their trading strategies on historical data, to check how they would have performed in real-world market conditions. This can help refine a trading strategy and make more informed decisions.
------------------------------------------------------------------------------ 1) BUY AND SELL SIGNALS ---------------------------------------------------------------------------------
Our buy and sell signals are generated using a custom combination of RSI, MFI, and Stochastic RSI levels, as well as relevant MACD and Stochastic RSI crosses. These indicators are carefully analyzed to identify potential trading opportunities and determine optimal entry and exit points for trades.
RSI (Relative strength index) measures the strength of a security's price action, while the SRSI (Stochastic Relative Strength Index) is a momentum oscillator that measures the current price relative to its high and low range over a set period. The Money Flow Index (MFI) is another momentum indicator that uses both price and volume data to measure buying and selling pressure. MACD (Moving Average Convergence Divergence) is a popular technical indicator used in financial markets to analyze price trends and momentum.
▶ With our system, you'll be able to identify three different levels of buy signals:
◉ The first level of buy signal is represented by a 🐂 emoji and is a "Good Buy". This signal indicates a possible buying opportunity. It indicates that could be a good opportunity to enter in a long trade. It's important to note that, the "Good Buy" signal can sometimes be supplemented with a green "Bull" text and a flag plotshape positioned beneath the signal. In these scenarios, we categorize this as a "Good Buy Bull" signal.
◉ The second level of buy signal is represented by a 💰 emoji and is a "Great Buy". This signal indicates a stronger buying opportunity than the "Good Buy" signal.
◉ The third and strongest buy signal is represented by a 💎 emoji and is an "Incredible Buy". This signal indicates a stronger buying opportunity than the "Good Buy" and "Great Buy" signals
▶ With our system, you'll be able to identify three different levels of sell signals:
◉ On the sell side, the first level is represented by a 🐻 emoji and is a "Good Sell". This signal indicates a possible selling opportunity. It indicates that could be a good opportunity to exit a trade or open a short position. It's important to note that, the "Good Sell" signal can occasionally be accompanied by a red "Bear" text and a flag plotshape positioned beneath the signal. In such instances, we refer to this as a "Good Sell Bear" signal.
◉ The second sell signal is represented by a 🔨 emoji and is a "Great Sell". This signal indicates a stronger selling opportunity than the "Good Sell" signal.
◉ The third and strongest sell signal is represented by a 💀 emoji and is an "Incredible Sell". This signal indicates a stronger selling opportunity than the "Good Sell" and "Great Sell" signals.
------------------------------------------2) "BULLISH AND BEARISH REVERSAL CANDLES PLUS SUPPORT AND RESISTANCE LINES" ------------------------------------------------
Bullish and bearish reversal candles are specific candles that have more probability to reverse the trend.
Our trading indicator is designed to identify bullish and bearish reversal candles. Our method of detecting these pivotal candles combines conditions from buy and sell signals with pertinent divergences in Price, RSI, and Volume (OBV). The distinguishing factor, however, lies in recognizing significant shifts in market structure and liquidity grabs. To further enhance the credibility of our indicator, we've incorporated Bollinger Bands, serving as an additional layer in spotting potential trend reversals, particularly when aligned with long-wick candlesticks, engulfing patterns, and morning or evening star formations.
These candles are represented by blue and orange colors respectively by default. Additionally, the indicator also uses lines that are drawn at either the opening or closing of candles to help identify pivot points of support or resistance. These candles, lines color or shape are customizable in the settings menu.
How can I benefit the most from bullish reversal candles? To make the most of bullish reversal candles, a powerful strategy is:
E.g, 1D chart - Wait for the next 1 or 2 candles to close above the support line linked to the bullish reversal candle. For lower timeframes, it is recommended to wait for 2 or 3 candles before making a trading decision. A good tip is also to look for other signals (confluence), like a buy signal. Traders should decide based on their risk tolerance.
Here below we can see an example of a bullish reversal candle in the BTC/USDT, 1D, chart. The system identify a bullish reversal candle (blue color), the next 2 candles are green and closed above the support blue line, in addition we have other bullish signals (confluence).
How can I benefit the most from bullish reversal lines? Bullish reversal lines can help traders to identify key level of support and maintain control of their position until a clear break below occurs.
In the example below we se how the price retrace to the support line:
After touching the price bounce up.
How can I benefit the most from bearish reversal candles? To make the most of bearish reversal candles, a powerful strategy is:
E.g, 1D chart - Wait for the next 1 or 2 candles to close below the resistance line linked to the bearish reversal candle. For lower timeframes, it is recommended to wait for 2 or 3 candles before making a trading decision. Traders should decide based on their risk tolerance.
Here below we can see an example of a bearish reversal candle in the ETH/USDT, 1D, chart. The system identify a bearish reversal candle (orange color), the next candle is red and closes below the resistance orange line. A good tip is also to look for other signals (confluence), like a sell signal.
How can I benefit the most from bearish reversal lines? Bearish reversal lines can help traders to identify key level of resistance and maintain control of their position until a clear break above occurs.
In the example below we se how the price bounce back to the resistance line and get rejected.
------------------------------------------------------------------------- 3) BULL AND BEAR MOMENTUM SIGNALS -----------------------------------------------------------------------
We analyzed factors such as buy or sell signals, long or short confirmation signals, DMI crossup or crossdown and breaks of market structure (BOS) or change of character (CHoCh) to determine the strength and direction of the trend. These study give us bull trend or bear trend signals that can help traders identify potential trading opportunities and make informed decisions.
These conditions are represented by a green word "BULL" and a flag shape below (bull momentum) and by a red word "BEAR" and a flag shape above (bear momentum) respectively by default. These plots shapes are customizable in the settings menu.
How can I benefit the most from bull momentum signals? To make the most of bull momentum signals, a powerful strategy is:
E.g, 1D chart - Look for confluence. If bull signal comes with a "Good Buy 🐂" in the same candle the signal is more strong. Another good combo is to look for a bullish reversal candle prior or after this signal, usually within a range of 1/2 candles. For lower timeframes, it is recommended to wait 2/3 candles before making a trading decision.
In the picture below we can see an example of a bull momentum signal in the US500, 1D, chart.
How can I benefit the most from bear momentum signals? To make the most of bear momentum signals, a powerful strategy is:
E.g, 1D chart - Look for confluence. If bear signal comes with a "Good Sell 🐻" in the same candle the signal is more strong. Another good combo is to look for a bearish reversal candle prior or after this signal, usually within a range of 1/2 candles. For lower timeframes, it is recommended to wait 2/3 candles before making a trading decision.
In the picture below we can see an example of a bear momentum signal in combo with a sell signal, NETFLIX, 1D, chart.
-------------------------------------------------------------- 4) "COLOR BARS THAT INDICATE THE STRENGTH OF THE TREND -----------------------------------------------------
This code is responsible for changing the color of the bars on a chart based on certain conditions. The gradient colors are defined for green and red, and the algorithm checks if the current bar is within a certain range of either a bearish reversal or bullish reversal candle and whether the price is above or below certain exponential moving averages or if important break of market structure occurs.
Ultimately, this feature helps traders visually identify potential trends and market shifts and avoid getting distracted by price fluctuations. Please note that every gradient of color can be customize by the user. We set 3 different bullish colors and 3 different bearish colors.
Below the picture of the settings menu related to the bar color.
----------------------------------------------------------------------5)THREE CUSTOMIZABLE MOVING AVERAGES ----------------------------------------------------------------------
You can choose up to three moving averages, any length and any type like SMA, EMA, WMA, HMA, RMA, SWMA and VWMA. Furthermore, you have the freedom to adjust the color and width of the lines to your preference.
Below the picture of the settings menu related to the moving averages.
----------------------------------------------------------------------6) ALERTS DIRECT TO YOUR EMAIL OR PHONE --------------------------------------------------------------------
Our alert feature sends real-time notifications directly to your email or phone when a signal is generated, allowing you to take immediate action and stay ahead of the market.
With our system, you first establish your own rules for trading in the strategy tester - this includes your criteria for entering and exiting trades.
Once you've defined these conditions, our system will start sending you alerts. These alerts will be triggered whenever your specified conditions are met. So, if the market matches your 'enter trade' conditions, you'll receive an alert prompting. Similarly, when your 'exit trade' conditions are met, you'll receive another alert.
Remember, these alerts are purely based on the conditions you set.
Once the condition is met, you will receive alerts directly to your email or phone when enter and exit a trade based on your custom conditions. To make sure you receive these notifications click on notifications tab.
---------------------------------------------------------------7) ADVANCED AND CUSTOMIZABLE SETTINGS MENU----------------------------------------------------------------------
We designed Easy Trade indicators with traders in mind, so it's user-friendly, easy to navigate and users can customize inputs, style, and colors of every feature in the indicator's settings menu.
-----------------------------------------------------------------------8) EASY TRADE PRO - BACKTESTING SYSTEM----------------------------------------------------------------------
Easy Trade Pro features a highly effective and realistic backtesting system, designed to mirror as closely as possible the real-world scenarios of entering and exiting trades.
Step 1:
Open the settings menu of the Indicator.
Once opened the settings menu click on properties.
Decide on the capital you wish to invest. Choose whether to use contracts or USD and determine the size of your orders. For the sake of realism, we recommend not exceeding 25% of your capital per order. However, if you decide to utilize your entire capital, make sure to adjust your stop loss accordingly. For instance, if you have a capital of 10K and use 10K with a stop loss at 2%, your potential loss would be $200. Conversely, if you use only 2K of your 10K capital with a stop loss at 10%, you would still lose the same 2% of your capital. To make your simulation even more authentic, consider incorporating broker fees or commissions into your calculations. For example, spot market fees are typically around 0.10%. If you're backtesting markets with low liquidity, consider factoring in slippage as well.
Step 2:
Navigate to the 'Inputs' section and scroll down until you come across 'Backtesting System - Strategy Test'. Once you locate this, click on the box and activate the 'USE STRATEGY SYSTEM' option by checking the tick box.
Also You will then need to set a 'Start Date' and 'End Date', establishing a specific time period during which you wish to test your strategy.
Otherwise you can consider to use the deep backtesting feature.
Step 3:
It's now time to establish the conditions for entering a trade. You can choose from five different types of custom buy signals: Good Buy, Good Buy Bull, Great Buy, Incredible Buy, and Bullish Reversal. Note that 'Great Buy' and 'Incredible Buy' are rare signals, so we advise against using them frequently in mechanical strategy tests; instead, consider them more for manual live tests. For more consistent results, we recommend using the other buy signals.
After determining your preferred buy signal, you can choose how many confirmation candles you wish to wait for before entering a trade. A 'confirmation' means that if the next candle closes above the opening or closing price of the chosen buy signal, it's considered a confirmation. This could be the opening or closing price, depending on whether the candle is green (close > open) or red.
You can set the number of confirmation candles in different time frames: below 2h, between 2h and 10h, and above 10h.
Step 4:
It's now time to safeguard your trade by managing risk. You can choose to implement a stop loss, expressed in percentage terms, or opt for a trailing stop. A trailing stop is a type of stop loss order that moves with the market price. It is designed to protect gains by enabling a trade to remain open and continue to profit as long as the market price is moving in a favorable direction. However, the trade closes if the market price changes direction by a specified amount (the 'trailing stop distance').
Additionally, you can minimize losses and move the stop loss to your entry point once the price reaches a certain percentage of profit. This strategy can help secure potential gains while limiting the potential for losses.
Step 5:
Now it's time to set the conditions for exiting the trade. You have the option to divide your exit into a maximum of four parts, with each part representing 25% of the position size. For each take profit point, you can choose from three different custom sell signals: Good Sell, Good Sell Bear, and Bearish Reversal.
Similarly, the concept of confirmation candles also applies here, but in this case, the candles are not closing above. A 'confirmation' for a sell signal means that if the next candle closes below the opening or closing price of the selected sell signal, it's considered a confirmation. This could be the opening or closing price, depending on whether the candle is green (open > close) or red (close < open).
So, when you're looking to sell, a confirmation would occur if the next candlestick's closing price is lower than the opening or closing price of the candlestick that triggered the sell signal. This indicates a potential bearish trend, providing the confirmation to execute the sell order.
Additionally, we've introduced a feature that allows you to move your stop loss to the entry point whenever the first take profit (1TP) is reached, which equates to hitting one custom sell signal.
Step 6:
We've also designed an alternative method for taking profits. With this approach, you can choose to exit your position once a fixed percentage gain from the entry point is reached. For instance, you might decide to exit when a 10% profit is achieved. Similarly to the previous method, this approach allows you to choose up to four exit points and determine the proportion of your position you want to close at each stage.
Conclusion:
Easy Trade Pro provides users with various options for entering and exiting trades. To effectively utilize the indicator, we strongly recommend conducting thorough backtesting and considering the results across your preferred trading pairs. It is advisable to analyze a substantial number of trades, ideally exceeding 100 trades, to obtain reliable insights into the indicator's performance. This approach will help you gain a better understanding of how Easy Trade Pro aligns with your trading strategy and objectives.
❗Keep attention❗
It is important to note that no trading indicator or strategy is foolproof, and there is always a risk of losses in trading. While this indicator may provide useful information for making conclusions, it should not be used as the sole basis for making trading decisions. Traders should always use proper risk management techniques and consider multiple factors when making trading decisions.
It is also important to be aware of the limitations of simulated performance results. Hypothetical or simulated results do not represent actual trading, and since trades have not been executed, results may be over- or under-compensated for market factors such as lack of liquidity. Simulated trading programs are also designed with the benefit of hindsight, and no representation is being made that any account will achieve profits or losses similar to those shown. Therefore, our indicators are for informative purposes only and not intended to be used as financial advice.
We encourage traders to use our indicators as part of a well-rounded trading strategy and to always be aware of the risks involved in trading. Remember that past performance is not indicative of future results and always trade responsibly.
GKD-BT Multi-Ticker CC Backtest [Loxx]The Giga Kaleidoscope GKD-BT Multi-Ticker CC Backtest is a backtest module included in Loxx's "Giga Kaleidoscope Modularized Trading System."
█ Giga Kaleidoscope GKD-BT Multi-Ticker CC Backtest
This backtest allows you to test GKD-C Confirmation 1 and GKD-C Confirmation 2 indicators together without the hassle of adding additional confluence indicators. The backtest includes 1 take profit and 1 SL and various types of volatility. The backtest results on the chart are using 10% equity of 1 million total equity and $5 commission per trade.
To use this indicator:
1. Import the value "Input into NEW GKD-BT Backtest" from the GKD-C Confirmation 1 indicator into the GKD-BT Multi-Ticker CC Backtest.
2. Import the value "Input into NEW GKD-BT Backtest" from the GKD-C Confirmation 2 indicator into the GKD-BT Multi-Ticker CC Backtest.
This backtest includes the following metrics:
1. Net profit: Overall profit or loss achieved.
2. Total Closed Trades: Total number of closed trades, both winning and losing.
3. Total Percent Wins: Total wins, whether long or short, for the selected time interval regardless of commissions and other profit-modifying addons.
4. Percent Profitable: Total wins, whether long or short, that are also profitable, taking commissions into account.
5. Profit Factor: The ratio of gross profits to gross losses, indicating how much money the strategy made for every unit of money it lost.
6. Average Profit per Trade: The average gain or loss per trade, calculated by dividing the net profit by the total number of closed trades.
7. Average Number of Bars in Trade: The average number of bars that elapsed during trades for all closed trades.
Summary of notable settings:
Input Tickers separated by commas: Allows the user to input tickers separated by commas, specifying the symbols or tickers of financial instruments used in the backtest. The tickers should follow the format "EXCHANGE:TICKER" (e.g., "NASDAQ:AAPL, NYSE:MSFT").
Import GKD-B Baseline: Imports the "GKD-B Baseline" indicator.
Import GKD-V Volatility/Volume: Imports the "GKD-V Volatility/Volume" indicator.
Import GKD-C Confirmation: Imports the "GKD-C Confirmation" indicator.
Import GKD-C Continuation: Imports the "GKD-C Continuation" indicator.
Initial Capital: Represents the starting account balance for the backtest, denominated in the base currency of the trading account.
Order Size: Determines the quantity of contracts traded in each trade.
Order Type: Specifies the type of order used in the backtest, either "Contracts" or "% Equity."
Commission: Represents the commission per order or transaction cost incurred in each trade.
█ Giga Kaleidoscope Modularized Trading System
Core components of an NNFX algorithmic trading strategy
The NNFX algorithm is built on the principles of trend, momentum, and volatility. There are six core components in the NNFX trading algorithm:
1. Volatility - price volatility; e.g., Average True Range, True Range Double, Close-to-Close, etc.
2. Baseline - a moving average to identify price trend
3. Confirmation 1 - a technical indicator used to identify trends
4. Confirmation 2 - a technical indicator used to identify trends
5. Continuation - a technical indicator used to identify trends
6. Volatility/Volume - a technical indicator used to identify volatility/volume breakouts/breakdown
7. Exit - a technical indicator used to determine when a trend is exhausted
8. Metamorphosis - a technical indicator that produces a compound signal from the combination of other GKD indicators*
*(not part of the NNFX algorithm)
What is Volatility in the NNFX trading system?
In the NNFX (No Nonsense Forex) trading system, ATR (Average True Range) is typically used to measure the volatility of an asset. It is used as a part of the system to help determine the appropriate stop loss and take profit levels for a trade. ATR is calculated by taking the average of the true range values over a specified period.
True range is calculated as the maximum of the following values:
-Current high minus the current low
-Absolute value of the current high minus the previous close
-Absolute value of the current low minus the previous close
ATR is a dynamic indicator that changes with changes in volatility. As volatility increases, the value of ATR increases, and as volatility decreases, the value of ATR decreases. By using ATR in NNFX system, traders can adjust their stop loss and take profit levels according to the volatility of the asset being traded. This helps to ensure that the trade is given enough room to move, while also minimizing potential losses.
Other types of volatility include True Range Double (TRD), Close-to-Close, and Garman-Klass
What is a Baseline indicator?
The baseline is essentially a moving average, and is used to determine the overall direction of the market.
The baseline in the NNFX system is used to filter out trades that are not in line with the long-term trend of the market. The baseline is plotted on the chart along with other indicators, such as the Moving Average (MA), the Relative Strength Index (RSI), and the Average True Range (ATR).
Trades are only taken when the price is in the same direction as the baseline. For example, if the baseline is sloping upwards, only long trades are taken, and if the baseline is sloping downwards, only short trades are taken. This approach helps to ensure that trades are in line with the overall trend of the market, and reduces the risk of entering trades that are likely to fail.
By using a baseline in the NNFX system, traders can have a clear reference point for determining the overall trend of the market, and can make more informed trading decisions. The baseline helps to filter out noise and false signals, and ensures that trades are taken in the direction of the long-term trend.
What is a Confirmation indicator?
Confirmation indicators are technical indicators that are used to confirm the signals generated by primary indicators. Primary indicators are the core indicators used in the NNFX system, such as the Average True Range (ATR), the Moving Average (MA), and the Relative Strength Index (RSI).
The purpose of the confirmation indicators is to reduce false signals and improve the accuracy of the trading system. They are designed to confirm the signals generated by the primary indicators by providing additional information about the strength and direction of the trend.
Some examples of confirmation indicators that may be used in the NNFX system include the Bollinger Bands, the MACD (Moving Average Convergence Divergence), and the MACD Oscillator. These indicators can provide information about the volatility, momentum, and trend strength of the market, and can be used to confirm the signals generated by the primary indicators.
In the NNFX system, confirmation indicators are used in combination with primary indicators and other filters to create a trading system that is robust and reliable. By using multiple indicators to confirm trading signals, the system aims to reduce the risk of false signals and improve the overall profitability of the trades.
What is a Continuation indicator?
In the NNFX (No Nonsense Forex) trading system, a continuation indicator is a technical indicator that is used to confirm a current trend and predict that the trend is likely to continue in the same direction. A continuation indicator is typically used in conjunction with other indicators in the system, such as a baseline indicator, to provide a comprehensive trading strategy.
What is a Volatility/Volume indicator?
Volume indicators, such as the On Balance Volume (OBV), the Chaikin Money Flow (CMF), or the Volume Price Trend (VPT), are used to measure the amount of buying and selling activity in a market. They are based on the trading volume of the market, and can provide information about the strength of the trend. In the NNFX system, volume indicators are used to confirm trading signals generated by the Moving Average and the Relative Strength Index. Volatility indicators include Average Direction Index, Waddah Attar, and Volatility Ratio. In the NNFX trading system, volatility is a proxy for volume and vice versa.
By using volume indicators as confirmation tools, the NNFX trading system aims to reduce the risk of false signals and improve the overall profitability of trades. These indicators can provide additional information about the market that is not captured by the primary indicators, and can help traders to make more informed trading decisions. In addition, volume indicators can be used to identify potential changes in market trends and to confirm the strength of price movements.
What is an Exit indicator?
The exit indicator is used in conjunction with other indicators in the system, such as the Moving Average (MA), the Relative Strength Index (RSI), and the Average True Range (ATR), to provide a comprehensive trading strategy.
The exit indicator in the NNFX system can be any technical indicator that is deemed effective at identifying optimal exit points. Examples of exit indicators that are commonly used include the Parabolic SAR, the Average Directional Index (ADX), and the Chandelier Exit.
The purpose of the exit indicator is to identify when a trend is likely to reverse or when the market conditions have changed, signaling the need to exit a trade. By using an exit indicator, traders can manage their risk and prevent significant losses.
In the NNFX system, the exit indicator is used in conjunction with a stop loss and a take profit order to maximize profits and minimize losses. The stop loss order is used to limit the amount of loss that can be incurred if the trade goes against the trader, while the take profit order is used to lock in profits when the trade is moving in the trader's favor.
Overall, the use of an exit indicator in the NNFX trading system is an important component of a comprehensive trading strategy. It allows traders to manage their risk effectively and improve the profitability of their trades by exiting at the right time.
What is an Metamorphosis indicator?
The concept of a metamorphosis indicator involves the integration of two or more GKD indicators to generate a compound signal. This is achieved by evaluating the accuracy of each indicator and selecting the signal from the indicator with the highest accuracy. As an illustration, let's consider a scenario where we calculate the accuracy of 10 indicators and choose the signal from the indicator that demonstrates the highest accuracy.
The resulting output from the metamorphosis indicator can then be utilized in a GKD-BT backtest by occupying a slot that aligns with the purpose of the metamorphosis indicator. The slot can be a GKD-B, GKD-C, or GKD-E slot, depending on the specific requirements and objectives of the indicator. This allows for seamless integration and utilization of the compound signal within the GKD-BT framework.
How does Loxx's GKD (Giga Kaleidoscope Modularized Trading System) implement the NNFX algorithm outlined above?
Loxx's GKD v2.0 system has five types of modules (indicators/strategies). These modules are:
1. GKD-BT - Backtesting module (Volatility, Number 1 in the NNFX algorithm)
2. GKD-B - Baseline module (Baseline and Volatility/Volume, Numbers 1 and 2 in the NNFX algorithm)
3. GKD-C - Confirmation 1/2 and Continuation module (Confirmation 1/2 and Continuation, Numbers 3, 4, and 5 in the NNFX algorithm)
4. GKD-V - Volatility/Volume module (Confirmation 1/2, Number 6 in the NNFX algorithm)
5. GKD-E - Exit module (Exit, Number 7 in the NNFX algorithm)
6. GKD-M - Metamorphosis module (Metamorphosis, Number 8 in the NNFX algorithm, but not part of the NNFX algorithm)
(additional module types will added in future releases)
Each module interacts with every module by passing data to A backtest module wherein the various components of the GKD system are combined to create a trading signal.
That is, the Baseline indicator passes its data to Volatility/Volume. The Volatility/Volume indicator passes its values to the Confirmation 1 indicator. The Confirmation 1 indicator passes its values to the Confirmation 2 indicator. The Confirmation 2 indicator passes its values to the Continuation indicator. The Continuation indicator passes its values to the Exit indicator, and finally, the Exit indicator passes its values to the Backtest strategy.
This chaining of indicators requires that each module conform to Loxx's GKD protocol, therefore allowing for the testing of every possible combination of technical indicators that make up the six components of the NNFX algorithm.
What does the application of the GKD trading system look like?
Example trading system:
Backtest: Multi-Ticker CC Backtest as shown on the chart above
Baseline: Hull Moving Average
Volatility/Volume: Hurst Exponent
Confirmation 1: Fisher Transform as shown on the chart above
Confirmation 2: uf2018 as shown on the chart above
Continuation: Coppock Curve
Exit: Rex Oscillator
Metamorphosis: Baseline Optimizer
Each GKD indicator is denoted with a module identifier of either: GKD-BT, GKD-B, GKD-C, GKD-V, GKD-M, or GKD-E. This allows traders to understand to which module each indicator belongs and where each indicator fits into the GKD system.
█ Giga Kaleidoscope Modularized Trading System Signals
Standard Entry
1. GKD-C Confirmation gives signal
2. Baseline agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Volatility/Volume agrees
1-Candle Standard Entry
1a. GKD-C Confirmation gives signal
2a. Baseline agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
Next Candle
1b. Price retraced
2b. Baseline agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Baseline Entry
1. GKD-B Baseline gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Volatility/Volume agrees
7. Confirmation 1 signal was less than 'Maximum Allowable PSBC Bars Back' prior
1-Candle Baseline Entry
1a. GKD-B Baseline gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSBC Bars Back' prior
Next Candle
1b. Price retraced
2b. Baseline agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Volatility/Volume Entry
1. GKD-V Volatility/Volume gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Baseline agrees
7. Confirmation 1 signal was less than 7 candles prior
1-Candle Volatility/Volume Entry
1a. GKD-V Volatility/Volume gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSVVC Bars Back' prior
Next Candle
1b. Price retraced
2b. Volatility/Volume agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Baseline agrees
Confirmation 2 Entry
1. GKD-C Confirmation 2 gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Volatility/Volume agrees
6. Baseline agrees
7. Confirmation 1 signal was less than 7 candles prior
1-Candle Confirmation 2 Entry
1a. GKD-C Confirmation 2 gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSC2C Bars Back' prior
Next Candle
1b. Price retraced
2b. Confirmation 2 agrees
3b. Confirmation 1 agrees
4b. Volatility/Volume agrees
5b. Baseline agrees
PullBack Entry
1a. GKD-B Baseline gives signal
2a. Confirmation 1 agrees
3a. Price is beyond 1.0x Volatility of Baseline
Next Candle
1b. Price inside Goldie Locks Zone Minimum
2b. Price inside Goldie Locks Zone Maximum
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Continuation Entry
1. Standard Entry, 1-Candle Standard Entry, Baseline Entry, 1-Candle Baseline Entry, Volatility/Volume Entry, 1-Candle Volatility/Volume Entry, Confirmation 2 Entry, 1-Candle Confirmation 2 Entry, or Pullback entry triggered previously
2. Baseline hasn't crossed since entry signal trigger
4. Confirmation 1 agrees
5. Baseline agrees
6. Confirmation 2 agrees
█ Connecting to Backtests
All GKD indicators are chained indicators meaning you export the value of the indicators to specialized backtest to creat your GKD trading system. Each indicator contains a proprietary signal generation algo that will only work with GKD backtests. You can find these backtests using the links below.
GKD-BT Giga Confirmation Stack Backtest
GKD-BT Giga Stacks Backtest
GKD-BT Full Giga Kaleidoscope Backtest
GKD-BT Solo Confirmation Super Complex Backtest
GKD-BT Solo Confirmation Complex Backtest
GKD-BT Solo Confirmation Simple Backtest
GKD-M Baseline Optimizer
GKD-M Accuracy Alchemist
GKD-BT Multi-Ticker SCC Backtest
GKD-BT Multi-Ticker SCS Backtest
GKD-BT Multi-Ticker SCS Backtest
GKD-BT Multi-Ticker Full GKD Backtest
GKD-BT Optimizer SCC Backtest [Loxx]The Giga Kaleidoscope GKD-BT Optimizer SCC Backtest is a backtesting module included in Loxx's "Giga Kaleidoscope Modularized Trading System."
█ Giga Kaleidoscope GKD-BT Optimizer SCC Backtest
The Optimizer SCC Backtest is a Solo Confirmation Complex backtest that allows traders to test single GKD-C Confirmation indicator with GKD-B Baseline and GKD-V Volatility/Volume filtering across 10 varying inputs. The purpose of this backtest is to enable traders to optimize a GKD-C indicator given varying inputs.
The backtest module supports testing with 1 take profit and 1 stop loss. It also offers the option to limit testing to a specific date range, allowing simulated forward testing using historical data. This backtest module only includes standard long and short signals. Additionally, users can choose to display or hide a trading panel that provides relevant information about the backtest, statistics, and the current trade. Traders can also select a highlighting treshold for Total Percent Wins and Percent Profitable, and Profit Factor.
To use this indicator:
1. Import the value "Input into NEW GKD-BT Backtest" from the GKD-B Baseline indicator into the GKD-BT Optimizer SCC Backtest.
2. Import the value "Input into NEW GKD-BT Backtest" from the GKD-V Volatility/Volume indicator into the GKD-BT Optimizer SCC Backtest.
3. Select the "Optimizer" option in the GKD-C Confirmation indicator
4. Import a GKD-C indicator "Input into NEW GKD-BT Optimizer Backtest Signals" into the GKD-C Indicator Signals dropdown
5. Import a GKD-C indicator "Input into NEW GKD-BT Optimizer Backtest Start" into the GKD-C Indicator Start dropdown
6. Import a GKD-C indicator "Input into NEW GKD-BT Optimizer Backtest Skip" into the GKD-C Indicator Skip dropdown
This backtest includes the following metrics:
1. Net profit: Overall profit or loss achieved.
2. Total Closed Trades: Total number of closed trades, both winning and losing.
3. Total Percent Wins: Total wins, whether long or short, for the selected time interval regardless of commissions and other profit-modifying addons.
4. Percent Profitable: Total wins, whether long or short, that are also profitable, taking commissions into account.
5. Profit Factor: The ratio of gross profits to gross losses, indicating how much money the strategy made for every unit of money it lost.
6. Average Profit per Trade: The average gain or loss per trade, calculated by dividing the net profit by the total number of closed trades.
7. Average Number of Bars in Trade: The average number of bars that elapsed during trades for all closed trades.
Summary of notable settings:
Input Tickers separated by commas: Allows the user to input tickers separated by commas, specifying the symbols or tickers of financial instruments used in the backtest. The tickers should follow the format "EXCHANGE:TICKER" (e.g., "NASDAQ:AAPL, NYSE:MSFT").
Import GKD-B Baseline: Imports the "GKD-B Baseline" indicator.
Import GKD-V Volatility/Volume: Imports the "GKD-V Volatility/Volume" indicator.
Import GKD-C Confirmation: Imports the "GKD-C Confirmation" indicator.
Import GKD-C Continuation: Imports the "GKD-C Continuation" indicator.
Initial Capital: Represents the starting account balance for the backtest, denominated in the base currency of the trading account.
Order Size: Determines the quantity of contracts traded in each trade.
Order Type: Specifies the type of order used in the backtest, either "Contracts" or "% Equity."
Commission: Represents the commission per order or transaction cost incurred in each trade.
**the backtest data rendered to the chart above uses $5 commission per trade and 10% equity per trade with $1 million initial capital. Each backtest result for each ticker assumes these same inputs. The results are NOT cumulative, they are separate and isolate per ticker and trading side, long or short**
█ Volatility Types included
The GKD system utilizes volatility-based take profits and stop losses. Each take profit and stop loss is calculated as a multiple of volatility. You can change the values of the multipliers in the settings as well.
This module includes 17 types of volatility:
Close-to-Close
Parkinson
Garman-Klass
Rogers-Satchell
Yang-Zhang
Garman-Klass-Yang-Zhang
Exponential Weighted Moving Average
Standard Deviation of Log Returns
Pseudo GARCH(2,2)
Average True Range
True Range Double
Standard Deviation
Adaptive Deviation
Median Absolute Deviation
Efficiency-Ratio Adaptive ATR
Mean Absolute Deviation
Static Percent
Various volatility estimators and indicators that investors and traders can use to measure the dispersion or volatility of a financial instrument's price. Each estimator has its strengths and weaknesses, and the choice of estimator should depend on the specific needs and circumstances of the user.
Close-to-Close
Close-to-Close volatility is a classic and widely used volatility measure, sometimes referred to as historical volatility.
Volatility is an indicator of the speed of a stock price change. A stock with high volatility is one where the price changes rapidly and with a larger amplitude. The more volatile a stock is, the riskier it is.
Close-to-close historical volatility is calculated using only a stock's closing prices. It is the simplest volatility estimator. However, in many cases, it is not precise enough. Stock prices could jump significantly during a trading session and return to the opening value at the end. That means that a considerable amount of price information is not taken into account by close-to-close volatility.
Despite its drawbacks, Close-to-Close volatility is still useful in cases where the instrument doesn't have intraday prices. For example, mutual funds calculate their net asset values daily or weekly, and thus their prices are not suitable for more sophisticated volatility estimators.
Parkinson
Parkinson volatility is a volatility measure that uses the stock’s high and low price of the day.
The main difference between regular volatility and Parkinson volatility is that the latter uses high and low prices for a day, rather than only the closing price. This is useful as close-to-close prices could show little difference while large price movements could have occurred during the day. Thus, Parkinson's volatility is considered more precise and requires less data for calculation than close-to-close volatility.
One drawback of this estimator is that it doesn't take into account price movements after the market closes. Hence, it systematically undervalues volatility. This drawback is addressed in the Garman-Klass volatility estimator.
Garman-Klass
Garman-Klass is a volatility estimator that incorporates open, low, high, and close prices of a security.
Garman-Klass volatility extends Parkinson's volatility by taking into account the opening and closing prices. As markets are most active during the opening and closing of a trading session, it makes volatility estimation more accurate.
Garman and Klass also assumed that the process of price change follows a continuous diffusion process (Geometric Brownian motion). However, this assumption has several drawbacks. The method is not robust for opening jumps in price and trend movements.
Despite its drawbacks, the Garman-Klass estimator is still more effective than the basic formula since it takes into account not only the price at the beginning and end of the time interval but also intraday price extremes.
Researchers Rogers and Satchell have proposed a more efficient method for assessing historical volatility that takes into account price trends. See Rogers-Satchell Volatility for more detail.
Rogers-Satchell
Rogers-Satchell is an estimator for measuring the volatility of securities with an average return not equal to zero.
Unlike Parkinson and Garman-Klass estimators, Rogers-Satchell incorporates a drift term (mean return not equal to zero). As a result, it provides better volatility estimation when the underlying is trending.
The main disadvantage of this method is that it does not take into account price movements between trading sessions. This leads to an underestimation of volatility since price jumps periodically occur in the market precisely at the moments between sessions.
A more comprehensive estimator that also considers the gaps between sessions was developed based on the Rogers-Satchel formula in the 2000s by Yang-Zhang. See Yang Zhang Volatility for more detail.
Yang-Zhang
Yang Zhang is a historical volatility estimator that handles both opening jumps and the drift and has a minimum estimation error.
Yang-Zhang volatility can be thought of as a combination of the overnight (close-to-open volatility) and a weighted average of the Rogers-Satchell volatility and the day’s open-to-close volatility. It is considered to be 14 times more efficient than the close-to-close estimator.
Garman-Klass-Yang-Zhang
Garman-Klass-Yang-Zhang (GKYZ) volatility estimator incorporates the returns of open, high, low, and closing prices in its calculation.
GKYZ volatility estimator takes into account overnight jumps but not the trend, i.e., it assumes that the underlying asset follows a Geometric Brownian Motion (GBM) process with zero drift. Therefore, the GKYZ volatility estimator tends to overestimate the volatility when the drift is different from zero. However, for a GBM process, this estimator is eight times more efficient than the close-to-close volatility estimator.
Exponential Weighted Moving Average
The Exponentially Weighted Moving Average (EWMA) is a quantitative or statistical measure used to model or describe a time series. The EWMA is widely used in finance, with the main applications being technical analysis and volatility modeling.
The moving average is designed such that older observations are given lower weights. The weights decrease exponentially as the data point gets older – hence the name exponentially weighted.
The only decision a user of the EWMA must make is the parameter lambda. The parameter decides how important the current observation is in the calculation of the EWMA. The higher the value of lambda, the more closely the EWMA tracks the original time series.
Standard Deviation of Log Returns
This is the simplest calculation of volatility. It's the standard deviation of ln(close/close(1)).
Pseudo GARCH(2,2)
This is calculated using a short- and long-run mean of variance multiplied by ?.
?avg(var;M) + (1 ? ?) avg(var;N) = 2?var/(M+1-(M-1)L) + 2(1-?)var/(M+1-(M-1)L)
Solving for ? can be done by minimizing the mean squared error of estimation; that is, regressing L^-1var - avg(var; N) against avg(var; M) - avg(var; N) and using the resulting beta estimate as ?.
Average True Range
The average true range (ATR) is a technical analysis indicator, introduced by market technician J. Welles Wilder Jr. in his book New Concepts in Technical Trading Systems, that measures market volatility by decomposing the entire range of an asset price for that period.
The true range indicator is taken as the greatest of the following: current high less the current low; the absolute value of the current high less the previous close; and the absolute value of the current low less the previous close. The ATR is then a moving average, generally using 14 days, of the true ranges.
True Range Double
A special case of ATR that attempts to correct for volatility skew.
Standard Deviation
Standard deviation is a statistic that measures the dispersion of a dataset relative to its mean and is calculated as the square root of the variance. The standard deviation is calculated as the square root of variance by determining each data point's deviation relative to the mean. If the data points are further from the mean, there is a higher deviation within the data set; thus, the more spread out the data, the higher the standard deviation.
Adaptive Deviation
By definition, the Standard Deviation (STD, also represented by the Greek letter sigma ? or the Latin letter s) is a measure that is used to quantify the amount of variation or dispersion of a set of data values. In technical analysis, we usually use it to measure the level of current volatility.
Standard Deviation is based on Simple Moving Average calculation for mean value. This version of standard deviation uses the properties of EMA to calculate what can be called a new type of deviation, and since it is based on EMA, we can call it EMA deviation. Additionally, Perry Kaufman's efficiency ratio is used to make it adaptive (since all EMA type calculations are nearly perfect for adapting).
The difference when compared to the standard is significant--not just because of EMA usage, but the efficiency ratio makes it a "bit more logical" in very volatile market conditions.
Median Absolute Deviation
The median absolute deviation is a measure of statistical dispersion. Moreover, the MAD is a robust statistic, being more resilient to outliers in a data set than the standard deviation. In the standard deviation, the distances from the mean are squared, so large deviations are weighted more heavily, and thus outliers can heavily influence it. In the MAD, the deviations of a small number of outliers are irrelevant.
Because the MAD is a more robust estimator of scale than the sample variance or standard deviation, it works better with distributions without a mean or variance, such as the Cauchy distribution.
For this indicator, a manual recreation of the quantile function in Pine Script is used. This is so users have a full inside view into how this is calculated.
Efficiency-Ratio Adaptive ATR
Average True Range (ATR) is a widely used indicator for many occasions in technical analysis. It is calculated as the RMA of the true range. This version adds a "twist": it uses Perry Kaufman's Efficiency Ratio to calculate adaptive true range.
Mean Absolute Deviation
The mean absolute deviation (MAD) is a measure of variability that indicates the average distance between observations and their mean. MAD uses the original units of the data, which simplifies interpretation. Larger values signify that the data points spread out further from the average. Conversely, lower values correspond to data points bunching closer to it. The mean absolute deviation is also known as the mean deviation and average absolute deviation.
This definition of the mean absolute deviation sounds similar to the standard deviation (SD). While both measure variability, they have different calculations. In recent years, some proponents of MAD have suggested that it replace the SD as the primary measure because it is a simpler concept that better fits real life.
█ Giga Kaleidoscope Modularized Trading System
Core components of an NNFX algorithmic trading strategy
The NNFX algorithm is built on the principles of trend, momentum, and volatility. There are six core components in the NNFX trading algorithm:
1. Volatility - price volatility; e.g., Average True Range, True Range Double, Close-to-Close, etc.
2. Baseline - a moving average to identify price trend
3. Confirmation 1 - a technical indicator used to identify trends
4. Confirmation 2 - a technical indicator used to identify trends
5. Continuation - a technical indicator used to identify trends
6. Volatility/Volume - a technical indicator used to identify volatility/volume breakouts/breakdown
7. Exit - a technical indicator used to determine when a trend is exhausted
8. Metamorphosis - a technical indicator that produces a compound signal from the combination of other GKD indicators*
*(not part of the NNFX algorithm)
What is Volatility in the NNFX trading system?
In the NNFX (No Nonsense Forex) trading system, ATR (Average True Range) is typically used to measure the volatility of an asset. It is used as a part of the system to help determine the appropriate stop loss and take profit levels for a trade. ATR is calculated by taking the average of the true range values over a specified period.
True range is calculated as the maximum of the following values:
-Current high minus the current low
-Absolute value of the current high minus the previous close
-Absolute value of the current low minus the previous close
ATR is a dynamic indicator that changes with changes in volatility. As volatility increases, the value of ATR increases, and as volatility decreases, the value of ATR decreases. By using ATR in NNFX system, traders can adjust their stop loss and take profit levels according to the volatility of the asset being traded. This helps to ensure that the trade is given enough room to move, while also minimizing potential losses.
Other types of volatility include True Range Double (TRD), Close-to-Close, and Garman-Klass
What is a Baseline indicator?
The baseline is essentially a moving average, and is used to determine the overall direction of the market.
The baseline in the NNFX system is used to filter out trades that are not in line with the long-term trend of the market. The baseline is plotted on the chart along with other indicators, such as the Moving Average (MA), the Relative Strength Index (RSI), and the Average True Range (ATR).
Trades are only taken when the price is in the same direction as the baseline. For example, if the baseline is sloping upwards, only long trades are taken, and if the baseline is sloping downwards, only short trades are taken. This approach helps to ensure that trades are in line with the overall trend of the market, and reduces the risk of entering trades that are likely to fail.
By using a baseline in the NNFX system, traders can have a clear reference point for determining the overall trend of the market, and can make more informed trading decisions. The baseline helps to filter out noise and false signals, and ensures that trades are taken in the direction of the long-term trend.
What is a Confirmation indicator?
Confirmation indicators are technical indicators that are used to confirm the signals generated by primary indicators. Primary indicators are the core indicators used in the NNFX system, such as the Average True Range (ATR), the Moving Average (MA), and the Relative Strength Index (RSI).
The purpose of the confirmation indicators is to reduce false signals and improve the accuracy of the trading system. They are designed to confirm the signals generated by the primary indicators by providing additional information about the strength and direction of the trend.
Some examples of confirmation indicators that may be used in the NNFX system include the Bollinger Bands, the MACD (Moving Average Convergence Divergence), and the MACD Oscillator. These indicators can provide information about the volatility, momentum, and trend strength of the market, and can be used to confirm the signals generated by the primary indicators.
In the NNFX system, confirmation indicators are used in combination with primary indicators and other filters to create a trading system that is robust and reliable. By using multiple indicators to confirm trading signals, the system aims to reduce the risk of false signals and improve the overall profitability of the trades.
What is a Continuation indicator?
In the NNFX (No Nonsense Forex) trading system, a continuation indicator is a technical indicator that is used to confirm a current trend and predict that the trend is likely to continue in the same direction. A continuation indicator is typically used in conjunction with other indicators in the system, such as a baseline indicator, to provide a comprehensive trading strategy.
What is a Volatility/Volume indicator?
Volume indicators, such as the On Balance Volume (OBV), the Chaikin Money Flow (CMF), or the Volume Price Trend (VPT), are used to measure the amount of buying and selling activity in a market. They are based on the trading volume of the market, and can provide information about the strength of the trend. In the NNFX system, volume indicators are used to confirm trading signals generated by the Moving Average and the Relative Strength Index. Volatility indicators include Average Direction Index, Waddah Attar, and Volatility Ratio. In the NNFX trading system, volatility is a proxy for volume and vice versa.
By using volume indicators as confirmation tools, the NNFX trading system aims to reduce the risk of false signals and improve the overall profitability of trades. These indicators can provide additional information about the market that is not captured by the primary indicators, and can help traders to make more informed trading decisions. In addition, volume indicators can be used to identify potential changes in market trends and to confirm the strength of price movements.
What is an Exit indicator?
The exit indicator is used in conjunction with other indicators in the system, such as the Moving Average (MA), the Relative Strength Index (RSI), and the Average True Range (ATR), to provide a comprehensive trading strategy.
The exit indicator in the NNFX system can be any technical indicator that is deemed effective at identifying optimal exit points. Examples of exit indicators that are commonly used include the Parabolic SAR, the Average Directional Index (ADX), and the Chandelier Exit.
The purpose of the exit indicator is to identify when a trend is likely to reverse or when the market conditions have changed, signaling the need to exit a trade. By using an exit indicator, traders can manage their risk and prevent significant losses.
In the NNFX system, the exit indicator is used in conjunction with a stop loss and a take profit order to maximize profits and minimize losses. The stop loss order is used to limit the amount of loss that can be incurred if the trade goes against the trader, while the take profit order is used to lock in profits when the trade is moving in the trader's favor.
Overall, the use of an exit indicator in the NNFX trading system is an important component of a comprehensive trading strategy. It allows traders to manage their risk effectively and improve the profitability of their trades by exiting at the right time.
What is an Metamorphosis indicator?
The concept of a metamorphosis indicator involves the integration of two or more GKD indicators to generate a compound signal. This is achieved by evaluating the accuracy of each indicator and selecting the signal from the indicator with the highest accuracy. As an illustration, let's consider a scenario where we calculate the accuracy of 10 indicators and choose the signal from the indicator that demonstrates the highest accuracy.
The resulting output from the metamorphosis indicator can then be utilized in a GKD-BT backtest by occupying a slot that aligns with the purpose of the metamorphosis indicator. The slot can be a GKD-B, GKD-C, or GKD-E slot, depending on the specific requirements and objectives of the indicator. This allows for seamless integration and utilization of the compound signal within the GKD-BT framework.
How does Loxx's GKD (Giga Kaleidoscope Modularized Trading System) implement the NNFX algorithm outlined above?
Loxx's GKD v2.0 system has five types of modules (indicators/strategies). These modules are:
1. GKD-BT - Backtesting module (Volatility, Number 1 in the NNFX algorithm)
2. GKD-B - Baseline module (Baseline and Volatility/Volume, Numbers 1 and 2 in the NNFX algorithm)
3. GKD-C - Confirmation 1/2 and Continuation module (Confirmation 1/2 and Continuation, Numbers 3, 4, and 5 in the NNFX algorithm)
4. GKD-V - Volatility/Volume module (Confirmation 1/2, Number 6 in the NNFX algorithm)
5. GKD-E - Exit module (Exit, Number 7 in the NNFX algorithm)
6. GKD-M - Metamorphosis module (Metamorphosis, Number 8 in the NNFX algorithm, but not part of the NNFX algorithm)
(additional module types will added in future releases)
Each module interacts with every module by passing data to A backtest module wherein the various components of the GKD system are combined to create a trading signal.
That is, the Baseline indicator passes its data to Volatility/Volume. The Volatility/Volume indicator passes its values to the Confirmation 1 indicator. The Confirmation 1 indicator passes its values to the Confirmation 2 indicator. The Confirmation 2 indicator passes its values to the Continuation indicator. The Continuation indicator passes its values to the Exit indicator, and finally, the Exit indicator passes its values to the Backtest strategy.
This chaining of indicators requires that each module conform to Loxx's GKD protocol, therefore allowing for the testing of every possible combination of technical indicators that make up the six components of the NNFX algorithm.
What does the application of the GKD trading system look like?
Example trading system:
Backtest: Optimizer Full GKD Backtest as shown on the chart above
Baseline: Hull Moving Average
Volatility/Volume: Hurst Exponent
Confirmation 1: Fisher Transofrm as shown on the chart above
Confirmation 2: uf2018
Continuation: Coppock Curve
Exit: Rex Oscillator
Metamorphosis: Baseline Optimizer
Each GKD indicator is denoted with a module identifier of either: GKD-BT, GKD-B, GKD-C, GKD-V, GKD-M, or GKD-E. This allows traders to understand to which module each indicator belongs and where each indicator fits into the GKD system.
█ Giga Kaleidoscope Modularized Trading System Signals
Standard Entry
1. GKD-C Confirmation gives signal
2. Baseline agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Volatility/Volume agrees
1-Candle Standard Entry
1a. GKD-C Confirmation gives signal
2a. Baseline agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
Next Candle
1b. Price retraced
2b. Baseline agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Baseline Entry
1. GKD-B Baseline gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Volatility/Volume agrees
7. Confirmation 1 signal was less than 'Maximum Allowable PSBC Bars Back' prior
1-Candle Baseline Entry
1a. GKD-B Baseline gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSBC Bars Back' prior
Next Candle
1b. Price retraced
2b. Baseline agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Volatility/Volume Entry
1. GKD-V Volatility/Volume gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Baseline agrees
7. Confirmation 1 signal was less than 7 candles prior
1-Candle Volatility/Volume Entry
1a. GKD-V Volatility/Volume gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSVVC Bars Back' prior
Next Candle
1b. Price retraced
2b. Volatility/Volume agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Baseline agrees
Confirmation 2 Entry
1. GKD-C Confirmation 2 gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Volatility/Volume agrees
6. Baseline agrees
7. Confirmation 1 signal was less than 7 candles prior
1-Candle Confirmation 2 Entry
1a. GKD-C Confirmation 2 gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSC2C Bars Back' prior
Next Candle
1b. Price retraced
2b. Confirmation 2 agrees
3b. Confirmation 1 agrees
4b. Volatility/Volume agrees
5b. Baseline agrees
PullBack Entry
1a. GKD-B Baseline gives signal
2a. Confirmation 1 agrees
3a. Price is beyond 1.0x Volatility of Baseline
Next Candle
1b. Price inside Goldie Locks Zone Minimum
2b. Price inside Goldie Locks Zone Maximum
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Continuation Entry
1. Standard Entry, 1-Candle Standard Entry, Baseline Entry, 1-Candle Baseline Entry, Volatility/Volume Entry, 1-Candle Volatility/Volume Entry, Confirmation 2 Entry, 1-Candle Confirmation 2 Entry, or Pullback entry triggered previously
2. Baseline hasn't crossed since entry signal trigger
4. Confirmation 1 agrees
5. Baseline agrees
6. Confirmation 2 agrees
█ Connecting to Backtests
All GKD indicators are chained indicators meaning you export the value of the indicators to specialized backtest to creat your GKD trading system. Each indicator contains a proprietary signal generation algo that will only work with GKD backtests. You can find these backtests using the links below.
GKD-BT Giga Confirmation Stack Backtest
GKD-BT Giga Stacks Backtest
GKD-BT Full Giga Kaleidoscope Backtest
GKD-BT Solo Confirmation Super Complex Backtest
GKD-BT Solo Confirmation Complex Backtest
GKD-BT Solo Confirmation Simple Backtest
GKD-M Baseline Optimizer
GKD-M Accuracy Alchemist
GKD-BT Optimizer SCC Backtest
GKD-BT Optimizer SCC Backtest
GKD-BT Optimizer SCC Backtest
GKD-C GKD-BT Optimizer Full GKD Backtest
GKD-BT Optimizer SCS Backtest [Loxx]The Giga Kaleidoscope GKD-BT Optimizer SCS Backtest is a backtesting module included in Loxx's "Giga Kaleidoscope Modularized Trading System."
█ Giga Kaleidoscope GKD-BT Optimizer SCS Backtest
The Optimizer SCS Backtest is a Solo Confirmation Simple backtest that allows traders to test single GKD-C confirmation indicators across 10 varying inputs. The purpose of this backtest is to enable traders to optimize a GKD-C indicator given varying inputs.
The backtest module supports testing with 1 take profit and 1 stop loss. It also offers the option to limit testing to a specific date range, allowing simulated forward testing using historical data. This backtest module only includes standard long and short signals. Additionally, users can choose to display or hide a trading panel that provides relevant information about the backtest, statistics, and the current trade. Traders can also select a highlighting treshold for Total Percent Wins and Percent Profitable, and Profit Factor.
To use this indicator:
1. Import a GKD-C indicator "Input into NEW GKD-BT Optimizer Backtest Signals" into the GKD-C Indicator Signals dropdown
1. Import a GKD-C indicator "Input into NEW GKD-BT Optimizer Backtest Start" into the GKD-C Indicator Start dropdown
1. Import a GKD-C indicator "Input into NEW GKD-BT Optimizer Backtest Skip" into the GKD-C Indicator Skip dropdown
This backtest includes the following metrics:
1. Net profit: Overall profit or loss achieved.
2. Total Closed Trades: Total number of closed trades, both winning and losing.
3. Total Percent Wins: Total wins, whether long or short, for the selected time interval regardless of commissions and other profit-modifying addons.
4. Percent Profitable: Total wins, whether long or short, that are also profitable, taking commissions into account.
5. Profit Factor: The ratio of gross profits to gross losses, indicating how much money the strategy made for every unit of money it lost.
6. Average Profit per Trade: The average gain or loss per trade, calculated by dividing the net profit by the total number of closed trades.
7. Average Number of Bars in Trade: The average number of bars that elapsed during trades for all closed trades.
Summary of notable settings:
Input Tickers separated by commas: Allows the user to input tickers separated by commas, specifying the symbols or tickers of financial instruments used in the backtest. The tickers should follow the format "EXCHANGE:TICKER" (e.g., "NASDAQ:AAPL, NYSE:MSFT").
Import GKD-B Baseline: Imports the "GKD-B Multi-Ticker Baseline" indicator.
Import GKD-V Volatility/Volume: Imports the "GKD-V Volatility/Volume" indicator.
Import GKD-C Confirmation: Imports the "GKD-C Confirmation" indicator.
Import GKD-C Continuation: Imports the "GKD-C Continuation" indicator.
Initial Capital: Represents the starting account balance for the backtest, denominated in the base currency of the trading account.
Order Size: Determines the quantity of contracts traded in each trade.
Order Type: Specifies the type of order used in the backtest, either "Contracts" or "% Equity."
Commission: Represents the commission per order or transaction cost incurred in each trade.
**the backtest data rendered to the chart above uses $5 commission per trade and 10% equity per trade with $1 million initial capital. Each backtest result for each ticker assumes these same inputs. The results are NOT cumulative, they are separate and isolate per ticker and trading side, long or short**
█ Volatility Types included
The GKD system utilizes volatility-based take profits and stop losses. Each take profit and stop loss is calculated as a multiple of volatility. You can change the values of the multipliers in the settings as well.
This module includes 17 types of volatility:
Close-to-Close
Parkinson
Garman-Klass
Rogers-Satchell
Yang-Zhang
Garman-Klass-Yang-Zhang
Exponential Weighted Moving Average
Standard Deviation of Log Returns
Pseudo GARCH(2,2)
Average True Range
True Range Double
Standard Deviation
Adaptive Deviation
Median Absolute Deviation
Efficiency-Ratio Adaptive ATR
Mean Absolute Deviation
Static Percent
Various volatility estimators and indicators that investors and traders can use to measure the dispersion or volatility of a financial instrument's price. Each estimator has its strengths and weaknesses, and the choice of estimator should depend on the specific needs and circumstances of the user.
Close-to-Close
Close-to-Close volatility is a classic and widely used volatility measure, sometimes referred to as historical volatility.
Volatility is an indicator of the speed of a stock price change. A stock with high volatility is one where the price changes rapidly and with a larger amplitude. The more volatile a stock is, the riskier it is.
Close-to-close historical volatility is calculated using only a stock's closing prices. It is the simplest volatility estimator. However, in many cases, it is not precise enough. Stock prices could jump significantly during a trading session and return to the opening value at the end. That means that a considerable amount of price information is not taken into account by close-to-close volatility.
Despite its drawbacks, Close-to-Close volatility is still useful in cases where the instrument doesn't have intraday prices. For example, mutual funds calculate their net asset values daily or weekly, and thus their prices are not suitable for more sophisticated volatility estimators.
Parkinson
Parkinson volatility is a volatility measure that uses the stock’s high and low price of the day.
The main difference between regular volatility and Parkinson volatility is that the latter uses high and low prices for a day, rather than only the closing price. This is useful as close-to-close prices could show little difference while large price movements could have occurred during the day. Thus, Parkinson's volatility is considered more precise and requires less data for calculation than close-to-close volatility.
One drawback of this estimator is that it doesn't take into account price movements after the market closes. Hence, it systematically undervalues volatility. This drawback is addressed in the Garman-Klass volatility estimator.
Garman-Klass
Garman-Klass is a volatility estimator that incorporates open, low, high, and close prices of a security.
Garman-Klass volatility extends Parkinson's volatility by taking into account the opening and closing prices. As markets are most active during the opening and closing of a trading session, it makes volatility estimation more accurate.
Garman and Klass also assumed that the process of price change follows a continuous diffusion process (Geometric Brownian motion). However, this assumption has several drawbacks. The method is not robust for opening jumps in price and trend movements.
Despite its drawbacks, the Garman-Klass estimator is still more effective than the basic formula since it takes into account not only the price at the beginning and end of the time interval but also intraday price extremes.
Researchers Rogers and Satchell have proposed a more efficient method for assessing historical volatility that takes into account price trends. See Rogers-Satchell Volatility for more detail.
Rogers-Satchell
Rogers-Satchell is an estimator for measuring the volatility of securities with an average return not equal to zero.
Unlike Parkinson and Garman-Klass estimators, Rogers-Satchell incorporates a drift term (mean return not equal to zero). As a result, it provides better volatility estimation when the underlying is trending.
The main disadvantage of this method is that it does not take into account price movements between trading sessions. This leads to an underestimation of volatility since price jumps periodically occur in the market precisely at the moments between sessions.
A more comprehensive estimator that also considers the gaps between sessions was developed based on the Rogers-Satchel formula in the 2000s by Yang-Zhang. See Yang Zhang Volatility for more detail.
Yang-Zhang
Yang Zhang is a historical volatility estimator that handles both opening jumps and the drift and has a minimum estimation error.
Yang-Zhang volatility can be thought of as a combination of the overnight (close-to-open volatility) and a weighted average of the Rogers-Satchell volatility and the day’s open-to-close volatility. It is considered to be 14 times more efficient than the close-to-close estimator.
Garman-Klass-Yang-Zhang
Garman-Klass-Yang-Zhang (GKYZ) volatility estimator incorporates the returns of open, high, low, and closing prices in its calculation.
GKYZ volatility estimator takes into account overnight jumps but not the trend, i.e., it assumes that the underlying asset follows a Geometric Brownian Motion (GBM) process with zero drift. Therefore, the GKYZ volatility estimator tends to overestimate the volatility when the drift is different from zero. However, for a GBM process, this estimator is eight times more efficient than the close-to-close volatility estimator.
Exponential Weighted Moving Average
The Exponentially Weighted Moving Average (EWMA) is a quantitative or statistical measure used to model or describe a time series. The EWMA is widely used in finance, with the main applications being technical analysis and volatility modeling.
The moving average is designed such that older observations are given lower weights. The weights decrease exponentially as the data point gets older – hence the name exponentially weighted.
The only decision a user of the EWMA must make is the parameter lambda. The parameter decides how important the current observation is in the calculation of the EWMA. The higher the value of lambda, the more closely the EWMA tracks the original time series.
Standard Deviation of Log Returns
This is the simplest calculation of volatility. It's the standard deviation of ln(close/close(1)).
Pseudo GARCH(2,2)
This is calculated using a short- and long-run mean of variance multiplied by ?.
?avg(var;M) + (1 ? ?) avg(var;N) = 2?var/(M+1-(M-1)L) + 2(1-?)var/(M+1-(M-1)L)
Solving for ? can be done by minimizing the mean squared error of estimation; that is, regressing L^-1var - avg(var; N) against avg(var; M) - avg(var; N) and using the resulting beta estimate as ?.
Average True Range
The average true range (ATR) is a technical analysis indicator, introduced by market technician J. Welles Wilder Jr. in his book New Concepts in Technical Trading Systems, that measures market volatility by decomposing the entire range of an asset price for that period.
The true range indicator is taken as the greatest of the following: current high less the current low; the absolute value of the current high less the previous close; and the absolute value of the current low less the previous close. The ATR is then a moving average, generally using 14 days, of the true ranges.
True Range Double
A special case of ATR that attempts to correct for volatility skew.
Standard Deviation
Standard deviation is a statistic that measures the dispersion of a dataset relative to its mean and is calculated as the square root of the variance. The standard deviation is calculated as the square root of variance by determining each data point's deviation relative to the mean. If the data points are further from the mean, there is a higher deviation within the data set; thus, the more spread out the data, the higher the standard deviation.
Adaptive Deviation
By definition, the Standard Deviation (STD, also represented by the Greek letter sigma ? or the Latin letter s) is a measure that is used to quantify the amount of variation or dispersion of a set of data values. In technical analysis, we usually use it to measure the level of current volatility.
Standard Deviation is based on Simple Moving Average calculation for mean value. This version of standard deviation uses the properties of EMA to calculate what can be called a new type of deviation, and since it is based on EMA, we can call it EMA deviation. Additionally, Perry Kaufman's efficiency ratio is used to make it adaptive (since all EMA type calculations are nearly perfect for adapting).
The difference when compared to the standard is significant--not just because of EMA usage, but the efficiency ratio makes it a "bit more logical" in very volatile market conditions.
Median Absolute Deviation
The median absolute deviation is a measure of statistical dispersion. Moreover, the MAD is a robust statistic, being more resilient to outliers in a data set than the standard deviation. In the standard deviation, the distances from the mean are squared, so large deviations are weighted more heavily, and thus outliers can heavily influence it. In the MAD, the deviations of a small number of outliers are irrelevant.
Because the MAD is a more robust estimator of scale than the sample variance or standard deviation, it works better with distributions without a mean or variance, such as the Cauchy distribution.
For this indicator, a manual recreation of the quantile function in Pine Script is used. This is so users have a full inside view into how this is calculated.
Efficiency-Ratio Adaptive ATR
Average True Range (ATR) is a widely used indicator for many occasions in technical analysis. It is calculated as the RMA of the true range. This version adds a "twist": it uses Perry Kaufman's Efficiency Ratio to calculate adaptive true range.
Mean Absolute Deviation
The mean absolute deviation (MAD) is a measure of variability that indicates the average distance between observations and their mean. MAD uses the original units of the data, which simplifies interpretation. Larger values signify that the data points spread out further from the average. Conversely, lower values correspond to data points bunching closer to it. The mean absolute deviation is also known as the mean deviation and average absolute deviation.
This definition of the mean absolute deviation sounds similar to the standard deviation (SD). While both measure variability, they have different calculations. In recent years, some proponents of MAD have suggested that it replace the SD as the primary measure because it is a simpler concept that better fits real life.
█ Giga Kaleidoscope Modularized Trading System
Core components of an NNFX algorithmic trading strategy
The NNFX algorithm is built on the principles of trend, momentum, and volatility. There are six core components in the NNFX trading algorithm:
1. Volatility - price volatility; e.g., Average True Range, True Range Double, Close-to-Close, etc.
2. Baseline - a moving average to identify price trend
3. Confirmation 1 - a technical indicator used to identify trends
4. Confirmation 2 - a technical indicator used to identify trends
5. Continuation - a technical indicator used to identify trends
6. Volatility/Volume - a technical indicator used to identify volatility/volume breakouts/breakdown
7. Exit - a technical indicator used to determine when a trend is exhausted
8. Metamorphosis - a technical indicator that produces a compound signal from the combination of other GKD indicators*
*(not part of the NNFX algorithm)
What is Volatility in the NNFX trading system?
In the NNFX (No Nonsense Forex) trading system, ATR (Average True Range) is typically used to measure the volatility of an asset. It is used as a part of the system to help determine the appropriate stop loss and take profit levels for a trade. ATR is calculated by taking the average of the true range values over a specified period.
True range is calculated as the maximum of the following values:
-Current high minus the current low
-Absolute value of the current high minus the previous close
-Absolute value of the current low minus the previous close
ATR is a dynamic indicator that changes with changes in volatility. As volatility increases, the value of ATR increases, and as volatility decreases, the value of ATR decreases. By using ATR in NNFX system, traders can adjust their stop loss and take profit levels according to the volatility of the asset being traded. This helps to ensure that the trade is given enough room to move, while also minimizing potential losses.
Other types of volatility include True Range Double (TRD), Close-to-Close, and Garman-Klass
What is a Baseline indicator?
The baseline is essentially a moving average, and is used to determine the overall direction of the market.
The baseline in the NNFX system is used to filter out trades that are not in line with the long-term trend of the market. The baseline is plotted on the chart along with other indicators, such as the Moving Average (MA), the Relative Strength Index (RSI), and the Average True Range (ATR).
Trades are only taken when the price is in the same direction as the baseline. For example, if the baseline is sloping upwards, only long trades are taken, and if the baseline is sloping downwards, only short trades are taken. This approach helps to ensure that trades are in line with the overall trend of the market, and reduces the risk of entering trades that are likely to fail.
By using a baseline in the NNFX system, traders can have a clear reference point for determining the overall trend of the market, and can make more informed trading decisions. The baseline helps to filter out noise and false signals, and ensures that trades are taken in the direction of the long-term trend.
What is a Confirmation indicator?
Confirmation indicators are technical indicators that are used to confirm the signals generated by primary indicators. Primary indicators are the core indicators used in the NNFX system, such as the Average True Range (ATR), the Moving Average (MA), and the Relative Strength Index (RSI).
The purpose of the confirmation indicators is to reduce false signals and improve the accuracy of the trading system. They are designed to confirm the signals generated by the primary indicators by providing additional information about the strength and direction of the trend.
Some examples of confirmation indicators that may be used in the NNFX system include the Bollinger Bands, the MACD (Moving Average Convergence Divergence), and the MACD Oscillator. These indicators can provide information about the volatility, momentum, and trend strength of the market, and can be used to confirm the signals generated by the primary indicators.
In the NNFX system, confirmation indicators are used in combination with primary indicators and other filters to create a trading system that is robust and reliable. By using multiple indicators to confirm trading signals, the system aims to reduce the risk of false signals and improve the overall profitability of the trades.
What is a Continuation indicator?
In the NNFX (No Nonsense Forex) trading system, a continuation indicator is a technical indicator that is used to confirm a current trend and predict that the trend is likely to continue in the same direction. A continuation indicator is typically used in conjunction with other indicators in the system, such as a baseline indicator, to provide a comprehensive trading strategy.
What is a Volatility/Volume indicator?
Volume indicators, such as the On Balance Volume (OBV), the Chaikin Money Flow (CMF), or the Volume Price Trend (VPT), are used to measure the amount of buying and selling activity in a market. They are based on the trading volume of the market, and can provide information about the strength of the trend. In the NNFX system, volume indicators are used to confirm trading signals generated by the Moving Average and the Relative Strength Index. Volatility indicators include Average Direction Index, Waddah Attar, and Volatility Ratio. In the NNFX trading system, volatility is a proxy for volume and vice versa.
By using volume indicators as confirmation tools, the NNFX trading system aims to reduce the risk of false signals and improve the overall profitability of trades. These indicators can provide additional information about the market that is not captured by the primary indicators, and can help traders to make more informed trading decisions. In addition, volume indicators can be used to identify potential changes in market trends and to confirm the strength of price movements.
What is an Exit indicator?
The exit indicator is used in conjunction with other indicators in the system, such as the Moving Average (MA), the Relative Strength Index (RSI), and the Average True Range (ATR), to provide a comprehensive trading strategy.
The exit indicator in the NNFX system can be any technical indicator that is deemed effective at identifying optimal exit points. Examples of exit indicators that are commonly used include the Parabolic SAR, the Average Directional Index (ADX), and the Chandelier Exit.
The purpose of the exit indicator is to identify when a trend is likely to reverse or when the market conditions have changed, signaling the need to exit a trade. By using an exit indicator, traders can manage their risk and prevent significant losses.
In the NNFX system, the exit indicator is used in conjunction with a stop loss and a take profit order to maximize profits and minimize losses. The stop loss order is used to limit the amount of loss that can be incurred if the trade goes against the trader, while the take profit order is used to lock in profits when the trade is moving in the trader's favor.
Overall, the use of an exit indicator in the NNFX trading system is an important component of a comprehensive trading strategy. It allows traders to manage their risk effectively and improve the profitability of their trades by exiting at the right time.
What is an Metamorphosis indicator?
The concept of a metamorphosis indicator involves the integration of two or more GKD indicators to generate a compound signal. This is achieved by evaluating the accuracy of each indicator and selecting the signal from the indicator with the highest accuracy. As an illustration, let's consider a scenario where we calculate the accuracy of 10 indicators and choose the signal from the indicator that demonstrates the highest accuracy.
The resulting output from the metamorphosis indicator can then be utilized in a GKD-BT backtest by occupying a slot that aligns with the purpose of the metamorphosis indicator. The slot can be a GKD-B, GKD-C, or GKD-E slot, depending on the specific requirements and objectives of the indicator. This allows for seamless integration and utilization of the compound signal within the GKD-BT framework.
How does Loxx's GKD (Giga Kaleidoscope Modularized Trading System) implement the NNFX algorithm outlined above?
Loxx's GKD v2.0 system has five types of modules (indicators/strategies). These modules are:
1. GKD-BT - Backtesting module (Volatility, Number 1 in the NNFX algorithm)
2. GKD-B - Baseline module (Baseline and Volatility/Volume, Numbers 1 and 2 in the NNFX algorithm)
3. GKD-C - Confirmation 1/2 and Continuation module (Confirmation 1/2 and Continuation, Numbers 3, 4, and 5 in the NNFX algorithm)
4. GKD-V - Volatility/Volume module (Confirmation 1/2, Number 6 in the NNFX algorithm)
5. GKD-E - Exit module (Exit, Number 7 in the NNFX algorithm)
6. GKD-M - Metamorphosis module (Metamorphosis, Number 8 in the NNFX algorithm, but not part of the NNFX algorithm)
(additional module types will added in future releases)
Each module interacts with every module by passing data to A backtest module wherein the various components of the GKD system are combined to create a trading signal.
That is, the Baseline indicator passes its data to Volatility/Volume. The Volatility/Volume indicator passes its values to the Confirmation 1 indicator. The Confirmation 1 indicator passes its values to the Confirmation 2 indicator. The Confirmation 2 indicator passes its values to the Continuation indicator. The Continuation indicator passes its values to the Exit indicator, and finally, the Exit indicator passes its values to the Backtest strategy.
This chaining of indicators requires that each module conform to Loxx's GKD protocol, therefore allowing for the testing of every possible combination of technical indicators that make up the six components of the NNFX algorithm.
What does the application of the GKD trading system look like?
Example trading system:
Backtest: Optimizer Full GKD Backtest as shown on the chart above
Baseline: Hull Moving Average
Volatility/Volume: Hurst Exponent
Confirmation 1: Fisher Transofrm as shown on the chart above
Confirmation 2: uf2018
Continuation: Coppock Curve
Exit: Rex Oscillator
Metamorphosis: Baseline Optimizer
Each GKD indicator is denoted with a module identifier of either: GKD-BT, GKD-B, GKD-C, GKD-V, GKD-M, or GKD-E. This allows traders to understand to which module each indicator belongs and where each indicator fits into the GKD system.
█ Giga Kaleidoscope Modularized Trading System Signals
Standard Entry
1. GKD-C Confirmation gives signal
2. Baseline agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Volatility/Volume agrees
1-Candle Standard Entry
1a. GKD-C Confirmation gives signal
2a. Baseline agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
Next Candle
1b. Price retraced
2b. Baseline agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Baseline Entry
1. GKD-B Baseline gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Volatility/Volume agrees
7. Confirmation 1 signal was less than 'Maximum Allowable PSBC Bars Back' prior
1-Candle Baseline Entry
1a. GKD-B Baseline gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSBC Bars Back' prior
Next Candle
1b. Price retraced
2b. Baseline agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Volatility/Volume Entry
1. GKD-V Volatility/Volume gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Baseline agrees
7. Confirmation 1 signal was less than 7 candles prior
1-Candle Volatility/Volume Entry
1a. GKD-V Volatility/Volume gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSVVC Bars Back' prior
Next Candle
1b. Price retraced
2b. Volatility/Volume agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Baseline agrees
Confirmation 2 Entry
1. GKD-C Confirmation 2 gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Volatility/Volume agrees
6. Baseline agrees
7. Confirmation 1 signal was less than 7 candles prior
1-Candle Confirmation 2 Entry
1a. GKD-C Confirmation 2 gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSC2C Bars Back' prior
Next Candle
1b. Price retraced
2b. Confirmation 2 agrees
3b. Confirmation 1 agrees
4b. Volatility/Volume agrees
5b. Baseline agrees
PullBack Entry
1a. GKD-B Baseline gives signal
2a. Confirmation 1 agrees
3a. Price is beyond 1.0x Volatility of Baseline
Next Candle
1b. Price inside Goldie Locks Zone Minimum
2b. Price inside Goldie Locks Zone Maximum
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Continuation Entry
1. Standard Entry, 1-Candle Standard Entry, Baseline Entry, 1-Candle Baseline Entry, Volatility/Volume Entry, 1-Candle Volatility/Volume Entry, Confirmation 2 Entry, 1-Candle Confirmation 2 Entry, or Pullback entry triggered previously
2. Baseline hasn't crossed since entry signal trigger
4. Confirmation 1 agrees
5. Baseline agrees
6. Confirmation 2 agrees
█ Connecting to Backtests
All GKD indicators are chained indicators meaning you export the value of the indicators to specialized backtest to creat your GKD trading system. Each indicator contains a proprietary signal generation algo that will only work with GKD backtests. You can find these backtests using the links below.
GKD-BT Giga Confirmation Stack Backtest
GKD-BT Giga Stacks Backtest
GKD-BT Full Giga Kaleidoscope Backtest
GKD-BT Solo Confirmation Super Complex Backtest
GKD-BT Solo Confirmation Complex Backtest
GKD-BT Solo Confirmation Simple Backtest
GKD-M Baseline Optimizer
GKD-M Accuracy Alchemist
GKD-BT Optimizer SCC Backtest
GKD-BT Optimizer SCS Backtest
GKD-BT Optimizer SCS Backtest
GKD-C GKD-BT Optimizer Full GKD Backtest