Test - Symbiotic Exiton Measure Enthropic Nexus indicatorThe Symbiotic Exiton Measure Enthropic Nexus (SEMEN) Indicator is a technical analysis tool used in trading and investing. It's name might sound complex, but its function is quite simple - to help traders make informed decisions about buying or selling stocks by predicting market trends.
The SEMEN indicator uses a combination of various factors such as volume, price action, moving averages, and other indicators to generate a single numerical value that represents the overall health of the market. A high reading indicates a strong uptrend, while a low one suggests a downtrend.
Traders can use this information to enter or exit positions with confidence.
In essence, the SEMEN indicator provides a comprehensive view of the market's sentiment and direction, making it an essential tool for any trader or investor looking to make profitable decisions in today's volatile stock markets.
~description generated with Airoboros7b
- The indicator is experimental so use at your own discretion..
المتوسطات المتحركة
Geometrical Mean Moving AverageThe geometric moving average is a type of moving average that calculates the geometric mean of the previous n-periods of the price time series. Unlike the simple moving average that uses the arithmetic mean to continuously calculate the moving average as new price data comes in, the geometric moving average uses the geometric mean formula to get the moving average of the price data as new ones come in.
Why use a geometric moving average?
The geometric moving average differs from the simple moving average in how it is calculated. Most importantly, the geometric mean takes into account the compounding that occurs from period to period.
How can you use a geometric mean moving average?
You can use the GMMA just as you would use any other moving average indicator. You can use it to identify the direction of the trend, and in this case, it can also serve as a support level during an uptrend or a resistance level during a downtrend.
Drawbacks with a geometric moving average
Just like other moving average indicators, the GMA has limitations. Some of them are as follows:
It lags because it uses past price data.
It is pretty useless when the price action is choppy or moving predominantly sideways. During such periods, it can give multiple false signals.
Credit Spreads Trend Trading Indicator
This is a credit spreads trend following indicator designed to assist credit spreads traders in identifying trends and exploring trade ideas.
High Level Overview
It is based on a 200 period moving average line and incorporates calculations related to expected moves, which are derived from the stock's historical volatility. These calculations generate bands that may suggest possible ranges and trends. For example, the green band is one standard deviation based on historical volatility above the 200 period moving average while the red band is one standard based on historical volatility below the 200 period moving average. The grey line on the chart is the 200 period moving average. Historical volatility in this instance is calculated by looking at the last 252 candles.
How You Can Use It
You can use these bands to assist in trend analysis. For instance, if the stock is above the green line, the stock typically appears to be bullish. If the stock is below the red line, the stock typically appears to be bearish. When the market is between the red line and green, the stock trends to be sideways. With this information on the trend, it can assist you in coming up with credit spread trade ideas (put credit spread = bullish and call credit spread = bearish). The credit spread trade ideas table on the chart will show case a potential trade idea based on the percentage out of the money you want to place the trade (this is set in your settings).
This indicator has taken me 6 years to build, so I hope you enjoy it :)
Algorithm breakdown
Above the green line: bullish trend
Below the red line: bearish trend
Between the red and green line: sideways market
Above the top yellow line (optional): overbought market
Below the bottom yellow line (optional): oversold market
Understand The Settings
Plot breakout arrows?: shows arrows when the stock crossed one of the major lines
Show standard deviation high and low: shows where the market will top out and bottom out (mathematically)
SMA length: the length of the midline which is a simple moving average indicator
Show credit spreads recommendation: gives you trade ideas based on the stock's trend
Percentage out of the money: how far the recommended trade idea is out of the money
Keep in mind, this indicator may serve as a tool for potential trend identification and generating credit spread trade concepts, but it's essential to conduct your research and exercise due diligence beforehand.
GKD-C STD-Filtered, REMA EMA/RMA [Loxx]The Giga Kaleidoscope GKD-C STD-Filtered, REMA EMA/RMA is a confirmation module included in Loxx's "Giga Kaleidoscope Modularized Trading System."
█ GKD-C STD-Filtered, REMA EMA/RMA
STD-Filtered, Regularized EMA/RMA calculates and visualizes a standard deviation (STD) filtered, regularized version of the Exponential Moving Average (EMA) or Regular Moving Average (RMA) on a trading chart.
Understanding the Regularized Moving Average
The Regularized Moving Average, as conceptualized by Chris Satchwell, offers a more responsive interpretation compared to traditional moving averages. By incorporating a smoothing mechanism using "Lambda", this approach reduces lag without compromising the data's integrity.
In the realm of technical analysis, many regard it as a preferred alternative to the standard Moving Average and Exponential Moving Average.
How Does It Stand Out from Other Moving Averages?
While analysts traditionally shorten an indicator's length or period to minimize lag, the Regularized Moving Average uses a unique approach. By embedding "Regularization" within its computation, this method introduces Lambda (often symbolized as λ-calculus). This mathematical factor tames the moving average's undue fluctuations, offering more stability through its Lambda adjustments.
Pro Tip: For those analyzing smaller intraday timeframes, consider ramping up the Lambda setting to 6.0 or even higher. When tweaking these settings, always remember to backtest and observe how it impacts signal accuracy and noise filtering.
Standard Deviation Filtering:
This filtering mechanism is designed to smoothen price data by eliminating minor fluctuations that might be considered "noise". Here's how the process works:
For every data point, the standard deviation of prices over a specified period is calculated.
This standard deviation is then multiplied by a user-defined value to determine a threshold. This threshold defines the magnitude of change required in the price for it to be considered significant.
For each price, if the absolute difference between its current and previous value is less than this threshold, the price is kept unchanged (considered insignificant and thus filtered). If the difference exceeds the threshold, the price is considered significant and remains as is.
By applying this filter, minor price variations within the threshold are disregarded, resulting in a smoother representation of the price data.
Moving Average Calculation:
The script provides an option to calculate either a regularized Exponential Moving Average (EMA) or a Regular Moving Average (RMA). Here's how these are approached:
If the EMA option is selected: A weighted formula is used where more recent prices have a higher influence on the average than older prices. This is achieved by applying a fraction that's inversely related to the chosen period. The outcome is an average that reacts more quickly to recent price changes.
If the RMA option is selected: The average is computed by giving equal weight to all prices within the chosen period.
Both these averages then undergo a regularization process. Regularization, in this context, refers to adjusting the moving average using a factor to make it potentially more sensitive or responsive to price changes.
This regularized moving average can offer a refined perspective on price trends by being more adaptive to recent changes, potentially highlighting turning points or trend continuations more effectively.
█ Giga Kaleidoscope Modularized Trading System
Core components of an NNFX algorithmic trading strategy
The NNFX algorithm is built on the principles of trend, momentum, and volatility. There are six core components in the NNFX trading algorithm:
1. Volatility - price volatility; e.g., Average True Range, True Range Double, Close-to-Close, etc.
2. Baseline - a moving average to identify price trend
3. Confirmation 1 - a technical indicator used to identify trends
4. Confirmation 2 - a technical indicator used to identify trends
5. Continuation - a technical indicator used to identify trends
6. Volatility/Volume - a technical indicator used to identify volatility/volume breakouts/breakdown
7. Exit - a technical indicator used to determine when a trend is exhausted
8. Metamorphosis - a technical indicator that produces a compound signal from the combination of other GKD indicators*
*(not part of the NNFX algorithm)
What is Volatility in the NNFX trading system?
In the NNFX (No Nonsense Forex) trading system, ATR (Average True Range) is typically used to measure the volatility of an asset. It is used as a part of the system to help determine the appropriate stop loss and take profit levels for a trade. ATR is calculated by taking the average of the true range values over a specified period.
True range is calculated as the maximum of the following values:
-Current high minus the current low
-Absolute value of the current high minus the previous close
-Absolute value of the current low minus the previous close
ATR is a dynamic indicator that changes with changes in volatility. As volatility increases, the value of ATR increases, and as volatility decreases, the value of ATR decreases. By using ATR in NNFX system, traders can adjust their stop loss and take profit levels according to the volatility of the asset being traded. This helps to ensure that the trade is given enough room to move, while also minimizing potential losses.
Other types of volatility include True Range Double (TRD), Close-to-Close, and Garman-Klass
What is a Baseline indicator?
The baseline is essentially a moving average, and is used to determine the overall direction of the market.
The baseline in the NNFX system is used to filter out trades that are not in line with the long-term trend of the market. The baseline is plotted on the chart along with other indicators, such as the Moving Average (MA), the Relative Strength Index (RSI), and the Average True Range (ATR).
Trades are only taken when the price is in the same direction as the baseline. For example, if the baseline is sloping upwards, only long trades are taken, and if the baseline is sloping downwards, only short trades are taken. This approach helps to ensure that trades are in line with the overall trend of the market, and reduces the risk of entering trades that are likely to fail.
By using a baseline in the NNFX system, traders can have a clear reference point for determining the overall trend of the market, and can make more informed trading decisions. The baseline helps to filter out noise and false signals, and ensures that trades are taken in the direction of the long-term trend.
What is a Confirmation indicator?
Confirmation indicators are technical indicators that are used to confirm the signals generated by primary indicators. Primary indicators are the core indicators used in the NNFX system, such as the Average True Range (ATR), the Moving Average (MA), and the Relative Strength Index (RSI).
The purpose of the confirmation indicators is to reduce false signals and improve the accuracy of the trading system. They are designed to confirm the signals generated by the primary indicators by providing additional information about the strength and direction of the trend.
Some examples of confirmation indicators that may be used in the NNFX system include the Bollinger Bands, the MACD (Moving Average Convergence Divergence), and the MACD Oscillator. These indicators can provide information about the volatility, momentum, and trend strength of the market, and can be used to confirm the signals generated by the primary indicators.
In the NNFX system, confirmation indicators are used in combination with primary indicators and other filters to create a trading system that is robust and reliable. By using multiple indicators to confirm trading signals, the system aims to reduce the risk of false signals and improve the overall profitability of the trades.
What is a Continuation indicator?
In the NNFX (No Nonsense Forex) trading system, a continuation indicator is a technical indicator that is used to confirm a current trend and predict that the trend is likely to continue in the same direction. A continuation indicator is typically used in conjunction with other indicators in the system, such as a baseline indicator, to provide a comprehensive trading strategy.
What is a Volatility/Volume indicator?
Volume indicators, such as the On Balance Volume (OBV), the Chaikin Money Flow (CMF), or the Volume Price Trend (VPT), are used to measure the amount of buying and selling activity in a market. They are based on the trading volume of the market, and can provide information about the strength of the trend. In the NNFX system, volume indicators are used to confirm trading signals generated by the Moving Average and the Relative Strength Index. Volatility indicators include Average Direction Index, Waddah Attar, and Volatility Ratio. In the NNFX trading system, volatility is a proxy for volume and vice versa.
By using volume indicators as confirmation tools, the NNFX trading system aims to reduce the risk of false signals and improve the overall profitability of trades. These indicators can provide additional information about the market that is not captured by the primary indicators, and can help traders to make more informed trading decisions. In addition, volume indicators can be used to identify potential changes in market trends and to confirm the strength of price movements.
What is an Exit indicator?
The exit indicator is used in conjunction with other indicators in the system, such as the Moving Average (MA), the Relative Strength Index (RSI), and the Average True Range (ATR), to provide a comprehensive trading strategy.
The exit indicator in the NNFX system can be any technical indicator that is deemed effective at identifying optimal exit points. Examples of exit indicators that are commonly used include the Parabolic SAR, the Average Directional Index (ADX), and the Chandelier Exit.
The purpose of the exit indicator is to identify when a trend is likely to reverse or when the market conditions have changed, signaling the need to exit a trade. By using an exit indicator, traders can manage their risk and prevent significant losses.
In the NNFX system, the exit indicator is used in conjunction with a stop loss and a take profit order to maximize profits and minimize losses. The stop loss order is used to limit the amount of loss that can be incurred if the trade goes against the trader, while the take profit order is used to lock in profits when the trade is moving in the trader's favor.
Overall, the use of an exit indicator in the NNFX trading system is an important component of a comprehensive trading strategy. It allows traders to manage their risk effectively and improve the profitability of their trades by exiting at the right time.
What is an Metamorphosis indicator?
The concept of a metamorphosis indicator involves the integration of two or more GKD indicators to generate a compound signal. This is achieved by evaluating the accuracy of each indicator and selecting the signal from the indicator with the highest accuracy. As an illustration, let's consider a scenario where we calculate the accuracy of 10 indicators and choose the signal from the indicator that demonstrates the highest accuracy.
The resulting output from the metamorphosis indicator can then be utilized in a GKD-BT backtest by occupying a slot that aligns with the purpose of the metamorphosis indicator. The slot can be a GKD-B, GKD-C, or GKD-E slot, depending on the specific requirements and objectives of the indicator. This allows for seamless integration and utilization of the compound signal within the GKD-BT framework.
How does Loxx's GKD (Giga Kaleidoscope Modularized Trading System) implement the NNFX algorithm outlined above?
Loxx's GKD v2.0 system has five types of modules (indicators/strategies). These modules are:
1. GKD-BT - Backtesting module (Volatility, Number 1 in the NNFX algorithm)
2. GKD-B - Baseline module (Baseline and Volatility/Volume, Numbers 1 and 2 in the NNFX algorithm)
3. GKD-C - Confirmation 1/2 and Continuation module (Confirmation 1/2 and Continuation, Numbers 3, 4, and 5 in the NNFX algorithm)
4. GKD-V - Volatility/Volume module (Confirmation 1/2, Number 6 in the NNFX algorithm)
5. GKD-E - Exit module (Exit, Number 7 in the NNFX algorithm)
6. GKD-M - Metamorphosis module (Metamorphosis, Number 8 in the NNFX algorithm, but not part of the NNFX algorithm)
(additional module types will added in future releases)
Each module interacts with every module by passing data to A backtest module wherein the various components of the GKD system are combined to create a trading signal.
That is, the Baseline indicator passes its data to Volatility/Volume. The Volatility/Volume indicator passes its values to the Confirmation 1 indicator. The Confirmation 1 indicator passes its values to the Confirmation 2 indicator. The Confirmation 2 indicator passes its values to the Continuation indicator. The Continuation indicator passes its values to the Exit indicator, and finally, the Exit indicator passes its values to the Backtest strategy.
This chaining of indicators requires that each module conform to Loxx's GKD protocol, therefore allowing for the testing of every possible combination of technical indicators that make up the six components of the NNFX algorithm.
What does the application of the GKD trading system look like?
Example trading system:
Backtest: Multi-Ticker CC Backtest
Baseline: Hull Moving Average
Volatility/Volume: Hurst Exponent
Confirmation 1: Advance Trend Pressure as shown on the chart above
Confirmation 2: uf2018
Continuation: Coppock Curve
Exit: Rex Oscillator
Metamorphosis: Baseline Optimizer
Each GKD indicator is denoted with a module identifier of either: GKD-BT, GKD-B, GKD-C, GKD-V, GKD-M, or GKD-E. This allows traders to understand to which module each indicator belongs and where each indicator fits into the GKD system.
█ Giga Kaleidoscope Modularized Trading System Signals
Standard Entry
1. GKD-C Confirmation gives signal
2. Baseline agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Volatility/Volume agrees
1-Candle Standard Entry
1a. GKD-C Confirmation gives signal
2a. Baseline agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
Next Candle
1b. Price retraced
2b. Baseline agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Baseline Entry
1. GKD-B Baseline gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Volatility/Volume agrees
7. Confirmation 1 signal was less than 'Maximum Allowable PSBC Bars Back' prior
1-Candle Baseline Entry
1a. GKD-B Baseline gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSBC Bars Back' prior
Next Candle
1b. Price retraced
2b. Baseline agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Volatility/Volume Entry
1. GKD-V Volatility/Volume gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Baseline agrees
7. Confirmation 1 signal was less than 7 candles prior
1-Candle Volatility/Volume Entry
1a. GKD-V Volatility/Volume gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSVVC Bars Back' prior
Next Candle
1b. Price retraced
2b. Volatility/Volume agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Baseline agrees
Confirmation 2 Entry
1. GKD-C Confirmation 2 gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Volatility/Volume agrees
6. Baseline agrees
7. Confirmation 1 signal was less than 7 candles prior
1-Candle Confirmation 2 Entry
1a. GKD-C Confirmation 2 gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSC2C Bars Back' prior
Next Candle
1b. Price retraced
2b. Confirmation 2 agrees
3b. Confirmation 1 agrees
4b. Volatility/Volume agrees
5b. Baseline agrees
PullBack Entry
1a. GKD-B Baseline gives signal
2a. Confirmation 1 agrees
3a. Price is beyond 1.0x Volatility of Baseline
Next Candle
1b. Price inside Goldie Locks Zone Minimum
2b. Price inside Goldie Locks Zone Maximum
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Continuation Entry
1. Standard Entry, 1-Candle Standard Entry, Baseline Entry, 1-Candle Baseline Entry, Volatility/Volume Entry, 1-Candle Volatility/Volume Entry, Confirmation 2 Entry, 1-Candle Confirmation 2 Entry, or Pullback entry triggered previously
2. Baseline hasn't crossed since entry signal trigger
4. Confirmation 1 agrees
5. Baseline agrees
6. Confirmation 2 agrees
STD-Filtered, Regularized EMA/RMA [Loxx]STD-Filtered, Regularized EMA/RMA calculates and visualizes a standard deviation (STD) filtered, regularized version of the Exponential Moving Average (EMA) or Regular Moving Average (RMA) on a trading chart.
█ Understanding the Regularized Moving Average
The Regularized Moving Average, as conceptualized by Chris Satchwell, offers a more responsive interpretation compared to traditional moving averages. By incorporating a smoothing mechanism using "Lambda", this approach reduces lag without compromising the data's integrity.
In the realm of technical analysis, many regard it as a preferred alternative to the standard Moving Average and Exponential Moving Average.
█ How Does It Stand Out from Other Moving Averages?
While analysts traditionally shorten an indicator's length or period to minimize lag, the Regularized Moving Average uses a unique approach. By embedding "Regularization" within its computation, this method introduces Lambda (often symbolized as λ-calculus). This mathematical factor tames the moving average's undue fluctuations, offering more stability through its Lambda adjustments.
Pro Tip: For those analyzing smaller intraday timeframes, consider ramping up the Lambda setting to 6.0 or even higher. When tweaking these settings, always remember to backtest and observe how it impacts signal accuracy and noise filtering.
█ Standard Deviation Filtering:
This filtering mechanism is designed to smoothen price data by eliminating minor fluctuations that might be considered "noise". Here's how the process works:
For every data point, the standard deviation of prices over a specified period is calculated.
This standard deviation is then multiplied by a user-defined value to determine a threshold. This threshold defines the magnitude of change required in the price for it to be considered significant.
For each price, if the absolute difference between its current and previous value is less than this threshold, the price is kept unchanged (considered insignificant and thus filtered). If the difference exceeds the threshold, the price is considered significant and remains as is.
By applying this filter, minor price variations within the threshold are disregarded, resulting in a smoother representation of the price data.
█ Moving Average Calculation:
The script provides an option to calculate either a regularized Exponential Moving Average (EMA) or a Regular Moving Average (RMA). Here's how these are approached:
If the EMA option is selected: A weighted formula is used where more recent prices have a higher influence on the average than older prices. This is achieved by applying a fraction that's inversely related to the chosen period. The outcome is an average that reacts more quickly to recent price changes.
If the RMA option is selected: The average is computed by giving equal weight to all prices within the chosen period.
Both these averages then undergo a regularization process. Regularization, in this context, refers to adjusting the moving average using a factor to make it potentially more sensitive or responsive to price changes.
This regularized moving average can offer a refined perspective on price trends by being more adaptive to recent changes, potentially highlighting turning points or trend continuations more effectively.
█ Extras
Signals
Alerts
Bar coloring
Weighted Oscillator Convergence DivergenceThe Weighted Oscillator Convergence Divergence (WOCD) aims to help traders identify potential trend reversals or momentum shifts in financial markets by calculating and visualizing the difference between a smoothed oscillator (WMA) value and its exponential moving average (EMA) and simple moving average (SMA) counterparts. This indicator is particularly useful for traders who want an alternative perspective on price momentum and divergence.
Key Features:
Inputs:
Length: The user can specify the number of bars to consider for calculations (default is 9).
Smoothing 1: Defines the smoothing factor for the first smoothed value (default is 5).
Smoothing 2: Specifies the smoothing factor for the second smoothed value (default is 7).
Ma Type: There are three types of moving averages you can choose (Wilder, non-lag, Weighted is by default).
Color Settings: Users can customize the indicator's colors for various elements, such as length, smoothing values, and different sections of the histogram.
Calculation:
WOCD calculates the raw oscillator value by subtracting the close price from a 3-period High, Low, Close (HLC3) moving average.
It then applies smoothing to this raw oscillator value using two different methods: exponential moving average (EMA) and simple moving average (SMA) with user-defined smoothing periods.
Histogram Plot:
The indicator plots a histogram based on the difference between the smoothed oscillator and the first smoothed value.
When the histogram is above zero and rising, it is colored according to the "Above Grow" color setting. When it's above zero and falling, it uses the "Fall" color for visualization.
Similarly, when the histogram is below zero and rising, it is colored according to the "Below Grow" color setting, and when it's below zero and falling, it uses the "Fall" color.
Oscillator and Smoothed Values:
The indicator also plots the smoothed oscillator, smoothed value 1 (EMA-based), and smoothed value 2 (SMA-based) on the chart.
Zero Line:
A horizontal line at zero is drawn on the chart for reference.
How to Use the WOCD Indicator:
Trend Identification: Observe the histogram's direction and color. A rising histogram above zero may indicate bullish momentum, while a falling histogram below zero could signal bearish momentum.
Divergence: Look for divergences between price action and the histogram. When the histogram and price move in opposite directions, it can be a potential reversal signal.
Crossovers: Pay attention to crossovers between the smoothed oscillator and its smoothed counterparts (EMA and SMA). These crossovers can indicate changes in trend strength or direction.
Zero Line: The zero line can act as a reference point. Positive histogram values suggest bullish sentiment, while negative values indicate bearish sentiment.
Comparison to MACD Indicator:
The WOCD indicator shares some similarities with the Moving Average Convergence Divergence (MACD) indicator but also has distinct differences:
Similarities:
Both WOCD and MACD are momentum oscillators designed to identify potential trend reversals and divergences.
They use moving averages (EMA in the case of MACD) to smooth the raw oscillator values.
Both indicators provide histogram representations of the difference between the oscillator and its smoothed counterpart.
Differences:
WOCD uses a 3-period High, Low, Close (HLC3) moving average to calculate the raw oscillator value, whereas MACD uses the difference between two exponential moving averages (usually 12-period and 26-period EMAs).
The smoothing in WOCD employs both EMA and SMA, while MACD exclusively uses EMA.
WOCD allows users to customize colors for various elements, enhancing visual clarity.
OKX: MA CrossoverEXAMPLE Scripte from my stream , how to use OKX webhooks for create strategy on Pine with real\demo trading on your OKX account. This strategy only for test the functional forward orders to OKX. The backtest not included commisions and other.
OKX MA Crossover. This strategy generate JSONs for place orders on the exchange by alerts and webhooks.
In the script 2 function to generate entry and exit orders, and input parameters that needed for setup exchange.
Use it for test this stack and to write you own strategy for trade on the OKX Exchange.
Daily TrendDescription:
The "Daily Trend" script is a powerful technical analysis tool designed for TradingView. This indicator helps traders identify key support and resistance levels based on daily price data. It offers a visual representation of these levels, along with other technical indicators like Exponential Moving Averages (EMA), Supertrend, and Parabolic SAR.
Features:
Past Candle Price Levels: This script calculates and displays past daily candle price levels, including R1, R2, R3, R4, S1, S2, S3, and S4. These levels are vital for identifying potential reversals and breakout points.
Exponential Moving Average (EMA): The script includes an EMA indicator with a customizable period to help traders spot the trend direction and potential crossovers.
Supertrend Indicator: The Supertrend indicator is used to identify trend changes. It plots the Supertrend line and highlights the trend direction with color-coded regions.
Parabolic SAR: The Parabolic SAR indicator is integrated into the script to assist traders in identifying potential entry and exit points in the market.
Customizable Alerts: Traders can customize the indicator by choosing which past candle price levels and other features to display on the chart.
How to Use:
Apply the "Daily Trend" script to your TradingView chart.
Customize the indicator by enabling or disabling specific features, such as past candle price levels and EMA.
Pay attention to the color-coded regions for Supertrend and Parabolic SAR to determine the current trend direction.
Look for potential reversal or bounce signals based on the indicator's signals and the price action.
Consider using this script in conjunction with your trading strategy for enhanced technical analysis.
Risk Warning: Trading involves significant risk, and past performance is not indicative of future results. Always practice proper risk management and consider the broader context of the market before making trading decisions.
YinYang Fear and Greed Index (FGI)Overview:
YinYang Fear and Greed Index is used for seeing how people are feeling towards the current price. It works similar to an RSI, but fluctuates differently. Essentially you want to be Greedy when the Index displays Fear and Fearful when it displays Greed. Our Indicator displays a Green Circle (Greed Signal) on the YinYang Fear and Greed Index when there is a large amount of Greed at this price point. It displays a Red Circle (Fear Signal) when there is a large amount of Fear. The Fear and Greed Signals can happen at any Fear and Greed Index but generally they correlate with the Index level. The Fear and Greed Signals are much more important at dictating a swing in momentum than the actual Index itself. The Index is more of a guide and is useful for seeing when the Index level crosses the Ma (the yellow line) as you can see a shift in momentum. However for large swings in momentum, the Fear and Greed Signals should be used. Do NOT Ignore these signals, they are quite powerful at predicting momentum swings.
Tutorial:
As you can see, the Fear and Greed Index looks somewhat similar to an RSI, but it has the ability to gain drastic momentum when there are strong changes in Fear and Greed.
When it comes to identifying buy/sell locations you generally want to ensure 2 things:
For a buy, the Fear and Greed Index (FGI) is less than 30.
For a sell, the FGI is greater than 70.
A signal has occurred. For buy that is the red circle and for sell that is the green circle.
The reason we generally want to ensure these 2 rules is to ensure you have the highest chance of being right with the lowest risk of being wrong. The way you want to use this indicator is; Be Fearful when others are Greedy and Greedy when others are Fearful.
There will be times when a fear or greed signal appears when the index is between 30-70. When these occur, they are still generally strong signal locations that represent a high chance of momentum in the direction they signal, however they face a higher risk of being wrong and therefore shouldn’t be used on its own to make a trade.
In the photo above we can see that the FGI’s color changed from Red to Orange in the candle after the Fear Signal. This happened because there was high price movement right after it (which is normal) and caused the Fear level to drop.
The color the FGI displays is based not off the FGI but by the STATE it is currently in. When the color is Green it is in a state of HIGH GREED, when the color is Red it is in a state of HIGH FEAR. When the color is Teal it is in a state of SLIGHT GREED, when the color is Orange it is in a state of SLIGHT FEAR. These colors hold true for the Information Tables as well.
As we can also see from the example above, it is 100% possible to have a state of HIGH GREED when the FGI is low. For instance look at the Fear (BUY) signals circled. Right before the Fear Signals happened, it was in a state of HIGH GREED (Green). The opposite is also true with Fear. We can have a high state of Fear when the FGI is high. However, please do remember, the lowest risk and best time to make trades is still:
FGI is higher than 70 and there is a Greed Signal = SELL
FGI is lower than 30 and there is a Fear Signal = BUY
You may notice there are sometimes occurrences that we call ‘Oddballs’. These oddballs are quite rare but they do happen and when they do they’re generally in clusters (close together). These Oddballs are when a Greed Signal occurs when the FGI is very low or when a Fear Signal occurs when the FGI is very high. Basically, they are occurring in the opposite location that they are supposed to. These may not seem like they matter but they matter a lot. As you can see based on where the blue vertical lines are, the price moved in the direction the signal identified shortly after the signal.
You may be wondering, are Oddball’s stronger price influencers than the regular signal? The issue with Oddballs is they sometimes CAN BE. But generally they aren’t. They generally do signal price movement will occur in the direction they are influencing, but generally not as much movement as if it occurred properly (Fear signal under 30 or Greed signal above 70).
The takeaway from Oddballs is to acknowledge their existence and potentially use them as markers for smaller purchases or DCA locations. We don’t recommend treating them as a legitimate purchase signal as they generally are weaker and less predictable, but nevertheless don’t dismiss them.
Our Information Tables are there to show you the FGI on 6 different Time Frames at the same time. This can be very useful for knowing how the other Time Frames are fairing while you are trading without needing to constantly change the Time Frame you are on.
For example, you see a Fear Signal on the 1 Day Time Frame, you then swap to the 15 minute Time Frame to find your entry location. Well, once you’re locked into that trade, you’ll likely be fixated on the 15 minute Time Frame. There’s a chance while you’re still waiting for your exit that levels and states of the FGI could change on higher Time Frames. This could drastically influence when and where your exit on the lower Time Frame should be.
This concludes our Tutorial on how to use YinYang Fear and Greed Index (FGI). However, continue reading for a description and better understanding of the Settings available to you for customization within this Indicator.
Settings:
1. Information Tables:
1.1. Show Information Tables:
Our Information Tables display 6 different Time Frames (resolutions) so that you can see the current level of Fear and Greed (FGI) that is prevalent on each Time Frame. There are 4 different states the FGI can be in:
Fear (Red)
Minor Fear (Orange)
Greed (Green)
Minor Greed (Teal)
The color of each Time Frame Cell (on Oscillator and in the table) is based on the following:
Red: Red represents that it is currently in a state of Fear. When it is in a state of fear it means traders are being overly bearish and selling when they likely shouldn’t. While it is in a state of Fear, there is a high chance of BULLISH price movement occurring. Remember, Be Fearful when others are Greedy and Greedy when others are Fearful.
Orange: Orange represents that it is currently in a state of Minor Fear. Minor Fear means that the FGI is less than 50, but it’s not currently in a state of Fear or Greed. While it is in this state, there is a better chance for BULLISH price action than there is bearish but it's nowhere near as likely as when in a state of Fear.
Green: Green represents that it is currently in a state of Greed. When it is in a state of Greed, it means traders are being overly bullish and buying when they shouldn’t. While it is in a state of Greed, there is a high chance of BEARISH price movement occurring.
Teal: Teal represents that it is currently in a state of Minor Greed. Minor Greed means that the FGI is greater than 50, but it’s not currently in a state of Fear or Greed. While it is in this state, there is a better chance for BEARISH price actions than there is bullish; but it’s nowhere near as likely as when its in a state of Greed.
2. Res1 / Res2/ Res3 / Res4 / Res5 / Res6:
These represent the different resolutions (Time Frames) being used in your information tables and can be modified to display whatever resolution works best for your trading style. By default they are:
Res1: Current Timeframe
Res2: 15 Minute
Res3: 1 Hour
Res4: 4 Hour
Res5: 1 Day
Res6: 1 Week
Backup Res (not changeable): 5 Minute (this is only used if your Current Timeframe in Res1 is a duplicate of one of the other resolutions)
Our Fear and Greed Index can be very useful for understanding how people are feeling in the market and when large price swings will occur. Remember, Be Greedy when others are Fearful and Fearful when others are Greedy!
If you have any Questions or Concerns, don’t hesitate to contact us.
HAPPY TRADING!
Tribute to David PaulI made this indicator as a tribute to the late David Paul .
He mentioned quite a lot about 89 periods moving average (especially on 4h), also the 21 and 55.
I put up some entries when three ma are crossed by price in the same direction, bull/bear backgrounds and a color code for candles because who doesn't love the feeling of a lasting trend.
To be more specific :
The indicator plots sma21, sma55, sma89 and AMA = (sma21+sma55+sma89)/3
When the closing price crosses the highest of the 3 sma, it is considered a bullish confirmation.
At this moment two lines appear, one on the bottom of the candle that crossed, one on the crossing point.
The lowest line can be used as the stop loss value of a long.
The highest line can be used as an entry point for a long.
When the closing price crosses the lowest of the 3 sma, it is considered a bearish confirmation.
At this moment two lines appear, one on the top of the candle that crossed, one on the crossing point.
The highest line can be used as the stop loss value of a short.
The lowest line can be used as an entry point for shorts.
When the closing price is above AMA, it is considered a bullish confirmation.
At this time a blue background appears at the crossing point.
The highest line can be used as the stop loss value for a long.
The starting point of the background can be used as the entry point for a long.
When the closing price is below AMA, it is considered a bearish confirmation.
At this time a red background appears at the crossing point.
The highest line can be used as the stop loss value for a short.
The starting point of the background can be used as the entry point for a short.
When the price is above 3 sma the candles turn blue. Signifying an upward trend.
When the price is below 3 sma the candles turn red. Signifying a bearish trend.
When the price is neither simultaneously above nor below the 3 sma, the candles are gray and the background linked to AMA becomes less vivid. Meaning a loss of vitality of the current trend or an absence of a clear trend.
Ideally, you should take a position towards "Real Long/Short Entry", set your stop loss towards "Ideal Long/Short Entry", and close the trade either when the background ends (riskier but more potential), or when the candles become gray (more conservative but noisier).
In the inputs, you can modify the display rules (explained in the tooltips), by default everything is displayed.
SOFEX Strong Volatility Trend Follower + BacktestingWhat is the SOFEX Strong Volatility Trend Follower + Backtesting script?
🔬 Trading Philosophy
This script is trend-following, attempting to avoid choppy markets.
It has been developed for Bitcoin and Ethereum trading, on 1H timeframe.
The strategy does not aim to make a lot of trades, or to always remain in a position and switch from long to short. Many times there is no direction and the market is in "random walk mode", and chasing trades is futile.
Expectations of performance should be realistic.
The script focuses on a balanced take-profit to stop-loss ratio. In the default set-up of the script, that is a 2% : 2% (1:1) ratio. A relatively low stop loss and take profit build onto the idea that positions should be exited promptly. There are many options to edit these values, including enabling trailing take profit and stop loss. Traders can also completely turn off TP and SL levels, and rely on opposing signals to exit and enter new trades.
Extreme scenarios can happen on the cryptocurrency markets, and disabling stop-loss levels completely is not recommended. The position size should be monitored since all of it is at risk with no stop-loss.
⚙️ Logic of the indicator
The Strong Volatility Trend Follower indicator aims at evading ranging market conditions. It does not seek to chase volatile, yet choppy markets. It aims at aggressively following confirmed trends. The indicator works best during strong, volatile trends, however, it has the downside of entering trades at trend tops or bottoms.
This indicator also leverages proprietary adaptive moving averages to identify and follow strong trend volatility effectively. Furthermore, it uses the Average Directional Index, Awesome Oscillator, ATR and a modified version of VWAP, to categorize trends into weak or strong ones. The VWAP indicator is used to identify the monetary (volume) inflow into a given trend, further helping to avoid short-term manipulations. It also helps to distinguish choppy-market volatility with a trending market one.
📟 Parameters Menu
The script has a comprehensive parameter menu:
Preset Selection : Choose between Bitcoin or Ethereum presets to tailor the indicator to your preferred cryptocurrency market.
Indicator Sensitivity Parameter : Adjust the sensitivity to adapt the indicator, particularly to make it seek higher-strength trends.
Indicator Signal Direction : Set the signal direction as Long, Short, or Both, depending on your preference.
Exit of Signals : You have options regarding Take-Profit (TP) and Stop-Loss (SL) levels. Enable TP/SL levels to exit trades at predetermined levels, or disable them to rely on direction changes for exits. Be aware that removing stop losses can introduce additional risk, and position sizing should be carefully monitored.
By enabling Trailing TP/SL, the system switches to a trailing approach, allowing you to:
- Place an initial customizable SL.
- Specify a level (%) for the Trailing SL to become active.
- When the activation level is reached, the system moves the trailing stop by a given Offset (%).
Additionally, you can enable exit at break-even, where the system places an exit order when the trail activation level is reached, accounting for fees and slippage.
Alert Messages : Define the fields for alert messages based on specific conditions. You can set up alerts to receive email, SMS, and in-app notifications. If you use webhooks for alerts, exercise caution, as these alerts can potentially execute trades without human supervision.
Backtesting : Default backtesting parameters are set to provide realistic backtesting performance:
- 0.04% Commission per trade (for both entries and exits)
- 3 ticks Slippage (highly dependent on exchange)
- Initial capital of $1000
- Order size of $1000
While the order size is equal to the initial capital, the script employs a 2% stop-loss order to limit losses and attempts to prevent risky trades from creating big losses. The order size is a set dollar value, so that the backtesting performance is linear, instead of using % of capital which may result in unrealistic backtesting performance.
Risk Disclaimer
Please be aware that backtesting results, while valuable for statistical overview, do not guarantee future performance in any way. Cryptocurrency markets are inherently volatile and risky. Always trade responsibly and do not risk more than you can afford to lose.
AI SuperTrend - Strategy [presentTrading]
█ Introduction and How it is Different
The AI Supertrend Strategy is a unique hybrid approach that employs both traditional technical indicators and machine learning techniques. Unlike standard strategies that rely solely on traditional indicators or mathematical models, this strategy integrates the power of k-Nearest Neighbors (KNN), a machine learning algorithm, with the tried-and-true SuperTrend indicator. This blend aims to provide traders with more accurate, responsive, and context-aware trading signals.
*The KNN part is mainly referred from @Zeiierman.
BTCUSD 8hr performance
ETHUSD 8hr performance
█ Strategy, How it Works: Detailed Explanation
SuperTrend Calculation
Volume-Weighted Moving Average (VWMA): A VWMA of the close price is calculated based on the user-defined length (len). This serves as the central line around which the upper and lower bands are calculated.
Average True Range (ATR): ATR is calculated over a period defined by len. It measures the market's volatility.
Upper and Lower Bands: The upper band is calculated as VWMA + (factor * ATR) and the lower band as VWMA - (factor * ATR). The factor is a user-defined multiplier that decides how wide the bands should be.
KNN Algorithm
Data Collection: An array (data) is populated with recent n SuperTrend values. Corresponding labels (labels) are determined by whether the weighted moving average price (price) is greater than the weighted moving average of the SuperTrend (sT).
Distance Calculation: The absolute distance between each data point and the current SuperTrend value is calculated.
Sorting & Weighting: The distances are sorted in ascending order, and the closest k points are selected. Each point is weighted by the inverse of its distance to the current point.
Classification: A weighted sum of the labels of the k closest points is calculated. If the sum is closer to 1, the trend is predicted as bullish; if closer to 0, bearish.
Signal Generation
Start of Trend: A new bullish trend (Start_TrendUp) is considered to have started if the current trend color is bullish and the previous was not bullish. Similarly for bearish trends (Start_TrendDn).
Trend Continuation: A bullish trend (TrendUp) is considered to be continuing if the direction is negative and the KNN prediction is 1. Similarly for bearish trends (TrendDn).
Trading Logic
Long Condition: If Start_TrendUp or TrendUp is true, a long position is entered.
Short Condition: If Start_TrendDn or TrendDn is true, a short position is entered.
Exit Condition: Dynamic trailing stops are used for exits. If the trend does not continue as indicated by the KNN prediction and SuperTrend direction, an exit signal is generated.
The synergy between SuperTrend and KNN aims to filter out noise and produce more reliable trading signals. While SuperTrend provides a broad sense of the market direction, KNN refines this by predicting short-term price movements, leading to a more nuanced trading strategy.
Local picture
█ Trade Direction
The strategy allows traders to choose between taking only long positions, only short positions, or both. This is particularly useful for adapting to different market conditions.
█ Usage
ToolTips: Explains what each parameter does and how to adjust them.
Inputs: Customize values like the number of neighbors in KNN, ATR multiplier, and moving average type.
Plotting: Visual cues on the chart to indicate bullish or bearish trends.
Order Execution: Based on the generated signals, the strategy will execute buy/sell orders.
█ Default Settings
The default settings are selected to provide a balanced approach, but they can be modified for different trading styles and asset classes.
Initial Capital: $10,000
Default Quantity Type: 10% of equity
Commission: 0.1%
Slippage: 1
Currency: USD
By combining both machine learning and traditional technical analysis, this strategy offers a sophisticated and adaptive trading solution.
MA Support & Resistance SignalThis indicator is to show MA Support/Resistance and trend of a stock.
It contains three (3) Moving Averages that can be set to SMA or EMA:
1. Upper Line : SMA 5 (default)
2. Lower Line : SMA 20 (default)
3. Support/Resistance Line : SMA 10 (default)
Other signals:
1. Bull and Blue Dotted Line signal: Upper Line (SMA 5) crossover with Lower Line (SMA 20).
2. Bear and Red Dotted Line signal: Lower Line (SMA 20) crossover with Upper Line (SMA 5).
3. Red Triangle signal: Price closes below Support/Resistance Line (SMA 10).
4. Green Bar signal: Price breaks Support/Resistance Line (SMA 10).
The way how I use it:
- Since I don't like my chart to be crowded with a lot of moving averages, I will disable SMA 5 and SMA 10 and will only leave SMA 20 as my final support line.
- Entry when only:
1. Bull signal appeared.
2. Green bar appeared, or;
3. Price rebound on SMA 20.
I let the script open so that you guys can custom it based on your own preferences. Hope you guys enjoy it.
Moving Average Cross trade PLAbstract
This script evaluates the potential trading proceeding and loss of the moving average cross strategy and plot it as a chart.
We can use it as a reference to whether we follow the original trading signals or not.
Introduction
Moving average cross is a popular trading strategy.
The strategy suggests traders buy when the short term moving average is above the long term moving average and sell when the short term moving average is below the long term moving average.
However, just like the most technical indicators, the signals are not always accurate.
This problem causes traders don't have sufficient confidence to trade with these signals.
On the other hand, the natural risk management suggests us only invest after major risks are past.
Therefore, we wait until many counterexamples of trading signals are past.
What will happen if we imagine that following a specific trading signal is a fund?
We can evaluate the potential trading proceeding and loss and plot it as a chart.
And then, we can measure how much loss may encounter in many worst cases and regard it as a reference to whether we follow the original trading signals or not.
How it works
1. Determine the instruments and time frames we are interested in.
2. Determine the long term moving average and the short term moving average.
3. The strategy suggests traders buy when the short term moving average is above the long term moving average and sell when the short term moving average is below the long term moving average.
4. The potential trading proceeding and loss is plotted as a chart.
5. There are two colors in the chart. One is when the short term moving average is above the long term moving average and the other is when the short term moving average is below the long term moving average.
6. We can observe the local maximum and the local minimum or apply other indicators we are interested in on the numbers it provides.
Parameters
x_type1 = How to compute the short term moving average. The option diff means the price several days ago.
x_src1 = How to summarize the price of a trading day. It depends on the open, high, low or close prices.
x_ma1 = How many days included in the short term moving average. When it is 1, the signal becomes when the price is above or below a single moving average.
x_type2 = How to compute the long term moving average
x_src2 = How to summarize the price of a trading day. It depends on the open, high, low or close prices.
x_ma2 = How many days included in the long term moving average
Conclusion
This indicator can quantize the potential trading proceeding and loss and can imply when following the original trading signals is good or not.
Combining the instruments which are long term investible and use this indicator to avoid potential risks, we can make proceeding better than holding the major stock markets.
Median of Means Estimator Median of Means (MoM) is a measure of central tendency like mean (average) and median. However, it could be a better and robust estimator of central tendency when the data is not normal, asymmetric, have fat tails (like stock price data) and have outliers. The MoM can be used as a robust trend following tool and in other derived indicators.
Median of means (MoM) is calculated as follows, the MoM estimator shuffles the "n" data points and then splits them into k groups of m data points (n= k*m). It then computes the Arithmetic Mean of each group (k). Finally, it calculate the median over the resulting k Arithmetic Means. This technique diminishes the effect that outliers have on the final estimation by splitting the data and only considering the median of the resulting sub-estimations. This preserves the overall trend despite the data shuffle.
Below is an example to illustrate the advantages of MoM
Set A Set B Set C
3 4 4
3 4 4
3 5 5
3 5 5
4 5 5
4 5 5
5 5 5
5 5 5
6 6 8
6 6 8
7 7 10
7 7 15
8 8 40
9 9 50
10 100 100
Median 5 5 5
Mean 5.5 12.1 17.9
MoM 5.7 6.0 17.3
For all three sets the median is the same, though set A and B are the same except for one outlier in set B (100) it skews the mean but the median is resilient. However, in set C the group has several high values despite that the median is not responsive and still give 5 as the central tendency of the group, but the median of means is a value of 17.3 which is very close to the group mean 17.9. In all three cases (set A, B and C) the MoM provides a better snapshot of the central tendency of the group. Note: The MoM is dependent on the way we split the data initially and the value might slightly vary when the randomization is done sevral time and the resulting value can give the confidence interval of the MoM estimator.
S__Trader's Portfolio ManagementThis custom TradingView script is a powerful tool designed to help investors effectively manage their portfolios. This script allows you to monitor, analyze, and optimize your portfolio performance using moving averages in technical analysis. This script is for the traders who want to manage his portfolio by moving averages which is powered by using 4 of them together.
Timeframe is based on Daily as default but you can prefer to see weekly, monthly or else depends on your trading character
This script uses 4 customizable moving averages to decide cash/stocks ratio. Each moving average has %25 power of decide. If price is above the moving average, each moving average adds %25 to stock total percentage, else below they add %25 to cash. So you can decide your cash stock ratio by that moving averages.
For example if price is above all of that moving averages, script table shows you %100 total for stocks but if price is above for example 2 of that moving averages, script table shows you %50 for stocks and get remaining %50 cash.
For example if price is above only 1 of that moving averages, script table shows %25 for that stocks and that means %75 cash.
If price is below all that moving averages, script table shows %0, means that sell all stocks and stay cash %100
You can choose to plot moving averages or not
Or you can choose just track them by line
You can hide table also and decide table size and place at graph
By using this script, you can monitor your portfolio's performance, manage risk, and optimize your investment strategies. However, please remember that this script is just a tool and should not be used as a sole decision-making tool for investments. Always use it in conjunction with risk management and other analytical methods.
Hopefully, this script will help you enhance your investment process. Best of luck!