Risk Matrix [QuantraSystems]Risk Matrix
The Risk Matrix is a sophisticated tool that aggregates a variety of fundamental inputs, primarily external (non-crypto) market data is used to assess investor risk appetite. By combining external macroeconomic factors and proxies for liquidity data with specific signals from the cryptomarket - the Risk Matrix provides a holistic view of market risk conditions. These insights are designed to help traders and investors make informed decisions on when to adopt a risk-on or risk-off approach.
Core Concept
The Risk Matrix functions as a dynamic risk assessment tool that integrates both fundamental and technical market indicators to generate an aggregated Z-score. This score helps traders to identify where the market is in a risk-off or risk-on state, The system provides both binary risk signals and a more nuanced “risk seasonality” mode for deeper analysis.
Key Features
Global Liquidity Aggregate - The Liquidity score is a custom measure of global liquidity, built by combining a variety of traditional financial metrics. These include data from central bank balance sheets, reverse repo operations and credit availability. This data is sourced from organizations such as the U.S. Federal Reserve, the European Central Bank, and the People’s Bank of China. The purpose of this aggregate is to gauge how much liquidity is available in the global financial system - which often correlates with risk sentiment. Rising liquidity tends to boost risk-on appetite, while liquidity contractions signal increased caution (risk-off) in the markets. The data sources used in this global liquidity aggregate include:
- U.S. Commercial Bank Credit data
- Federal Reserve balance sheet and reverse repo operations
- Liquidity from major central banks including the Fed, Bank of Japan, ECB, and PBoC
- Asset performance from major global financial indices such as the S&P 500, TLT, DXY (U.S. Dollar Index), MOVE (bond market volatility), and commodities like gold and oil.
Other key Z-scores (measured individually) - The Risk Matrix also incorporates other major Z-scores that represent different facets of the financial markets:
- Collateral Risk - A measure of US bond volatility, where higher values indicate higher interest rate risk - leading to potential market instability and cautious market behaviors.
- Stablecoin Dominance - The dominance of stablecoins in the crypto markets - which can signal risk aversion the total capital allocated to stables increases relative to other cryptocurrencies.
- US Currency Strength - The U.S. Dollar Index Z-score reflects currency market strength, with higher values typically indicating risk aversion as investors sell more volatile assets and flock to the dollar.
- Trans-pacific Monetary Bias - Signals capital flow and monetary trends that link between the East and West, heavily influencing global risk sentiment.
- Total - A measure of the total cryptocurrency market cap, signaling broader risk sentiment with the crypto market.
Neural Network Synthesis - The NNSYNTH component adds a machine learning inspired layer to the Risk Matrix. This custom indicator synthesizes inputs from various technical indicators (such as RSI, MACD, Bollinger Bands, and others) to generate a composite signal that reflects the health of the cryptomarket. While highly complex in its design, the NNSYNTH ultimately helps detect market shifts early by synthesizing multiple signals into one cohesive output. This score is particularly useful for gauging momentum and identifying potential turning points in market trends. Because the NNSYNTH is a closed source indicator, and it is included here, the Risk Matrix by extension is a closed source indicator.
How it Works
Z-score Aggregation - The Risk Matrix computes a final risk score by aggregating several Z-scores from different asset classes and data sources, all of which contribute proportionally to the overall market risk assessment. Each input is equally weighted - normalization allows for direct comparisons across global liquidity trends, currency fluctuations, bond market volatility and crypto market conditions. Furthermore, this system employs multi-calibration aggregation - where each individual matrix is itself an aggregate of multiple Z-scores derived from various timeframes. This ensures that each matrix captures a distinct average across different time horizons before being combined into the overall Risk Matrix. This layered, multi timeframe approach enhances the precision and robustness of the final Z-score.
Risk-On / Risk-Off Mode - The system’s binary mode provides a clear Risk On and Off signal. This nature of this signal is determined by the behavior of the Z-score relative to the midline, or Standard Deviation Bands, depending on specific conditions:
Risk-On is signaled when the aggregated final Z-score crosses above 0. However, in extreme oversold conditions, Risk-On can trigger early if the upper standard deviation band falls below the zero line. In such cases, the Risk-On signal is triggered when the z-score crosses the upper standard deviation band - without waiting to cross the midline.
Risk-Off is signaled when the final Z-score moves below 0. Similarly, Risk-Off can also be triggered early if the lower standard deviation band rises above the midline. In this instance, Risk-Off is triggered when the Z-score crosses below the lower band.
Risk Seasonality Mode - This mode offers a more gradual transition between risk states, measuring the change in the Z-score to visualize the shifts in risk appetite over time. It's useful for traders seeking to understand broader market cycles and risk phases. The seasonality view breaks down the market into the following phases:
Risk-On - High risk appetite where risk/cyclical markets are generally bullish.
Weakening - Markets showing signs of cooling off, here the higher beta assets tend to sell off first.
Risk-Off - Investors pull back, and bearish sentiment prevails.
Recovery - Signs of bottoming out, potential for market re-entry.
Component Matrices - Each individual Z-score is visualized as part of the component matrices - scaled to a 3 Sigma range. These component matrices allow traders to view how each data source is contributing to the overall risk assessment in real time - offering transparency and granularity.
Visuals and UI
Main Risk Matrix - The aggregated Z-Score is displayed saliently in the main risk matrix. Traders and investors can quickly see what season the Risk Matrix is signaling and adjust their strategies accordingly.
Overview Table - A detailed overview table shows the current confirmed Z-scores for each component, along with values from 2, and 3 bars back. This helps traders spot trends and the rate of change (RoC) between signals, offering additional insights for shorter-term risk management.
Customizability - Users can customize the visual elements of the matrix, including color palettes, table sizes, and positions. This allows for optimal integration into any trader’s existing workspace.
Usage Summary
The Risk Matrix is an incredibly versatile tool. It is especially valuable as a means of achieving a cross-market view of risk, incorporating both crypto-specific and macroeconomic factors. Some key use cases include:
Adjusting Capital Allocation Based on Risk Seasons - Traders can use the Risk Matrix to adjust their capital allocation dynamically. During Risk-On periods, they might increase exposure to long positions, capitalizing on stronger market conditions. Conversely, during Risk-Off periods, traders could reduce or hedge long positions and potentially scale up short positions or move into safer assets.
Complementing Other Trading Systems - The Risk Matrix can work alongside other technical systems to provide context to market moves. For instance, a trend-following strategy might suggest an entry, but the Risk Matrix could be used to verify whether the broader market conditions support this trade. If the Matrix is in a Risk-Off period, a trader might opt for more conservative trade sizes or avoid the trade entirely.
This flexibility allows traders to adjust their strategies and portfolio risk dynamically, enhancing decision making based on broader market conditions - as indicated by external macroeconomic factors, liquidity, and risk sentiment.
Important Note
The Risk Matrix always uses the most up-to-date data available, ensuring analysis reflects the latest market conditions and macroeconomic inputs. In rare cases, governments or financial institutions revise past data - and the Risk Matrix will adjust accordingly. This behavior can only be seen in the Liquidity Matrix. and can affect the final score. While this is uncommon, it highlights the benefit of using a system that adapts in real-time, incorporating the most accurate and current information to enhance decision making processes.
Neuralnetwork
Matrix Glitch | FractalystThe Matrix Glitch indicator is a visually engaging tool for traders, inspired by the iconic Matrix movie effects. It overlays price charts with dynamic, multi-colored glitches that sync with market data, creating a striking, almost surreal visual experience.
The indicator uses characters from various languages (e.g., Japanese, Chinese, Russian, English) to mimic the digital rain effect from the movies. Users can select a language, which activates a corresponding array of characters. These characters are randomly picked from the chosen array and displayed on the chart.
Underlying Calculations and Logic
Arrays in the Indicator
1- Character Management:
The script uses arrays to store sets of characters representing different symbols or alphabets. These arrays allow the indicator to dynamically select and update characters for display. Each element in these arrays corresponds to a specific character that will be used to populate the grid.
2- Current and Previous States:
Arrays are employed to keep track of the current state of characters that are displayed on the grid. Simultaneously, another set of arrays records the previous state of these characters. This dual-state management allows the script to smoothly transition between updates, handling changes in characters and visual effects like fading.
3- Transparency Control:
Transparency levels for each character in the grid are managed through arrays. These arrays store the opacity values, ensuring that each character has the appropriate level of transparency. By comparing the current and previous transparency states, the script can create effects like gradual fading or intensifying visibility.
4- Rain Effect Simulation:
To create the "rain" effect, the script maintains arrays that simulate the falling text by continuously updating the position and visibility of characters. As new characters enter the top of the grid, older ones are removed from the bottom, with their transparency levels adjusted to simulate movement.
5- Operational Flow:
Initialization : Arrays are initialized to manage both the characters and their transparency. This setup allows the script to handle the dynamic display efficiently.
Updates : During each cycle, new characters are selected and old characters are shifted accordingly. The arrays ensure that both the content and appearance of the grid are updated seamlessly.
Rendering : The arrays dictate how characters and their transparency are rendered on the grid, ensuring a cohesive and visually appealing effect.
Here's how to use the indicator step-by-step:
1- Apply the Indicator to Your Charts:
Begin by adding the indicator to your chart. This will activate the visual effect on your selected trading instrument or time frame.
Select Your Preferred Language of the Matrix Characters:
In the settings, choose the language or symbol set you want the matrix characters to display. This could be anything from traditional matrix-style characters to different alphabets or custom symbols.
2- Choose the Matrix Effect (Rain, Burst):
Decide on the type of visual effect you prefer. You can select from options like the classic "rain" effect, where characters fall from the top of the screen, or a "burst" effect, where characters explode outward or appear in a different dynamic pattern.
3- Adjust the Color According to Your Preference:
Customize the color of the matrix characters to suit your aesthetic or chart theme. You can select from a range of colors or even set up a gradient for more complex visual effects.
4- Adjust the Width and Height of the Matrix According to Your Screen:
Fine-tune the dimensions of the matrix display. Set the width and height so that the matrix fits perfectly on your screen, ensuring that it aligns well with other chart elements and doesn't obstruct your view.
------
What Makes the Matrix Glitch Indicator Unique?
Language Selection:
Customizable Language: Unlike many indicators that might offer static or limited visual elements, the Matrix Glitch Indicator allows users to choose from a variety of languages for the characters displayed. This feature not only personalizes the user experience but also adds a cultural or linguistic element to trading charts. Users can select languages like Japanese, Chinese, Russian, or English, and many more.
This flexibility ensures that traders from different backgrounds can feel a connection with their charts through familiar or exotic scripts.
Dynamic Effects:
Effect Modes: The indicator offers two distinct modes - Rain Mode and Burst Mode. In Rain Mode, characters fall from the top of the chart, mimicking the iconic digital rain from the Matrix films.
In Burst Mode, characters radiate outward from a central point, creating a unique visual effect that can be synchronized with market volatility.
This dual-mode functionality allows traders to choose how they want their data to be visually represented, providing both aesthetic variety and potentially different insights into market behavior.
Color Customization:
Full Color Control: The ability to fully customize the color of the characters is a standout feature. Traders can match the indicator's colors to their trading platform's theme, their mood, or even specific market conditions (e.g., red for downturns, green for upturns). This level of customization not only aids in creating a personalized trading environment but can also serve as a visual cue for different market states.
Universal Display Compatibility:
Adjustability for All Displays: The indicator is designed to be fully adjustable for various screen resolutions and sizes. This ensures that whether you're trading on a high-resolution monitor, a laptop, or even a mobile device, the Matrix Glitch effect remains clear and impactful without compromising on the functionality of the trading chart. This adaptability is crucial in an era where trading can happen anywhere, making the indicator a versatile tool for traders on the go or in a static setup.
------
Terms and Conditions | Disclaimer
Our charting tools are provided for informational and educational purposes only and should not be construed as financial, investment, or trading advice. They are not intended to forecast market movements or offer specific recommendations. Users should understand that past performance does not guarantee future results and should not base financial decisions solely on historical data.
Built-in components, features, and functionalities of our charting tools are the intellectual property of @Fractalyst use, reproduction, or distribution of these proprietary elements is prohibited.
By continuing to use our charting tools, the user acknowledges and accepts the Terms and Conditions outlined in this legal disclaimer and agrees to respect our intellectual property rights and comply with all applicable laws and regulations.
Edge AI Forecast [Edge Terminal]This indicator inputs the previous 150 closing prices in a simple two-layer neural network, normalizes the network inputs using a sigmoid function, uses a feedforward calculation to send it to the second layer, shows the MSE loss curve and uses both automatic and manual backpropagation (user input) to find the most likely forecast values and uses the analog forecasting algorithm to adjust and optimize the data furthermore to display potential prices on the chart.
Here's how it works:
The idea behind this script is to train a simple neural network to predict the future x values based on the sample data. For this, we use 2 types of data, Price and Volume.
The thinking behind this is that price alone can’t be used in this case because it doesn’t provide enough meaningful pattern data for the network but price and volume together can change the game. We’re planning to use more different data sets and expand on this in the future.
To avoid a bad mix of results, we technically have two neural networks, each processing a different data type, one for volume data and one for price data.
The actual prediction is decided by the way price and volume of the closing price relate to each other. Basically, the network passes the price and volume and finds the best relation between the two data set outputs and predicts where the price could be based on the upcoming volume of the latest candle.
The network adjusts the weights and biases using optimization algorithms like gradient descent to minimize the difference between the predicted and actual stock prices, typically measured by a loss function, (in this case, mean squared error) which you can see using the error rate bubble.
This is a good measure to see how well the network is performing and the idea is to adjust the settings inputs such as learning rate, epochs and data source to get the lowest possible error rate. That’s when you’re getting the most accurate prediction results.
For each data set, we use a multi-layer network. In a multi-layer neural network, the outputs of neurons in one layer serve as inputs to neurons in the next layer. Initially, the input layer of the neural network receives the historical data. Each input neuron represents a feature, such as previous stock prices and trading volumes over a specific period.
The hidden layers perform feature extraction and transformation through a series of weighted connections and activation functions. Each neuron in a hidden layer computes a weighted sum of the inputs from the previous layer, applies an activation function to the sum, and passes the result to the next layer using the feedforward (activation) function.
For extraction, we use a normalization function. This function takes a value or data (such as bar price) and divides it up by max scale which is the highest possible value of the bar. The idea is to take a normalized number, which is either below 1 or under 2 for simple use in the neural network layers.
For the activation, after computing the weighted sum, the neuron applies an activation function a(x). To introduce non-linearity into the model to pass it to the next layer. We use sigmoid activation functions in this case. The main reason we use sigmoid function is because the resulting number is between 0 to 1 and is better for models where we have to predict the probability as an output.
The final output of the network is passed as an input to the analog forecasting function. This is an algorithm commonly used in weather prediction systems. In this case, this is used to make predictions by comparing current values and assuming the patterns might repeat in the future.
There are many different ways to build an analog forecasting function but in our case, we’re used similarity measurement model:
X, as the current situation or set of current variables.
Y, as the outcome or variable of interest.
Si as the historical situations or patterns, where i ranges from 1 to n.
Vi as the vector of variables describing historical situation Si.
Oi as the outcome associated with historical situation Si.
First, we define a similarity measure sim(X,Vi) that quantifies the similarity between the current situation X and historical situation Si based on their respective variables Vi.
Then we select the K most similar historical situations (KNN Machine learning) based on the similarity measure sim(X,Vi). We denote the rest of the selected historical situations as {Si1, Si2,...Sik).
Then we examine the outcomes associated with the selected historical situations {Oi1, Oi2,...,Oik}.
Then we use the outcomes of the selected historical situations to forecast the future outcome Y^ using weighted averaging.
Finally, the output value of the analog forecasting is standardized using a standardization function which is the opposite of the normalization function. This function takes a normalized number and turns it back to its original value by multiplying it by the max scale (highest value of the bar). This function is used when the final number is produced by the network output at the end of the analog forecasting to turn the final value back into a price so it can be displayed on the chart with PineScript.
Settings:
Data source: Source of the neural network's input data.
Sample Bars: How many historical bars do you want to input into the neural network
Prediction Bars: How many bars you want the script to forecast
Show Training Rate: This shows the neural network's error rate for the optimization phase
Learning Rate: how many times you want the script to change the model in response to the estimated error (automatic)
Epochs: the network cycle or how many times you want to run the data through the network from the first layer to the last one.
Usage:
The sample bars input determines the number of historical bars to be used as a reference for the network. You need to change the Epochs and Learning Rate inputs for each asset and chart timeframe to get the lowest error rate.
On the surface, the highest possible epoch and learning rate should produce the most effective results but that's not always the case.
If the epochs rate is too high, there is a chance we face overfitting. Essentially, you might be over processing good data which can make it useless.
On the other hand, if the learning rate is too high, the network may overshoot the optimal solution and diverge. This is almost like the same issue I mentioned above with a high epoch rate.
Access:
It took over 4 months to develop this script and we’re constantly improving it so it took a lot of manpower to develop this script. Also when it comes to neural networks, Pine Script isn’t the most optimal language to build a neural network in, so we had to resort to a few proprietary mathematical formulas to ensure this runs smoothly without giving out an error for overprocessing, specially when you have multiple neural networks with many layers.
The optimization done to make this script run on Pine Script is basically state of the art and because of this, we would like to keep the code closed source at the moment.
On the other hand we don’t want to publish the code publicly as we want to keep the trading edge this script gives us in a closed loop, for our own small group of members so we have to keep the code closed. We only accept invites from expert traders who understand how this script and algo trading works and the type of edge it provides.
Additionally, at the moment we don’t want to share the code as some of the parts of this network, specifically the way we hand the data from neural network output into the analog method formula are proprietary code and we’d like to keep it that way.
You can contact us for access and if we believe this works for your trading case, we will provide you with access.
Neural Network Synthesis: Trend and Valuation [QuantraSystems]Neural Network Synthesis - Trend and Valuation
Introduction
The Neural Network Synthesis (𝓝𝓝𝒮𝔂𝓷𝓽𝓱) indicator is an innovative technical analysis tool which leverages neural network concepts to synthesize market trend and valuation insights.
This indicator uses a bespoke neural network model to process various technical indicator inputs, providing an improved view of market momentum and perceived value.
Legend
The main visual component of the 𝓝𝓝𝒮𝔂𝓷𝓽𝓱 indicator is the Neural Synthesis Line , which dynamically oscillates within the valuation chart, categorizing market conditions as both under or overvalued and trending up or down.
The synthesis line coloring can be set to trend analysis or valuation modes , which can be reflected in the bar coloring.
The sine wave valuation chart oscillates around a central, volatility normalized ‘fair value’ line, visually conveying the natural rhythm and cyclical nature of asset markets.
The positioning of the sine wave in relation to the central line can help traders to visualize transitions from one market phase to another - such as from an undervalued phase to fair value or an overvalued phase.
Case Study 1
The asset in question experiences a sharp, inefficient move upwards. Such movements suggest an overextension of price, and mean reversion is typically expected.
Here, a short position was initiated, but only after the Neural Synthesis line confirmed a negative trend - to mitigate the risk of shorting into a continuing uptrend.
Two take-profit levels were set:
The midline or ‘fair value’ line.
The lower boundary of the 𝓝𝓝𝒮𝔂𝓷𝓽𝓱 indicators valuation chart.
Although mean-reversion trades are typically closed when price returns to the mean, under circumstances of extreme overextension price often overcorrects from an overbought condition to an oversold condition.
Case Study 2
In the above study, the 𝓝𝓝𝒮𝔂𝓷𝓽𝓱 indicator is applied to the 1 Week Bitcoin chart in order to inform long term investment decisions.
Accumulation Zones - Investors can choose to dollar cost average (DCA) into long term positions when the 𝓝𝓝𝒮𝔂𝓷𝓽𝓱 indicates undervaluation
Distribution Zones - Conversely, when overvalued conditions are indicated, investors are able to incrementally sell holdings expecting the market peak to form around the distribution phase.
Note - It is prudent to pay close attention to any change in trend conditions when the market is in an accumulation/distribution phase, as this can increase the likelihood of a full-cycle market peak forming.
In summary, the 𝓝𝓝𝒮𝔂𝓷𝓽𝓱 indicator is also an effective tool for long term investing, especially for assets like Bitcoin which exhibit prolonged bull and bear cycles.
Special Note
It is prudent to note that because markets often undergo phases of extreme speculation, an asset's price can remain over or undervalued for long periods of time, defying mean-reversion expectations. In these scenarios it is important to use other forms of analysis in confluence, such as the trending component of the 𝓝𝓝𝒮𝔂𝓷𝓽𝓱 indicator to help inform trading decisions.
A special feature of Quantra’s indicators is that they are probabilistically built - therefore they work well as confluence and can easily be stacked to increase signal accuracy.
Example Settings
As used above.
Swing Trading
Smooth Length = 150
Timeframe = 12h
Long Term Investing
Smooth Length = 30
Timeframe = 1W
Methodology
The 𝓝𝓝𝒮𝔂𝓷𝓽𝓱 indicator draws upon the foundational principles of Neural Networks, particularly the concept of using a network of ‘neurons’ (in this case, various technical indicators). It uses their outputs as features, preprocesses this input data, runs an activation function and in the following creates a dynamic output.
The following features/inputs are used as ‘neurons’:
Relative Strength Index (RSI)
Moving Average Convergence-Divergence (MACD)
Bollinger Bands
Stochastic Momentum
Average True Range (ATR)
These base indicators were chosen for their diverse methodologies for capturing market momentum, volatility and trend strength - mirroring how neurons in a Neural Network capture and process varied aspects of the input data.
Preprocessing:
Each technical indicator’s output is normalized to remove bias. Normalization is a standard practice to preprocess data for Neural Networks, to scale input data and allow the model to train more effectively.
Activation Function:
The hyperbolic tangent function serves as the activation function for the neurons. In general, for complete neural networks, activation functions introduce non-linear properties to the models and enable them to learn complex patterns. The tanh() function specifically maps the inputs to a range between -1 and 1.
Dynamic Smoothing:
The composite signal is dynamically smoothed using the Arnaud Legoux Moving Average, which adjusts faster to recent price changes - enhancing the indicator's responsiveness. It mimics the learning rate in neural networks - in this case for the output in a single layer approach - which controls how much new information influences the model, or in this case, our output.
Signal Processing:
The signal line also undergoes processing to adapt to the selected assets volatility. This step ensures the indicator’s flexibility across assets which exhibit different behaviors - similar to how a Neural Network adjusts to various data distributions.
Notes:
While the indicator synthesizes complex market information using methods inspired by neural networks, it is important to note that it does not engage in predictive modeling through the use of backpropagation. Instead, it applies methodologies of neural networks for real-time market analysis that is both dynamic and adaptable to changing market conditions.
Simple Neural Network Transformed RSI [QuantraSystems]Simple Neural Network Transformed RSI
Introduction
The Simple Neural Network Transformed RSI (ɴɴᴛ ʀsɪ) stands out as a formidable tool for traders who specialize in lower timeframe trading.
It is an innovative enhancement of the traditional RSI readings with simple neural network smoothing techniques.
This unique blend results in fairly accurate signals, tailored for swift market movements. The ɴɴᴛ ʀsɪ is particularly resistant to the usual market noise found in lower timeframes, ensuring a clearer view of short-term trends.
Furthermore, its diverse range of visualization options adds versatility, making it a valuable tool for traders seeking to capitalize on short-duration market dynamics.
Legend
In the Image you can see the BTCUSD 1D Chart with the ɴɴᴛ ʀsɪ in Trend Following Mode to display the current trend. This is visualized with the barcoloring.
Its Overbought and Oversold zones start at 50% and end at 100% of the selected Standard Deviation (default σ = 2), which can indicate extremely rare situations which can lead to either a softening momentum in the trend or even a mean reversion situation.
Here you can also see the original Indicator line and the Heikin Ashi transformed Indicator bars - more on that now.
Notes
Quantra Standard Value Contents:
To draw out all the information from the indicator calculation we have added a Heikin-Ashi (HA) Candle Visualization.
This HA transformation smoothens out the indicator values and gives a more informative look into Momentum and Trend of the Indicator itself.
This allows early entries and exits by observing the HA transformed Indicator values.
To diversify, different visualization options are available, either a classic line, HA transformed or Hybrid, which contains both of the previous.
To make Quantra's Indicators as useful and versatile as possible we have created options
to change the barcoloring and thus the derived signal from the indicator based on different modes.
Option to choose different Modes:
Trend Following (Indicator above mid line counts as uptrend, below is downtrend)
Extremities (Everything going beyond the Deviation Bands in a Mean Reversion manner is highlighted)
Candles (Color of HA candles as barcolor)
Reversion (HA ONLY) (Reversion Signals via the triangles if HA candles change state outside of the Deviation Bands)
- Reversion Signals are indicated by the triangles in the Heikin-Ashi or Hybrid visualization when the HA Candles revert
from downwards to upwards or the other way around OUTSIDE of the SD Bands.
Depending on the Indicator they signal OB/OS areas and can either work as high probability entries and exits for Mean Reversion trades or
indicate Momentum slow downs and potential ranges.
Please use another indicator to confirm this.
Case Study
To effectively utilize the NNT-RSI, traders should know their style and familiarize themselves with the available options.
As stated above, you have multiple modes available that you can combine as you need and see fit.
In the given example mostly only the mode was used in an isolated fashion.
Trend Following:
Purely relied on State Change - Midline crossover
Could be combined with Momentum or Reversion analysis for better entries/exits.
Extremities:
Ideal entry/exit is in the accordingly colored OS/OB Area, the Reversion signaled the latest possible entry/exit.
HA Candles:
Specifically applicable for strong trends. Powerful and fast tool.
Can whip if used as sole condition.
Reversions:
Shows the single entry and exit bars which have a positive expected value outcome.
Can also be used as confirmation or as last signal.
Please note that we always advise to find more confluence by additional indicators.
Traders are encouraged to test and determine the most suitable settings for their specific trading strategies and timeframes.
In the showcased trades the default settings were used.
Methodology
The Simple Neural Network Transformed RSI uses a simple neural network logic to process RSI values, smoothing them for more accurate trend analysis.
This is achieved through a linear combination of RSI values over a specified input length, weighted evenly to produce a neural network output.
// Simple neural network logic (linear combination with weighted aggregation)
var float inputs = array.new_float(nnLength, na)
for i = 0 to nnLength - 1
array.set(inputs, i, rsi1 )
nnOutput = 0.0
for i = 0 to nnLength - 1
nnOutput := nnOutput + array.get(inputs, i) * (1 / nnLength)
nnOutput
This output is then compared against a standard or dynamic mean line to generate trend following signals.
Mean = ta.sma(nnOutput, sdLook)
cross = useMean? 50 : Mean
The indicator also incorporates Heikin Ashi candlestick calculations to provide additional insights into market dynamics, such as trend strength and potential reversals.
// Calculate Heikin Ashi representation
ha = ha(
na(nnOutput ) ? nnOutput : nnOutput ,
math.max(nnOutput, nnOutput ),
math.min(nnOutput, nnOutput ),
nnOutput)
Standard deviation bands are used to create dynamic overbought and oversold zones, further enhancing the tool's analytical capabilities.
// Calculate Dynamic OB/OS Zones
stdv_bands(_src, _length, _mult) =>
float basis = ta.sma(_src, _length)
float dev = _mult * ta.stdev(_src, _length)
= stdv_bands(nnOutput, sdLook,sdMult/2)
= stdv_bands(nnOutput, sdLook, sdMult)
The Standard Deviation bands take defined parameters from the user, in this case sigma of ideally between 2 to 3,
to help the indicator detect extremely improbable conditions and thus take an inversely probable signal from it to forward to the user.
The parameter settings and also the visualizations allow for ample customizations by the trader.
For questions or recommendations, please feel free to seek contact in the comments.
Esqvair's Neural Reversal Probability IndicatorIntroduction
Esqvair's Neural Reversal Probability Indicator is the indicator that shows probability of reversal.
Warning: This script should only be used on 1 minute chart.
How to use
When a signal appears (by default it is a green bar), a reversal should be expected.
The signal appears when the indicator value >= Threshold.
If you want more signals, you must lower the threshold, if less, you must increase the threshold.
For some assets, like Forex pairs, you have to optimize the threshold yourself, but for most stocks, the default threshold works well.
How well a threshold fits an asset depends on the volatility of the asset.
For most assets, the indicator ranges from 35 to 75.
Settings
Smoothing - The default is 1, which means no smoothing. Indicator smoothing by SMA.
Threshold - default 71.0 is responsible for the occurrence of signals, read "How to use" part to learn more
The Indicator
This indicator is a pre-trained neural network that was trained outside of TradingView and then its structure and weights values were converted to PineScript.
Warning: A neural network is a black box in the sense that although it can approximate any function, studying its structure will not give you any idea about the structure of the function being approximated.
Possible questions
Why does the indicator value most time range from 35 to 75 when the probability should ranges from 0 to 100?
-Due to some randomness in the markets, a neural network can never be 100% sure.
What data was used to train the neural network?
-This was BTCUSD 1 minute chart data from 02/05/2020 to 02/05/2022.
Where did you train the neural network and convert it to PineScript?
-I used a programming language that I know.
NEURAL TREND AI - MULTI SCRIPT (With Alerts)This study is based on several Price Action parameters of :-
• Candle Pattern,
• Supply Demands,
• Support and Resistance ,
• Breakouts,
• Trend Series Forecasting,
• Average true Range,
• Neural Smoothing With Alpha, Beta Calculations for Filtering wrong trend breakouts.
► How To Use This Study ?
• This Study is for positional trading.
• Buy Whenever a GREEN Up Arrow Appears on Chart with text "BUY ACTIVATED".
• Sell Whenever a RED Down Arrow Appears on Chart with text "SELL ACTIVATED".
• Exit Buy Whenever a RED Down Arrow Appears with text "SELL ACTIVATED" After A Buy call and Exit Sell Whenever a up Arrow Appears with text "BUY ACTIVATED" After A Sell Call.
• Trade every call and do positional trading
• Alerts are inbuilt for both LONG and SHORT signals.
Test Yourself and give feedback.
PM us to obtain access.
Candlesticks ANN for Stock Markets TF : 1WHello, this script consists of training candlesticks with Artificial Neural Networks (ANN).
In addition to the first series, candlesticks' bodies and wicks were also introduced as training inputs.
The inputs are individually trained to find the relationship between the subsequent historical value of all candlestick values 1.(High,Low,Close,Open)
The outputs are adapted to the current values with a simple forecast code.
Once the OHLC value is found, the exponential moving averages of 5 and 20 periods are used.
Reminder : OHLC = (Open + High + Close + Low ) / 4
First version :
Script is designed for S&P 500 Indices,Funds,ETFs, especially S&P 500 Stocks,and for all liquid Stocks all around the World.
NOTE: This script is only suitable for 1W time-frame for Stocks.
The average training error rates are less than 5 per thousand for each candlestick variable. (Average Error < 0.005 )
I've just finished it and haven't tested it in detail.
So let's use it carefully as a supporter.
Best regards !
ANN BTC MTF Golden Cross Period MACDHi, this is the MACD version of the ANN BTC Multi Timeframe Script.
The MACD Periods were approximated to the Golden Cross values.
MACD Lengths :
Signal Length = 25
Fast Length = 50
Slow Length = 200
Regards.
ANN BTC MTF CM Sling Shot SystemHi all, this script was created as a result of ANN training in all time frames of bitcoin data.
Trained data is built on Chris Moody's Sling Shot system.
CM Sling Shot System :
This system automatically generates the ANN output for all time periods.
Therefore, it has multi-time-frame feature.
Artificial Neural Networks training details:
Average Errors
1 minute = 0.005570
3 minutes = 0.006674
5 minutes = 0.007067
15 minutes = 0.010000
30 minutes = 0.009398
45 minutes = 0.010000
1 Hour = 0.006848
2 Hours = 0.006901
3 Hours = 0.009608
4 Hours = 0.009774
1 Day = 0.010000
1 Week = 0.010000
The results look good (All Average Error <= 0.01 ), the Sling Shot Method is also good, but you can also refer to historically slower period averages to filter these arrows a bit more. I leave the decision to you.
Best regards.
ANN Forecast Dependent Variable Odd GeneratorHello , this script is the ANN Forecast version of my "Dependent Variable Odd Generator " script.
I went to simplify a bit because the deep learning calculations are too much for this command.
The latest instruments included:
WTI : West Texas Intermediate (WTICOUSD , USOIL , CL1! ) Average error : 0.007593
BRENT : Brent Crude Oil ( BCOUSD , UKOIL , BB1! ) Average error : 0.006591
GOLD : XAUUSD , GOLD , GC1! Average error : 0.012767
SP500 : S&P 500 Index ( SPX500USD , SP1! ) Average error : 0.011650
EURUSD : Eurodollar ( EURUSD , 6E1! , FCEU1!) Average error : 0.005500
ETHUSD : Ethereum ( ETHUSD , ETHUSDT ) Average error : 0.009378
BTCUSD : Bitcoin ( BTCUSD , BTCUSDT , XBTUSD , BTC1! ) Average error : 0.01050
GBPUSD : British Pound ( GBPUSD , 6B1! , GBP1!) Average error : 0.009999
USDJPY : US Dollar / Japanese Yen ( USDJPY , FCUY1!) Average error : 0.009198
USDCHF : US Dollar / Swiss Franc ( USDCHF , FCUF1! ) Average error : 0.009999
USDCAD : Us Dollar / Canadian Dollar ( USDCAD ) Average error : 0.012162
VIX : S & P 500 Volatility Index (VX1! , VIX ) Average error : 0.009999
ES : S&P 500 E-Mini Futures ( ES1! ) Average error : 0.010709
SSE : Shangai Stock Exchange Composite (Index ) ( 000001 ) Average error : 0.011287
XRPUSD : Ripple (XRPUSD , XRPUSDT ) Average error : 0.009803
Simply select the required instrument from the tradingview analysis screen, then add this command and select the same instrument from the settings section.
The codes are not open-source because they contain forecast algorithm codes a little that I will use commercially in the future.
However, I will never remove this script, and you can use it for free unlimitedly.
For more information about my artificial neural network forecast series:
For more information about my dependent variable odd generator :
For more information about simple artificial neural networks :
(detailed information about ANN )
(25 in 1 version )
I hope it helps in your analysis. Regards , Noldo .
NOTE : In the first pass bar of the definite positive and negative zone, alerts are added for both conditions.
Function Decimal To Binary/Binary To DecimalNOTE: Experimental. Pinescript implementation of Decimal to Binary and Binary to Decimal that is intended for use in the development of a neural network proof of concept.
Intended for use in as subcomponent in the development of a more complex/highly experimental prototype.
Protection/logic for edge cases above 11111111/255 (8bits) is NOT implemented.
Do NOT use this in any trading system or component without edge case testing/unit tests.
// Decimal to Binary, Binary to Decimal Reference:
// diwasfamily.com
// www.wikihow.com
//
// www.khanacademy.org
ANN Forecast Stochastic Oscillator [Noldo] In this script, I tried to integrate ANN Forecast Algorithm on Stochastic Oscillator.
It took me quite a while, but i guess it worth.
After selecting the ticker, select the instrument from the menu and the system will automatically turn on the appropriate Forecast Stoch system.
The system is trained with ANN values of ANN MACD 25 in 1.
The Forecast algorithm is not open-source.
But I'm never remove this script.
You can use it forever for free.
As you can see in the presentation, although it is in the same period, it is more accurate and agile than standard Stochastic Oscillator .
I think even a bar is important in trade.
For those who don't see that command,listed instruments with alternative tickers and error rates:
WTI : West Texas Intermediate (WTICOUSD , USOIL , CL1! ) Average error : 0.007593
BRENT : Brent Crude Oil ( BCOUSD , UKOIL , BB1! ) Average error : 0.006591
GOLD : XAUUSD , GOLD , GC1! Average error : 0.012767
SP500 : S&P 500 Index ( SPX500USD , SP1! ) Average error : 0.011650
EURUSD : Eurodollar ( EURUSD , 6E1! , FCEU1!) Average error : 0.005500
ETHUSD : Ethereum ( ETHUSD , ETHUSDT ) Average error : 0.009378
BTCUSD : Bitcoin ( BTCUSD , BTCUSDT , XBTUSD , BTC1! ) Average error : 0.01050
GBPUSD : British Pound ( GBPUSD , 6B1! , GBP1!) Average error : 0.009999
USDJPY : US Dollar / Japanese Yen ( USDJPY , FCUY1!) Average error : 0.009198
USDCHF : US Dollar / Swiss Franc ( USDCHF , FCUF1! ) Average error : 0.009999
USDCAD : Us Dollar / Canadian Dollar ( USDCAD ) Average error : 0.012162
SOYBNUSD : Soybean ( SOYBNUSD , ZS1! ) Average error : 0.010000
CORNUSD : Corn ( ZC1! ) Average error : 0.007574
NATGASUSD : Natural Gas ( NATGASUSD , NG1! ) Average error : 0.010000
SUGARUSD : Sugar ( SUGARUSD , SB1! ) Average error : 0.011081
WHEATUSD : Wheat ( WHEATUSD , ZW1! ) Average error : 0.009980
XPTUSD : Platinum ( XPTUSD , PL1! ) Average error : 0.009964
XU030 : Borsa Istanbul 30 Futures ( XU030 , XU030D1! ) Average error : 0.010727
VIX : S & P 500 Volatility Index (VX1! , VIX ) Average error : 0.009999
ES : S&P 500 E-Mini Futures ( ES1! ) Average error : 0.010709
SSE : Shangai Stock Exchange Composite (Index ) ( 000001 ) Average error : 0.011287
XRPUSD : Ripple (XRPUSD , XRPUSDT ) Average error : 0.009803
Extras :
- Crossover and crossunder alerts
- Switchable barcolor
NOTE :
Australian Dollar / US Dollar ( AUDUSD ) removed due to high average error. (Average error > 0.013 )
Timeframe advice :
I suggest you to use that system TF >= 1D
My favorite is 1 week bars. (1W)
More info about forecast series (My last forecast example ) :
Special thanks :
Special thanks to dear wroclai for his great effort .
NOTE : I decided to build Autonomous LSTM on Stochastic Oscillator , i think Stochastic Oscillator one of the best and it contains naturally high-lows.
ANN GOLD WORLDWIDE This script consists of converting the value of 1 gram and / or 1 ounce of gold according to the national currencies into a system with artificial neural networks.
Why did I feel such a need?
Even though the printed products in the market are digitally circulated, only precious metals are available in full or near full.
Silver is difficult to carry because you have to buy too much because the unit price is low.
Platinum is very difficult to find and used in industry.
Gold is both practical and has less volatile movements, even more balanced than dollars, to preserve the value of money.
Uncertainty and tensions benefit gold.
Obviously this is my own opinion and is not worth the investment advice:
If there is to be an economic crisis, it is obvious that the dollar will rise against the emerging currencies, but I expect a crisis where gold and the dollar will rise together.
The world has been on a mercantilist line more than ever!
Spot gold can be bought from goldsmiths and banks.
I think this command will benefit people everywhere but in economies that are subject to developing currencies.
Now we can look at the details:
All you have to do is load the appropriate chart and select it from the menu.
Thus, the system will adjust itself to that instrument.
MENU and Tickers :
"GOLD" : XAUUSD or GC1! or GOLD (Average error = 0.0128)
"GOLDSILVER" : XAUXAG or GOLDSILVER (Gold Silver Ratio ) ( Average error : 0.01 )
"GOLD CZK " : XAUUSD/USDCZK ( 1 Ounce Gold Czech Koruna) ( Average error = 0.010879 )
"GOLD NZD " : XAUUSD/USDNZD ( 1 Ounce Gold New Zealand Dollar ) (Average error = 0.010736 )
"GOLD EURO" : XAUUSD/USDEUR ( 1 Ounce Gold Euro) ( Average error = 0.010000 )
"GOLD HUF " : XAUUSD/USDHUF ( 1 Ounce Gold Hungarian Forint ) ( Average error = 0.010000 )
"GOLD INR " : XAUUSD/USDINR (1 Ounce Gold Indian Rupee ) (Average error = 0.010458 )
"GOLD DKK" : XAUUSD/USDDKK (1 Ounce Gold Danish Krone) (Average error = 0.010671 )
"GOLD CHF" : XAUUSD/USDCHF (1 Ounce Gold Swiss Franc ) (Average error = 0.010967 )
"GOLD CNH" : XAUUSD/USDCNH(1 Ounce Gold Offshore RMB) (Average error = 0.012017 )
"GOLD MXN" : XAUUSD/USDMXN(1 Ounce Gold Mexican Peso) (Average error = 0.010000 )
"GOLD PLN" : XAUUSD/USDPLN (1 Ounce Gold Polish Zloty ) (Average error = 0.010173 )
"GOLD ZAR" : XAUUSD/USDZAR (1 Ounce Gold South African Rand (Average error = 0.010484 )
"GOLD NOK" : XAUUSD/USDNOK (1 Ounce Gold Norwegian Krone ) (Average error = 0.010842 )
"GOLD TRY" : XAUUSD/USDTRY (1 Ounce Gold Turkish Lira ) (Average error = 0.010000 )
"GOLD THB" : XAUUSD/USDTHB (1 Ounce Gold Thai Baht ) (Average error = 0.011747 )
Important note : XAUUSD/USDCUR = 1 Ounce Gold , XAUUSD/31.1*USDCUR = 1 gram Gold (CUR = Currency )
If you want to physically hold it, look gram value, because as far as I know, all goldsmiths and jewelleries in the world are selling gram gold.
I think that this command is the most useful and the concrete one that I have ever written.
I end my sentences with this anonymous proverb :
"Even if gold falls into the mud, it's still gold ! "
ANN MACD : 25 IN 1 SCRIPTIn this script, I tried to fit deep learning series to 1 command system up to the maximum point.
After selecting the ticker, select the instrument from the menu and the system will automatically turn on the appropriate ann system.
Listed instruments with alternative tickers and error rates:
WTI : West Texas Intermediate (WTICOUSD , USOIL , CL1! ) Average error : 0.007593
BRENT : Brent Crude Oil (BCOUSD , UKOIL , BB1! ) Average error : 0.006591
GOLD : XAUUSD , GOLD , GC1! Average error : 0.012767
SP500 : S&P 500 Index (SPX500USD , SP1!) Average error : 0.011650
EURUSD : Eurodollar (EURUSD , 6E1! , FCEU1!) Average error : 0.005500
ETHUSD : Ethereum (ETHUSD , ETHUSDT ) Average error : 0.009378
BTCUSD : Bitcoin (BTCUSD , BTCUSDT , XBTUSD , BTC1!) Average error : 0.01050
GBPUSD : British Pound (GBPUSD,6B1! , GBP1!) Average error : 0.009999
USDJPY : US Dollar / Japanese Yen (USDJPY , FCUY1!) Average error : 0.009198
USDCHF : US Dollar / Swiss Franc (USDCHF , FCUF1! ) Average error : 0.009999
USDCAD : Us Dollar / Canadian Dollar (USDCAD) Average error : 0.012162
SOYBNUSD : Soybean (SOYBNUSD , ZS1!) Average error : 0.010000
CORNUSD : Corn (ZC1! ) Average error : 0.007574
NATGASUSD : Natural Gas (NATGASUSD , NG1!) Average error : 0.010000
SUGARUSD : Sugar (SUGARUSD , SB1! ) Average error : 0.011081
WHEATUSD : Wheat (WHEATUSD , ZW1!) Average error : 0.009980
XPTUSD : Platinum (XPTUSD , PL1! ) Average error : 0.009964
XU030 : Borsa Istanbul 30 Futures ( XU030 , XU030D1! ) Average error : 0.010727
VIX : S & P 500 Volatility Index (VX1! , VIX ) Average error : 0.009999
YM : E - Mini Dow Futures (YM1! ) Average error : 0.010819
ES : S&P 500 E-Mini Futures (ES1! ) Average error : 0.010709
GAZP : Gazprom Futures (GAZP , GZ1! ) Average error : 0.008442
SSE : Shangai Stock Exchange Composite (Index ) ( 000001 ) Average error : 0.011287
XRPUSD : Ripple (XRPUSD , XRPUSDT ) Average error : 0.009803
Note 1 : Australian Dollar (AUDUSD , AUD1! , FCAU1! ) : Instrument has been removed because it has an average error rate of over 0.13.
The average error rate is 0.1850.
I didn't delete it from the menu just because there was so much request,
You can use.
Note 2 : Friends have too many requests, it took me a week in total and 1 other script that I'll share in 2 days.
Reaching these error rates is a very difficult task, and when I keep at a low learning rate, they are trained for a very long time.
If I don't see the error rate at an average low, I increase the layers and go back into a longer process.
It takes me 45 minutes per instrument to command artificial neural networks, so I'll release one more open source, and then we'll be laying 70-80 percent of the world trade volume with artificial neural networks.
Note 3 :
I would like to thank wroclai for helping me with this script.
This script is subject to MIT License on behalf of both of us.
You can review my original idea scripts from my Github page.
You can use it free but if you are going to modify it, just quote this script .
I hope it will help everyone, after 1-2 days I will share another ann script that I think is of the same importance as this, stay tuned.
Regards , Noldo .
ANN MACD WTI (West Texas Intermediate) This script created by training WTI 4 hour data , 7 indicators and 12 Guppy Exponential Moving Averages.
Details :
Learning cycles: 1
AutoSave cycles: 100
Training error: 0.007593 ( Smaller than average target ! )
Input columns: 19
Output columns: 1
Excluded columns: 0
Training example rows: 300
Validating example rows: 0
Querying example rows: 0
Excluded example rows: 0
Duplicated example rows: 0
Input nodes connected: 19
Hidden layer 1 nodes: 2
Hidden layer 2 nodes: 6
Hidden layer 3 nodes: 0
Output nodes: 1
Learning rate: 0.7000
Momentum: 0.8000
Target error: 0.0100
Special thanks to wroclai for his great effort.
Deep learning series will continue. But I need to rest my eyes a little :)
Stay tuned ! Regards.
ANN MACD BRENT CRUDE OIL (UKOIL) This script trained with Brent Crude Oil data including 7 basic indicators and 12 Guppy Exponential Moving Averages .
Details :
Learning cycles: 1
Training error: 0.006591 ( Smaller than 0.01 ! )
AutoSave cycles: 100
Input columns: 19
Output columns: 1
Excluded columns: 0
Training example rows: 300
Validating example rows: 0
Querying example rows: 0
Excluded example rows: 0
Duplicated example rows: 0
Input nodes connected: 19
Hidden layer 1 nodes: 2
Hidden layer 2 nodes: 6
Hidden layer 3 nodes: 0
Output nodes: 1
Learning rate: 0.7000
Momentum: 0.8000
Target error: 0.0100
Note : Alerts added .
Special thanks to wroclai for his great effort.
Deep learning series will continue , stay tuned ! Regards.
ANN MACD S&P 500 This script is formed by training the S & P 500 Index with various indicators. Details :
Learning cycles: 78089
AutoSave cycles: 100
Training error: 0.011650 (Far less than the target, but acceptable.)
Input columns: 19
Output columns: 1
Excluded columns: 0
Training example rows: 300
Validating example rows: 0
Querying example rows: 0
Excluded example rows: 0
Duplicated example rows: 0
Input nodes connected: 19
Hidden layer 1 nodes: 2
Hidden layer 2 nodes: 1
Hidden layer 3 nodes: 0
Output nodes: 1
Learning rate: 0.7000
Momentum: 0.8000
Target error: 0.0100
Note : Thanks for dear wroclai for his great effort .
Deep learning series will continue . Stay tuned! Regards.
SPY FRACTAL S-R LEVELS (FIXED ANN MACD)
This is a fractal version of my deep learning script for SPY
In addition, buy and sell conditions may appear in bar colors in green and red.
You can choose from the menu if you wish.
Fractal codes do not belong to me.
So I didn't put any license.
You can use it as you want, you can change and modify.
Regards.Noldo