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.
Optimizer
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.
Risk Reward Optimiser [ChartPrime]█ CONCEPTS
In modern day strategy optimization there are few options when it comes to optimizing a risk reward ratio. Users frequently need to experiment and go through countless permutations in order to tweak, adjust and find optimal in their data.
Therefore we have created the Risk Reward Optimizer.
The Risk Reward Optimizer is a technical tool designed to provide traders with comprehensive insights into their trading strategies.
It offers a range of features and functionalities aimed at enhancing traders' decision-making process.
With a focus on comprehensive data, it is there to help traders quickly and efficiently locate Risk Reward optimums for inbuilt of custom strategies.
█ Internal and external Signals:
The script can optimize risk to reward ratio for any type of signals
You can utilize the following :
🔸Internal signals ➞ We have included a number of common indicators into the optimizer such as:
▫️ Aroon
▫️ AO (Awesome Oscillator)
▫️ RSI (Relative Strength Index)
▫️ MACD (Moving Average Convergence Divergence)
▫️ SuperTrend
▫️ Stochastic RSI
▫️ Stochastic
▫️ Moving averages
All these indicators have 3 conditions to generate signals :
Crossover
High Than
Less Than
🔸External signal
▫️ by incorporating your own indicators into the analysis. This flexibility enables you to tailor your strategy to your preferences.
◽️ How to link your signal with the optimizer:
In order to be able to analysis your signal we need to read it and to do so we would need to PLOT your signal with a defined value
plot( YOUR LONG Condition ? 100 : 0 , display = display.data_window)
█ Customizable Risk to Reward Ratios:
This tool allows you to test seven different customizable risk to reward ratios , helping you determine the most suitable risk-reward balance for your trading strategy. This data-driven approach takes the guesswork out of setting stop-loss and take-profit levels.
█ Comprehensive Data Analysis:
The tool provides a table displaying key metrics, including:
Total trades
Wins
Losses
Profit factor
Win rate
Profit and loss (PNL)
This data is essential for refining your trading strategy.
🔸 It includes a tooltip for each risk to reward ratio which gives data for the:
Most Profitable Trade USD value
Most Profitable Trade % value
Most Profitable Trade Bar Index
Most Profitable Trade Time (When it occurred)
Position and size is adjustable
█ Visual insights with histograms:
Visualize your trading performance with histograms displaying each risk to reward ratio trade space, showing total trades, wins, losses, and the ratio of profitable trades.
This visual representation helps you understand the strengths and weaknesses of your strategy.
It offers tooltips for each RR ratio with the average win and loss percentages for further analysis.
█ Dynamic Highlighting:
A drop-down menu allows you to highlight the maximum values of critical metrics such as:
Profit factor
Win rate
PNL
for quick identification of successful setups.
█ Stop Loss Flexibility:
You can adjust stop-loss levels using three different calculation methods:
ATR
Pivot
VWAP
This allows you to align risk-reward ratios with your preferred risk tolerance.
█ Chart Integration:
Visualize your trades directly on your price chart, with each trade displayed in a distinct color for easy tracking.
When your take-profit (TP) level is reached , the tool labels the corresponding risk-reward ratio for that specific TP, simplifying trade management.
█ Detailed Tooltips:
Tooltips provide deeper insights into your trading performance. They include information about the most profitable trade, such as the time it occurred, the bar index, and the percentage gain. Histogram tooltips also offer average win and loss percentages for further analysis.
█ Settings:
█ Code:
In summary, the Risk Reward Optimizer is a data-driven tool that offers traders the ability to optimize their risk-reward ratios, refine their strategies, and gain a deeper understanding of their trading performance. Whether you're a day trader, swing trader, or investor, this tool can help you make informed decisions and improve your trading outcomes.
BonsaiBonsai is a tailored tech analysis tool for all traders. It uses dynamic thresholds, sensitivity modes, and averaging to identify market trends. Its scoring system, visual cues, and alerts offer an intuitive trading journey.
═════════════════════════════════════════════════════════════════════════
🌳 Bonsai 🌳 Trend Analysis Indicator
📘 Overview
Bonsai is designed to aid traders in recognizing market trends, utilizing sensitivity as its pivotal component.
📌 Script Logic
• Threshold-Based Trends: Bonsai sets dynamic thresholds based on market deviations from previous highs or lows to identify trend reversals.
• Signal Generation: After ascertaining the trend direction, Bonsai provides buy/sell signals from trend crossovers and crossunders.
• Returns & Scoring: Each signal's potential returns are calculated, considering asset-specific trading fees. A scoring system (1-10) is introduced for traders to evaluate potential profitability quickly.
• Auto-Threshold: Threshold adjustments are made depending on the selected sensitivity mode, optimizing adaptability.
• Visual Indicators: Bonsai visualizes potential market highs and lows through trend lines. Colors differentiate between bullish and bearish market sentiments.
• Trend Line Enhancement with ALMA : Bonsai integrates the Arnaud Legoux Moving Average (ALMA), aiming to refine trend line representation. ALMA may reduce noise, providing a smoother trend line, which might be useful during volatile market conditions. This can potentially lead to improved trend forecasts with fewer fakeouts.
🎯 Purpose
• For Experienced Traders: Bonsai complements professional analysis with its data-driven insights, catering to diverse trading strategies.
• For Newcomers: Serving as an entry to technical analysis, Bonsai's intuitive design and streamlined settings are beginner-friendly.
🛠 Key Elements
• Dynamic Thresholds: Bonsai’s thresholds are dynamic, adapting to market conditions and user-selected sensitivity mode.
• Scoring System: Bonsai’s unique scoring system is grounded on potential returns, streamlining complex market data interpretation.
Performance Table Breakdown
🔧 Classic Elements & Value Added
• Refined Moving Averages: Bonsai incorporates standard moving averages like the EMA, SMA and ALMA to smooth and refine trend lines.
• Enhanced Visual Representation: Bonsai strives to provide clarity beyond just displaying market directions. Its visuals are crafted to help traders understand and potentially act promptly. The deliberate use of color dynamics, trend indications, and integration of moving averages come together to create a representation that aims to stand out in its clarity and simplicity.
📊 Features
• Dynamic Sensitivity Modes : Settings include:
• (Auto) Slow, Mid, Fast : These modes allow Bonsai to auto-adjust its sensitivity in line with market changes.
• 'Slow': Aims to capture larger market moves with fewer signals.
• 'Mid': A balanced mode with a moderate signal frequency.
• 'Fast': Caters to rapid market changes, providing more signals.
• Manual : For traders who prefer setting their sensitivity.
• Visualization: Green indicates bullish trends, and Red indicates bearish ones. Trend colors are customizable in gradient intensity and opacity.
• Performance Insights : A table displaying the effectiveness of all modes, guiding your strategy choices.
• Dashboard Themes : Users can switch between light and dark themes.
• Alert System : Real-time buy/sell signal notifications.
• Compatibility : Output can be integrated as a source for other indicators.
Indicator Settings Menu
🎛 How To Use Bonsai
1. Select your sensitivity mode.
2. Use color cues to analyze market directions.
3. Check the performance insights for strategy adjustment.
4. Set alerts to stay updated.
📜 Feedback & Improvement
We value your feedback. As the trading world evolves, Bonsai will adapt, meeting traders' dynamic needs.
❗️ Disclaimer
Bonsai serves as an analytical tool and isn’t a standalone trading strategy. Its performance table is for reference, and accuracy isn’t guaranteed. Always research thoroughly and be mindful of trading risks. Bonsai facilitates analysis but doesn’t promise particular outcomes.
TTP PNR filterPNR filter uses the "percentile nearest rank" method to produce signals from any source including oscillator indicators and price bars.
Features:
* Length - how many candles back in time to use for calculating PNR
* % low and high - what range of the spread of values captured will form the PNR band. Use 99&100 to create a band on the 1% highest percentile or 0&1 to create a band in the lowest percentile. It accepts float numbers so you can find very rare occurrences.
* src - by default it will use the close price but PNR filter can be used with any source. It's particularly useful when working with oscillators like RSI, MACD, ADX, etc.
* Signal direction - The indicator will print 1 when the selected conditions are met. Once the PNR band is plotted you can chose from cross over, cross under, above and below conditions to trigger a signal.
* Signal source - the band consists in a % low and % high, this option allows you to pick which band will be used with the "signal direction" parameter.
Example configuration:
1) Select 200 as the length
2) Select % low 0 and % high 1
3) Add RSI to the chart and select it as the source parameter
4) Select signal direction cross over
5) Select signal source % high which corresponds to the 1% band
In this setup you are finding values of RSI that in the past 200 candles have been that low only 1% of the time. With each new candle the calculation window will move as well leaving the oldest candle out.
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)
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
Supertrend - Optimised Exit We created a small script that will allow you to have a quick look into static SL/PT to choose from. This might save you time, replacing the manual search for optimal SL/PT.
We're checking signals of the strategy and computing its performance with a grid of SL/PT selected.
We used SuperTrend signals in this example, but it will be straightforward to integrate your signals.
In addition to total Return, we compute MAX Dd and Profit Factor. Other metrics can be implemented as well.
Thanks to @MUQWISHI for helping code it.
Disclaimer
Please remember that past performance may not indicate future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
Kioseff Trading - AI-Optimized RSIAI-Optimized RSI
Introducing AI-Optimized RSI: a streamlined solution for traders of any skill level seeking to rapidly test and optimize RSI. Capable of analyzing thousands of strategies, this tool cuts through the complexity to identify the most profitable, reliable, or efficient approaches.
Paired with TradingView's native backtesting capabilities, the AI-Optimized RSI learns from historical performance data. Set up is easy for all skill levels, and it makes fine-tuning trading alerts and RSI straightforward.
Features
Purpose : Uncover optimal RSI settings and entry levels with precision. Say goodbye to random guesses and arbitrary indicator use—this tool provides clear direction based on data.
Target Performance : You set the goal, and AI-RSI seeks it out, whether it's maximizing profits, efficient trading, or achieving the highest win rate.
AI-Powered : With intelligent AI recommendations, the tool dynamically fine-tunes your RSI approach, steering you towards ideal strategy performance.
Rapid Testing : Evaluate thousands of RSI strategies.
Dual Direction : Perfect both long and short RSI strategies with equal finesse.
Deep Insights : Access detailed metrics including profit factor, PnL, win rate, trade counts, and more, all within a comprehensive strategy script.
Instant Alerts : Set alerts and trade.
Full Customization : Test and optimize all RSI settings, including cross levels, profit targets and stop losses.
Simulated Execution : Explore the impact of limit orders and other trade types through simulation.
Integrative Capability : Combine your own custom indicators or others from the TradingView community for a personalized optimization experience.
Flexible Timeframes : Set your optimization and backtesting to any date range.
Key Settings
The image above shows explanations for a list of key settings for the optimizer.
Direction : This setting controls trade direction: Long or Short.
Entry Condition : Define RSI entry: Select whether to trigger trades on RSI crossunders or crossovers.
RSI Lengths Range : Choose the range of RSI periods to test and find the best one.The AI will find the best RSI period for you.
RSI Cross Range : Set the range for RSI levels where crosses trigger trade signals. The AI will find the best level for you.
Combinations : Select how many RSI strategies to compare.
Optimization Type : Choose the goal for optimization and the AI: profit, win rate, or efficiency.
Profit Target : Set your profit target with this setting.
Stop Loss : Decide your maximum allowable loss (stop loss) per trade.
Limit Order : Specify whether to include limit orders in the strategy.
Stop Type : Choose your stop strategy: a fixed stop loss or a trailing stop.
How to: Find the best RSI for trading
It's important to remember that merely having the AI-Optimized RSI on your chart doesn't automatically provide you with the best strategy. You need to follow the AI's guidance through an iterative process to discover the optimal RSI settings and strategy.
1.Starting Your Strategy Setup
Begin by deciding your goals for each trade: your profit target and stop loss. You'll also choose how to manage your stops – whether they stay put (fixed) or move with the price (trailing), and whether you want to exit trades at a specific price (limit orders). Keep the initial settings for RSI lengths and cross ranges at their default to give the tool a broad testing field. The AI's guidance will refine these settings to pinpoint the most effective ones through a process of comprehensive testing.
The image above shows our chart prior to any optimization efforts.
Note: the settings shown above in the key settings section will be used to start our demonstration.
2. Follow AI’s suggestions
Optimization Prompt: After loading your strategy, the indicator will prompt you to change the RSI length range and RSI level range to a better performing range.
Continue changing the RSI length range and RSI level range to match the indicator's suggestions until "Best Found" is displayed!
The image above shows results after we applied the tool’s suggestions. New suggestions have appeared, and we will continue to apply them.
Continue to adjust settings as recommended by the optimizer. If no better options are found, the optimizer will suggest increasing the number of combinations. Repeat this process until the optimizer indicates that the optimal setting has been identified.
Success! With the "Best Found" notification, an optimized RSI is now active. The AI will keep refining the strategy based on ongoing performance, ensuring continuous optimization.
AI Mode
AI Mode incorporates Heuristic-Based Adaptive Learning to fine-tune trading strategies in a continuous manner. This feature consists of two main components:
Heuristic-Based Decision Making: The algorithm evaluates multiple RSI-based trading strategies using specific metrics such as Profit and Loss (PNL), Win Rate, and Most Efficient Profit. These metrics act as heuristics to assist the algorithm in identifying suitable strategies for trade execution.
Online Learning: The algorithm updates the performance evaluations of each strategy based on incoming market data. This enables the system to adapt to current market conditions.
Incorporating both heuristic-based decision-making and online learning, this feature aims to provide a framework for trading strategy optimization.
Settings
AI Mode Aggressiveness:
Description: The "AI Mode Aggressiveness" setting allows you to fine-tune the AI's trading behavior. This setting ranges from “Low” to “High”, with “High” indicating a more assertive trading approach.
Functionality: This feature filters trading strategies based on a proprietary evaluation method. A higher setting narrows down the strategies that the AI will consider, leaning towards more aggressive trading. Conversely, a lower setting allows for a more conservative approach by broadening the pool of potential strategies.
Adaptive Learning Aggressiveness:
Description: When Adaptive Learning is enabled, the "Adaptive Learning Aggressiveness" setting controls how dynamically the AI adapts to market conditions using selected performance metrics.
Functionality: This setting impacts the AI's responsiveness to shifts in strategy performance. By adjusting this setting, you can control how quickly the AI moves away from strategies that may have been historically successful but are currently underperforming, towards strategies that are showing current promise.
Optimization
Trading system optimization is immensely advantageous when executed with prudence.
Technical-oriented, mechanical trading systems work when a valid correlation is methodical to the extent that an objective, precisely-defined ruleset can consistently exploit it. If no such correlation exists, or a technical-oriented system is erroneously designed to exploit an illusory correlation (absent predictive utility), the trading system will fail.
Evaluate results practically and test parameters rigorously after discovery. Simply mining the best-performing parameters and immediately trading them is unlikely a winning strategy. Put as much effort into testing strong-performing parameters and building an accompanying system as you would any other trading strategy. Automated optimization involves curve fitting - it's the responsibility of the trader to validate a replicable sequence or correlation and the trading system that exploits it.
Kioseff Trading - AI-Optimized Supertrend
AI-Optimized Supertrend
Introducing AI-Optimized Supertrend: a streamlined solution for traders of any skill level seeking to rapidly test and optimize Supertrend. Capable of analyzing thousands of strategies, this tool cuts through the complexity to identify the most profitable, reliable, or efficient approaches.
Paired with TradingView's native backtesting capabilities, the AI-Optimized Supertrend learns from historical performance data. Set up is easy for all skill levels, and it makes fine-tuning trading alerts and Supertrend straightforward.
Features
Rapid Supertrend Strategy Testing : Quickly evaluate thousands of Supertrend strategies to find the most effective ones.
AI-Assisted Optimization : Leverage AI recommendations to fine-tune strategies for superior results.
Multi-Objective Optimization : Prioritize Supertrend based on your preference for the highest win rate, maximum profit, or efficiency.
Comprehensive Analytics : The strategy script provides an array of statistics such as profit factor, PnL, win rate, trade counts, max drawdown, and an equity curve to gauge performance accurately.
Alerts Setup : Conveniently set up alerts to be notified about critical trade signals or changes in performance metrics.
Versatile Stop Strategies : Experiment with profit targets, trailing stops, and fixed stop losses.
Binary Supertrend Exploration : Test binary Supertrend strategies.
Limit Orders : Analyze the impact of limit orders on your trading strategy.
Integration with External Indicators : Enhance strategy refinement by incorporating custom or publicly available indicators from TradingView into the optimization process.
Key Settings
The image above shows explanations for a list of key settings for the optimizer.
Set the Factor Range Limits : The AI suggests optimal upper and lower limits for the Factor range, defining the sensitivity of the Supertrend to price fluctuations. A wider range tests a greater variety, while a narrower range focuses on fine-tuning.
Adjust the ATR Range : Use the AI's recommendations to establish the upper and lower bounds for the Average True Range (ATR), which influences the Supertrend's volatility threshold.
ATR Flip : This option lets you interchange the order of ATR and Factor values to quicky test different sequences, giving you the flexibility to explore various combinations and their impact on the Supertrend indicator's performance.
Strategies Evaluated : Adjust this setting to determine how many Supertrend strategies you want to assess and compare.
Enable AI Mode : Turn this feature on to allow the AI to determine and employ the optimal Supertrend strategy with the desired performance metric, such as the highest win rate or maximum profitability.
Target Metric : Adjust this to direct the AI towards optimizing for maximum profit, top win rates, or the most efficient profits.
AI Mode Aggressiveness : Set how assertively the AI pursues the chosen performance goal, such as highest profit or win rate.
Strategy Direction : Choose to focus the AI's testing and optimization on either long or short Supertrend strategies.
Stop Loss Type : Specify the stop loss approach for optimization—fixed value, a trailing stop, or Supertrend direction changes.
Limit Order : Decide if you want to execute trades using limit orders for setting your profit targets, stop losses, or apply them to both.
Profit Target : Define your desired profit level when using either a fixed stop loss or a trailing stop.
Stop Loss : Define your desired stop loss when using either a fixed stop loss or a trailing stop.
How to: Find the best Supertrend for trading
It's important to remember that merely having the AI-Optimized Supertrend on your chart doesn't automatically provide you with the best strategy. You need to follow the AI's guidance through an iterative process to discover the optimal Supertrend settings and strategy.
Optimizing Supertrend involves adjusting two key parameters: the Factor and the Average True Range (ATR). These parameters significantly influence the Supertrend indicator's sensitivity and responsiveness to price movements.
Factor : This parameter multiplies the ATR to determine the distance of the Supertrend line from the price. Higher values will create a wider band, potentially leading to fewer trade signals, while lower values create a narrower band, which may result in more signals but also more noise.
ATR (Average True Range) : ATR measures market volatility. By using the ATR, the Supertrend adapts to changing market volatility; a higher ATR value means a more volatile market, so the Supertrend adjusts accordingly.
During the optimization process, these parameters are systematically varied to determine the combination that yields the best performance based on predefined criteria such as profitability, win rate, or risk management efficiency. The optimization aims to find the optimal Factor and ATR settings.
1.Starting Your Strategy Setup
Begin by deciding your goals for each trade: your profit target and stop loss, or if all trades exit when Supertrend changes direction. You'll also choose how to manage your stops – whether they stay put (fixed) or move with the price (trailing), and whether you want to exit trades at a specific price (limit orders). Keep the initial settings for Supertrend Factor Range and Supertrend ATR Range at their default to give the tool a broad testing field. The AI's guidance will refine these settings to pinpoint the most effective ones through a process of comprehensive testing.
Demonstration Start: We'll begin with the settings outlined in the key settings section, using Supertrend's direction change to the downside as our exit signal for all trades.
2. Continue applying the AI’s suggestions
Keep updating your optimization settings based on the AI's recommendations. Proceed with this iterative optimization until the "Best Found" message is displayed, signaling that the most effective strategy has been identified.
While following the AI's suggestions, we've been prompted with a new suggestion: increase the
number of strategies evaluated. Keep following the AI's new suggestions to evaluate more strategies. Do this until the "Best Found" message shows up.
Success! We continued to follow the AI’s suggestions until “Best Found” was indicated!
AI Mode
AI Mode incorporates Heuristic-Based Adaptive Learning to fine-tune trading strategies in a continuous manner. This feature consists of two main components:
Heuristic-Based Decision Making: The algorithm evaluates multiple Supertrend-based trading strategies using metrics such as Profit and Loss (PNL), Win Rate, and Most Efficient Profit. These metrics act as heuristics to assist the algorithm in identifying suitable strategies for trade execution.
Online Learning: The algorithm updates the performance evaluations of each strategy based on incoming market data. This enables the system to adapt to current market conditions.
Incorporating both heuristic-based decision-making and online learning, this feature aims to provide a framework for trading strategy optimization.
AI Mode Settings
AI Mode Aggressiveness:
Description: The "AI Mode Aggressiveness" setting allows you to fine-tune the AI's trading behavior. This setting ranges from “Low” to “High”, with “High” indicating a more assertive trading approach.
Functionality: This feature filters trading strategies based on a proprietary evaluation method. A higher setting narrows down the strategies that the AI will consider, leaning towards more aggressive trading. Conversely, a lower setting allows for a more conservative approach by broadening the pool of potential strategies.
Optimization
Trading system optimization is immensely advantageous when executed with prudence.
Technical-oriented, mechanical trading systems work when a valid correlation is methodical to the extent that an objective, precisely-defined ruleset can consistently exploit it. If no such correlation exists, or a technical-oriented system is erroneously designed to exploit an illusory correlation (absent predictive utility), the trading system will fail.
Evaluate results practically and test parameters rigorously after discovery. Simply mining the best-performing parameters and immediately trading them is unlikely a winning strategy. Put as much effort into testing strong-performing parameters and building an accompanying system as you would any other trading strategy. Automated optimization involves curve fitting - it's the responsibility of the trader to validate a replicable sequence or correlation and the trading system that exploits it.
Self-Optimizing RSI Strategy [Kioseff Trading]Hello!
Introducing the Self-Optimizing RSI Strategy.
The indicator tests up to 800 RSI strategies simultaneously, looping through arrays, and auto plots the best performing parameter set.
The image above shows the result of 800 RSI strategies concurrently.
The table oriented bottom right shows the performance and risk metrics of the best performing RSI system tested across the bar set. Additionally, the conditions for entry and exit are displayed; for the image - a long entry system predicated on RSI crossunders and exit system predicated on a 1% TP and 2% SL are shown.
The indicator calculates numerous risk and performance metrics.
Calculated metrics include:
RSI Parameters
RSI Cross Entry Level
Total Trades
Win Rate
Avg. Gain for Winning Trades
Max Pain
PnL (Cumulative Performance)
Profit Factor
Avg. Loss for Losing Trades
Ratio Avg. Win / Avg. Loss
Avg. Bars in Trade
Max Drawdown
Current Drawdown
Open Position PnL
"Dynamic" indicates the performance of self-optimizing RSI system was tested.
The image above shows the performance of the greatest-performing RSI system - a fixed set of parameters - when adhering to a 1% TP and 2% fixed SL.
Trailing Stops and Profit-Taking Limit orders can be set/simulated.
The image above shows a dynamic entry level - plotted as a purple, non-transparent line.
The entry level "self-optimizes" to mimic the best performing RSI system at current time.
The image above exemplifies the functionality for all horizontal lines plotted on the chart.
The average RSI level achieved subsequent a profitable trade is shown.
The average RSI level achieved subsequent a losing trade is shown.
The entry level for RSI crossunders/crossovers is shown.
The image above show the Self-Optimizing RSI indicator recording entries & exits; gains & losses, for each executed trade.
You can "verify" trades manually.
Blue boxes reflect an entered position.
Green boxes reflect a closed, profitable trade.
Red boxes reflect a close, losing trade.
The percentage gain for a profitable trade is appended to green boxes; the percentage loss for a losing trade is appended to red boxes.
The Self-Optimizing RSI indicator plots off the chart; however, percentage gains/losses are measured against price, not RSI.
Boxes correlate to the interval a trade was entered/exited on.
The indicator hosts various methods to filter the outcome for testing.
For instance, you can:
Use trailing stops or fixed stop losses
Test RSI crossunders and crossovers
Configure the RSI settings that are tested (i.e. RSI 2 - 9, RSI 14 - 20, RSI 50 - 57)
Test short-based RSI Systems and long-based RSI systems
Simulate limit orders (Exit intrabar at fixed stop losses or trailing stop losses; exit intrabar at profit targets)
Require all tested RSIs to trend above or below their respective average (i.e. all RSIs must trend above/below their 50-interval EMA values. SMAs can also be used)
Use external indicators and require a user-defined value be exceeded, measured below, or that price exceed or measure below an indicator. The Self-Optimizing RSI indicator incorporates a few built-in technical indicators - ADX, %k, MFI, CMFI, and RSI. Consequently, you can require these indicators to measure above/below a specified level prior to entry. Additionally, you can supplement an extrinsic indicator (anything custom coded with plot values) to the entry logic for the Self-Optimizing RSI indicator. I'll show an example shortly.
Adjust the time window that's tested.
Adjust PT and SL percentages.
Override plot an RSI system to procure thorough statistics.
Require a symbol to measure above/Below or equal to a particular price level to “validate” a Long/Short entry signal. You can retrieve any data hosted by TradingView and require it measure above/below a user-defined level prior to entry. For instance, you can select "$VIX", and require the ticker to measure less than $30 prior to long/short entry. If "$VIX" measures greater than $30 prior to a long/short signal the position will not open. Alternatively, you can require a symbol to measure above a user-defined price prior to entry. If the retrieved ticker doesn't measure above the user-defined level prior to entry a trade will not open.
Use trailing stops or fixed stop losses
The image above shows results for 800 short-based RSI systems - using a trailing stop loss.
Test RSI crossunders and crossovers
The image shows results for 800 long-based RSI systems. Positions are entered subsequent to RSI crossovers.
You can select which RSI strategies are tested - you aren't not limited to testing RSI 2 - RSI 9 (:
Simulate limit orders (Exit intrabar at fixed stop losses or trailing stop losses; exit intrabar at profit targets)
The image above shows performance test results when exiting during the interval subsequent to the profit target being exceeded.
The image above shows performance test results when exiting during the interval subsequent to the stop loss being exceeded.
Require all tested RSIs to trend above or below their respective average (i.e. all RSIs must trend above/below their 50-interval EMA values. SMAs can also be used)
The image above shows an RSI EMA in addition to prerequisite condition. For each RSI strategy tested, the RSI used for the strategy must measure above an EMA of its values prior to entry. You can require RSI to measure below an EMA of its values prior to entry, use an SMA, and change the length of the MA used.
Use external indicators and require a user-defined value be exceeded, measured below, or that price exceed or measure below an indicator. The Self-Optimizing RSI indicator incorporates a few built-in technical indicators - ADX, %k, MFI, CMFI, and RSI. Consequently, you can require these indicators to measure above/below a specified level prior to entry. Additionally, you can supplement an extrinsic indicator (anything custom coded with plot values) to the entry logic for the Self-Optimizing RSI indicator. I'll show an example shortly.
The image above shows me requiring the ADX indicator to measure above "20" prior to long entry. Any of the built-indicators can be used with similar conditions; you can implement a custom-coded indicator for trade logic.
Additionally, you can supplement an extrinsic indicator (anything custom coded with plot values) to the entry logic for the Self-Optimizing RSI indicator.
The image above shows me retrieving the value for Volume Profile Point of Control - a TradingView coded indicator.
Consequently, I can require price to measure above/below the session's Poc prior to RSI long/short entry.
You can use this feature with any custom coded indicator providing historical plot values - something you or a favored author have coded.
]Adjust PT and SL percentages
The image above shows adjusted TP & SL percentages - optimize and reward/risk ratio you'd like (:
Override plot an RSI system to procure thorough statistics.
The image above shows manually plotted RSI parameters and a corresponding stat sheet.
Require a symbol to measure above/Below or equal to a particular price level to “validate” a Long/Short entry signal. You can retrieve any data hosted by TradingView and require it measure above/below a user-defined level prior to entry. For instance, you can select "$VIX", and require the ticker to measure less than $30 prior to long/short entry. If "$VIX" measures greater than $30 prior to a long/short signal the position will not open. Alternatively, you can require a symbol to measure above a user-defined price prior to entry. If the retrieved ticker doesn't measure above the user-defined level prior to entry a trade will not open.
The image above shows me requiring the ticker "$VIX" to measure below $30 prior to long/short entry. If %VIS measures greater than $30 when a long/short signal triggers a position will not be opened. Further refine your trading system with this feature - exploit correlations.
Adjust the time window that's tested.
The image above shows configurable start and end dates for the optimization period.
You won't be able to test 800 RSI strategies concomitantly on a 20,000 bar data set.
Consequently, for large data sets (intrasession data) you will have to narrow the optimization window to test a larger number of combinations.
You can test 80 (loads on all data sets), 144 (loads on all data sets), 264 (loads on ~15,000 bar data sets), 312 (loads on ~11,500 bar data sets) and 800 (loads on ~4950 bar data sets)combinations simultaneously. You can test 800 RSI strategies simultaneously on intrasession data; however, you'll likely have to narrow the tested time window.
I recently published a bar count script titled "Bar Count for Backtesting", you can access the script here:
The above script is useful for quickly calculating the number of bars in a time window, or the date for a bar that is "x" number of bars back. Therefore, implementing these scripts cooperatively should improve date selection efficiency (not arbitrarily selecting test start & end dates that fail to load).
I included a tool tip describing the near-maximum bars in a data set that the higher numbers of simultaneous RSI strategies can be tested on.
More to come; enjoy!
(P.S. The script uses private libraries and, consequently, is unable to be published open source)
An optimization script is best implemented to discover what won't work, not what will work. The best performing "optimized" parameters are not a guaranteed profitable investment system. While we may see an exceptionally positive performance for a set of parameters, it's impossible to know how much of that performance is the beneficiary of market noise in the absence of additional testing. Most market moves are noise - irreplicable sequences that offer no predictive utility - and most "good" backtests overwhelmingly benefit from these irreplicable sequences. An investor unfamiliar with this concept may be lead to believe they have found a valid correlation between an indicator sequence and subsequent price movement, despite the correlation being illusory.
Consequently, it should be assumed that the best performing parameters strongly benefitted from market noise and will not work in a live market - until further rigorous statistical tests are performed on an investment system built around the best performing parameters. This includes out-of-sample, in-sample, and forward testing in addition to testing negatively correlated, positively correlated and zero-correlation assets; testing additional assets should be treated as prerequisite to live implementation.
Of course, all trading strategies, even one's that methodically exploit a valid correlation/replicable sequence, will benefit from market noise - it's impossible to avoid. However, a "legit" trading strategy has a chance to work on future price data, while an overoptimized strategy will fail miserably on new price data!
An overoptimized strategy is virtually guaranteed to have a better backtest performance than a valid strategy. The overoptimized strategy will fail in a live market while the valid strategy has a chance of working. So, should you notice the best performing RSI parameters, be sure to build a comprehensive trading system around the parameters and perform additional tests. This is the only way to know if the optimized parameters will truly work in a live market!
Unfortunately, they often will not!
This publication does not constitute investment advice.
Optimizer ~ Beta 0.1 | Belfort TradersOptimizer
The Optimizer backtests the maximum amount of moving averages which can be possible created ((max amount of bars / 2)-1) and compares them all with one another to then plot the most profitable strategy.
Current Achievement:
-> Get it to work, make it work with 106 different moving averages. ==> Beta 0.1
Roadmap:
0.15 Basic Comparison of 5k moving averages <= 07.06.22
0.2 Risk Management Basics <= 07.06.22
0.3 Finding the most profitable timeframe <= 07.06.22
0.4 Testing the limits of Tradingview <= 14.06.22
0.5 Complex array sorting list, comparing 1k moving averages, taking the most profitable out, going to the next list ==> Bypassing calculation limit by doing that. <= 14.06.22
0.6 Volatility adjusted moving averages <= 14.06.22
==> Find more likely profitable moving averages, run those first -> Increase efficiency
0.7 Add second filter (Either most profitable strategy or most reliable strategy) ==> Order Frequency Ratio <= 14.06.22
0.8 Complex Risk Management <= 14.06.22
0.9 Reliability Ratio weekly volatility average filter used as a protective filter if current weekly volume is drastically different from the past's weekly volatility average with fractal patterns
<= 21.06.22
1.0 Finished Optimizer
Portfolio Management for this Performance:
Initial Capital: 20000 USD
Risk per Trade: 10% of capital
Commission: 0.01%
Slippage: 4 ticks
Position size optimizer RNR_0// 1. When market volatility is severe, the use of equal weight systems is eliminated.
// 2. It is a bad strategy to concentrate bets since they drive the short position, which ultimately influences the whole book of trade.
// 3. Expect your short positions to get squeezed by at least 10% during the next five trading days.
// 4. When there are bear markets, the correlation goes to 1. Allow for the fact that both Longs and Shorts will go against you at the same time.
// 5. Unprofitable trades increase in magnitude rapidly.
// 6. Unlike in an up-trending market, there are no 2-3 wins. Winners shrink and contribute less. So, there is an opposite tendency toward oversized positions.
// 7. In contrast to a bull market, in contrast to the long. The winners shrink in size and contribute less. As a result, there is an inverse trend toward oversized positions.
// 9. The winners shrink in size, while the losers grow exponentially The challenge is to size positions in such a manner that they contribute favorably when successful but do not completely obliterate performance when unsuccessful.
Randomly select enter and exit
```
longCondition = bar_index % 33 == 0
if (longCondition and afterStartDate )
strategy.entry("buy", strategy.long, qty = qty)
shortCondition = bar_index % 44 == 0
if (shortCondition)
strategy.close("buy")
```
Self-Adjusting Parabolic SARWhat is this tool?
This is an implementation of the well-known Parabolic SAR indicator that can adjust parameters on the fly to achieve a better profitability.
The algorithm was borrowed from Profitable Parabolic SAR and connected to the basic Parabolic SAR implementation. So, now it will switch parameters automatically without any manual work required.
Profitable Parabolic SAR indicator can be found here:
Parabolic SAR indicator can be found here:
Self-Adjusting SuperTrendWhat is this tool?
This is an implementation of the well-known SuperTrend indicator that can adjust parameters on the fly to achieve a better profitability.
The algorithm was borrowed from Profitable SuperTrend and connected to the basic SuperTrend implementation. So, now it will switch parameters automatically without any manual work required.
Alerts
The same alerts as for the basic SuperTrend + special alert to notify user about parameters switching.
Profitable SuperTrend indicator can be found here:
SuperTrend indicator can be found here:
Good luck!
Profitable MAMA & FAMA CrossoverIntroduction
The MESA Adaptive Moving Average (MAMA) was originally presented by John F. Ehlers. By design, it is a special kind of Exponential Moving Average with self-adjusting alpha. Its adaptation is based on the rate change of phase as measured by the Homodyne Discriminator and the alpha parameter is allowed to range between a maximum and minimum value (Fast Limit and Slow Limit).
Key Point: Ehlers suggested the maximum value to be 0.5 and the minimum to be 0.05 .
The variable alpha is computed as the Fast Limit divided by the phase rate of change. If the phase rate of change is large, the variable alpha is bounded at the SlowLimit. Then, this alpha is used to compute MAMA and FAMA (Following Adaptive Moving Average).
Should we rely on Ehlers' suggestions if we want to achieve the best result with MAMA & FAMA crossover system?
Well, he is a good specialist and widely recognized author, I respect him, but the answer is no and you can see results on the chart.
What is our goal?
We want to find the best configuration for MAMA & FAMA Crossover. To achieve that we need to analyze the MAMA's alpha parameter or, more specific, the bounds for this parameter, Fast and Slow Limits.
What is this tool?
This tool is a performance optimizer that uses decision tree-based algorithm under the hood to find the most profitable settings for the MAMA & FAMA Crossover. It analyzes a bunch of different Fast Limits (between 0.01 to 0.8 with step of 0.1 ) and Slow Limits (between 0.01 to 0.6 with step of 0.1 ) and backtests each combination across the entire history of an instrument. If the more profitable parameters were found, the indicator will switch its values to the found ones immediately.
So, instead of manually selecting and testing parameters just apply this indicator to your chart and
relax - the algorithm will find the best parameters for you
Alerts
It has a special alert that notifies when the more profitable settings were detected.
NOTE: It does not change what has already been plotted.
NOTE 2: This is not a strategy, but an algorithmic optimizer.
Reference: www.mesasoftware.com
MAMA & FAMA Crossover can be found here:
Profitable Jurik RSXIntroduction
As you know the Jurik RSX is a "noise free" smoothed version of RSI (Relative Strength Index), with no added lag.
It was originally developed by Mark Jurik and is used the same way as RSI. To learn more about this indicator see www.jurikres.com
The most basic and common strategy is to use the crossovers between Jurik RSX and its overbought/oversold levels as trade signals:
when RSX crosses above 30, go Long
when RSX crosses below 70, go Short
exit when a crossover occurs in the opposite direction
What is this tool?
This tool is a performance scanner that uses a decision tree-based algorithm under the hood to find the most profitable settings for Jurik RSX. It analyzes the range of periods between 2 to 100 and backtests the Jurik RSX for each period (using the strategy mentioned above) across the entire history of an instrument. If the more profitable parameter was found, the indicator will switch its value to the found one immediately.
So, instead of manually selecting parameters just apply it to your chart and relax - the algorithm will do it for you, everywhere you want.
The algorithm can work in two modes: Basic and Early Switch. The Early Switch algorithm makes some assumptions and activates a set of optimizations to find a better setting DURING the trades, not after they were actually closed.
The difference is illustrated on the screenshot below
But two modes can show identical values depending on timeframe
Additionally you can set up a backtest window through indicator's settings (the optimizers which were published before will get this feature soon).
Alerts
It has a special alert that notifies when a more profitable period was detected.
NOTE: It does not change what has already been plotted.
NOTE 2: This is not a strategy, but an algorithmic optimizer.
Profitable RSI (Relative Strength Index)Introduction
As you know the Relative Strength Index (RSI) was originally developed by J. Welles Wilder and was described in his book "New Concepts in Technical Trading Systems" (1978). It is intended to measure the strength or weakness of an instrument for the specified period.
The most basic strategy is to use the crossovers as trade signals:
when RSI crosses above 30, go Long
when RSI crosses below 70, go Short
Exit when a crossover occurs in the opposite direction
What is this tool?
This tool is a performance scanner that uses a decision tree-based algorithm under the hood to find the most profitable settings for RSI. It analyzes the range of periods between 2 to 100 and backtests the RSI for each period using the strategy mentioned above across the entire history of an instrument. If the more profitable parameter was found, the indicator will switch its value to the found one immediately.
So, instead of manually selecting parameters just apply it to your chart and relax - the algorithm will do it for you.
The algorithm can work in two modes: Basic and Advanced "Early Switch" . The Early Switch algorithm makes some assumptions and activates a set of optimizations to find the better setting DURING the trades, not after they were closed.
The difference is illustrated on the screenshot below:
Additionally you can set up a backtest window through indicator's settings (the optimizers which were published before will get this feature soon).
Alerts
It has a special alert that notifies when a more profitable period was detected.
NOTE: It does not change what has already been plotted.
NOTE 2: This is not a strategy, but an algorithmic optimizer.
Day after day. Night after night.
I've been waiting to program again.
Day after day. Night by to night.
Trading is waiting inside your heart.
Profitable SuperTrendIntroduction
I was faced with the fact that many authors contradicted each other about the indicator settings. Each trader offers his(her) own settings, without having an evidence base. Therefore, I decided to make an algorithmic optimizer.
What is this tool?
This tool is a performance optimizer that uses a decision tree-based algorithm under the hood to find the most profitable settings for the SuperTrend indicator. It analyzes a bunch of different ATR Periods (between 3 to 45 ) and ATR Multipliers (between 1 to 8 with a decimal step of 0.1 ) and backtests each combination across the entire history of an instrument. If the more profitable parameters were found, the indicator will switch its values to the found ones immediately.
Instead of manually selecting parameters, just relax - the algorithm will do it for you.
Alerts
It has an alert that notifies when the more profitable settings were found.
NOTE: It does not change what has already been plotted before.
NOTE 2: The implementation of the SuperTrend indicator I used can be found here
Profitable Parabolic SARIntroduction
As you know, Parabolic Stop and Reverse (SAR, PSAR) was originally developed by J. Welles Wilder and was described in his book "New Concepts in Technical Trading Systems" (1978). It derives its name from the fact that when charted, the pattern formed by the points resembles a parabola.
Mr. Wilder described it as "one of my favorite systems because it squeezes more profit out of an intermediate move than any method I know" .
Interpretation
PSAR follows price and can be considered a trend following indicator. Once a downtrend reverses and starts up, PSAR follows prices like a trailing stop. Same is true for the opposite direction.
Due to its nature, PSAR continuosly protects on long and short positions.
Parameters
One of the key components of PSAR is the Acceleration Factor (AF). The AF is one of a progression of numbers beginning at 0.02 and ending at 0.2 . The AF is increased by the increment of 0.02 each time that a new high is made until a value of 0.2 is reached.
Mr. Wilder used the next parameters
Start: 0.02
Increment: 0.02
Maximum: 0.2
and they are default for the built-in PSAR indicator and its strategy.
But are these params really profitable? Mr. Wilder noticed that "I have tried many different acceleration factors on this system and have found that a consistent increase of 0.02 works best overall...the range for the incremental increase is between 0.018 and 0.021 " .
That was then, in 1978. Other times have come. Is our grandpa still right in his recommendations?
I made this tool to figure it out.
What is this tool?
This tool is a performance scanner that uses a decision tree-based algorithm under the hood to find the most profitable settings for PSAR. It analyzes a bunch of different Start (between 0.001 to 0.02 ) and Increment (between 0.001 to 0.03 ) parameters and backtests each combination across the entire history of an instrument. If the more profitable parameters were found, the indicator will switch its values to the found ones immediately.
Instead of manually selecting parameters, just relax - the algorithm will do it for you.
It doesn't touch the last parameter, Maximum , for two reasons.
First, as Mr. Wilder noticed in his book, "...the number of increases it takes to reach at least 0.2 , but do not exceed 0.22 " . That is, the parameter sits in a very narrow range.
Second, I tested different maximums and I came to the conclusion that this parameter has a minimal impact on net profit, compared with the more significant parameters of start and increment.
Alerts
It has an alert that notifies when the more profitable settings were detected.
NOTE : It does not change what has already been plotted.
Good luck!
Profitable Vortex Indicator ScannerIntroduction
The Vortex Indicator is a technical indicator invented by Etienne Botes and Douglas Siepman (Technical Analysis of Stocks & Commodities, V.28:1 (January, 2010): "The Vortex Indicator") to identify the start of a new trend or the continuation of an existing trend within financial markets.
It is composed of two lines, +VI and -VI . +VI represents up trending momentum and -VI represents down trending momentum.
The most basic strategy is to use the crossovers as trade signals:
when +VI crosses above -VI , go Long
when -VI crosses above +VI , go Short
Exit when a crossover occurs in the opposite direction
What is this tool?
This tool is a performance scanner that uses a decision tree-based algorithm under the hood to find the most profitable period's setting for the indicator. It analyzes the range of periods between 2 to 100 and backtests the Vortex Indicator for each period using the strategy mentioned above across the entire history of an instrument.
Settings
Net Profit line is optional and can be hidden through settings.
Alerts
It has an alert that notifies when a more profitable period was detected.
NOTE : It does not change what has already been plotted.
Good luck!