Supply & Demand patterns on the market + Ultra High Volume ZonesIn this video I am presenting the approach of identify and trade incoming supply and demand signals, as a modification of VSA methodology. I explain more also about importance of spotting places, where unusual high volume takes place. Enjoy!
Neuralnetwork
Open Tutorial ⚪ How To Never Lose Money? "Losing is the part of the game."
- said the loser and kept losing.
Are you a loser?
Or do you open your mind?
Losers lose because they BELIEVE in their loss.
They refuse to comprehend reality.
In reality, you can't learn from failures.
A loss is a loss.
Nothing more.
In truth, you can learn only from successes.
But what if you only lost so far?
Good news:
It doesn't have to be your success.
You can learn from the success of others.
Let's specify an ideal strategy.
The ideal strategy is never wrong.
You don't have to know this strategy.
It suffices if it exists.
Somewhere.
To someone.
We experimented with pattern matching + AI a lot.
Our theory:
Wedges can approximate any strategy.
You can draw wedges.
You don't have to know an ideal strategy.
Yet you can approximate it with wedges.
Is it possible to learn this power?
Not from a Jedi.
What we know:
It works on all major cryptocurrencies with USDT.
+100% profit on BTC/USDT:
It works on altcoins.
+200% profit on XEM/USDT (x10):
It works on cryptocurrency-cryptocurrency pairs.
+300% profit on TVKBTC (x10):
Thus, +100% success rate.
More than +700% profit.
All within a week.
"One stoke, two halves."
- said the winner and kept winning.
Development Log for Neural Network PrototypeThe idea, at the core:
Port a limited RNN/LSTM Neural Network model from Python with a reduced training set and dimension size for layers to demonstrate that a fully functional (even if limited) Neural Net can work in Pine.
Limited model + having the python code on hand = Able to test and verify components in Pine at every step, in theory
The model/script I'm attempting to implement a limited subset of is detailed here:
iamtrask.github.io
A dataset in binary is required, but binary does not exist in pinescript, thus:
To do this, decimal to binary and binary to decimal functions are required. This didn't exist previously - I've written a script to accomplish just that:
Originally, this was going to have a input_dim of 2, hidden_dim of 16, but I've changed the hidden_dim to 8 (binary dimensions from 8 to 5) to reduce the dataset range to max 32 while I figure out to implement working pseudo-arrays and state updates. I've looked at RicardoSantos's scripts for Markov and Pseudoarrays, and will be using them as a reference going forward.
I've verified the output of the Sigmoid function and 1st derivative of the Sigmoid function in Python for values of (-1,0,0.5,1 ). I've yet to publish the Sigmoid script pending approval from TV moderators about including python code that is commented out at the bottom to verify the results of that script.
What I'm trying to do here with training dataset generation was unsuccessful, for multiple reasons:
Lack of formal array constructs in pine
Psuedorandom Number generator limitations
Manual state weighting and updating as per RicardoSantos's Function Markov Process is required:
What's being plotted for are the first three layers, but without the full range of the input_dimensions, hidden_dimensions:
syn_0 (blue)
syn_1 (green)
syn_h (red)
While there's more than a few technical hurdles to overcome (i.e. potential pine issues from max variables to runtime/compile limits, no real arrays, functions to do state updates RichardoSantos Markov Function style, etc), I'm fairly confident a limited working model should be possible to create in Pine.
Indicators Input Window Length - Problems And SolutionsIntroduction
Most technical indicators possesses a user defined input window length, this input affect the indicator output and for a long time, have been the cause of many innovations in technical analysis.
In this post i want to discuss the effects and particularities of indicators inputs window length, the challenges they introduce in trading and their effect when paired with machine learning forecasting models, i hope this post will be easy to read, let me know if you had difficulties understanding it.
Speed And Efficiency Problems
An input window length can involve the number of data processed by the indicator, therefore higher window length's will process more data, which result in a slower computation time, therefore in high-frequency/algorithmic trading where response time matter, maximizing the profitability might be made at the cost of the indicator response time, and even if computerized trading has been praised for its speed, small lag times can actually affect your strategy, therefore one might enter a trade at a different value than the targeted price.
Note : High frequency trading (hft) is a commonly mistaken term, one might believe that hft require the trader to open and close a large number of trades in a short amount of time, in reality hft is related to the "rate at which data is processed".
Solution - Efficient Data Processing
Solutions have been proposed in order to make certain tools more efficient. For example the simple moving average is a common tool that is the basis of many other indicators, its calculation involve summing the length last data points and diving this sum by length . In signal processing, such tool require what is called "memory", the data points must be stored in order for them to be processed, this is extremely inefficient and slow, therefore alternatives have been proposed, one of them is still mainly used in technical analysis today and is called the exponential moving average (ema), the process of computing an exponential moving average is called exponential averaging, and has the form of :
ema = sc*input+(1-sc)*(past ema value)
where sc is called the smoothing constant where 1 > sc > 0 . We only need 2 data values in order to perform this computation, lets denote a moving average of period length sma(input,length) , we can estimate it using exponential averaging with sc = 2/(length+1) . The computation time of the exponential moving average is way lower than the one of the sma . This is the most elegant and efficient estimation of the simple moving average.
The exponential moving average is the simplest "IIR Filter", or infinite response filter, those filters are as well extremely efficient since they use recursion. Exponential averaging is also the core of many adaptive indicators. In my experience, recursion will always let you create extremely efficient tools.
Window Length And Optimization Problems
Optimization is a branch of mathematics that help us find the best parameters in order to maximize/minimize a certain function, and thanks to computers this process can be made faster. Optimizing technical indicators during backtesting involve finding the input window length (set of inputs if there are more than 1 input) that maximize the profit of a strategy.
The most common approach is brute forcing, in which we test every indicator inputs window length combination and keep the one that yield the best results. However optimization is still computationally intensive, having 2 indicators already involve a high number of combinations. This is why it is important to select a low number of indicators for your strategy. But then other problems arise, the best input window length (set of inputs) might change in the future. This is due to the fact the market price is non-stationary and one of the reasons technical indicators are looked down.
In order to deal with this problem, we can propose the following solutions :
Use indicators/Information with no input window length -> Vwap/Volume/True Range/Cumulative Mean...etc.
Study the relationship between the optimal input window length and price evolution -> Regression analysis
Forecast the optimal input window length -> Forecasting
The last two are extremely inefficient, kinda nightmarish, and would be time consuming if one use a serious backtesting procedure. However the first solution is still appealing and might actually provide a efficient result.
Machine Learning Forecasting - Performance And Technical indicators Input Window Length Dependency
Technical indicators outputs can be used as inputs for machine learning algorithms. We could think that we also need to optimize the input window length of the indicators when using machine learning (which would lead to high computations time, machine learning already involve optimization of a high number of parameters), however a research paper named "Forecasting price movements using technical indicators: Investigating the impact of varying input window length" by Yauheniya Shynkevicha, T.M. McGinnitya, Sonya A. Colemana, Ammar Belatrechec and Yuhua Li highlight an interesting phenomenon, the abstract tell us that :
"The highest prediction performance is observed when the input window length is approximately equal to the forecast horizon"
In short, if you want to forecast market price 14 step ahead with a machine learning model, you should use indicators with input window length approximately equal to 14 as inputs for the model in order to get the best performance. This would allow to skip a lot of optimizations processes regarding the technical indicators used in the model. They used 3 different type of ML algorithms, support vector machine (svm) , adversarial neural networks (ann) and k nearest neighboring (knn) , which reinforce their conclusion.
In the paper, we can see something interesting with the indicators they selected as inputs, they used : A simple moving average, an exponential moving average, the average true range, the Average Directional Movement Index, CCI, ROC, RSI, %R, stochastic oscillator.
First thing we can see is that they used the exponential moving average instead of the wilder moving average for certain calculations, which i think is a good choice. We can also see they used many indicators outputting the same kind of information, in this case we often talk about "Multicollinearity", for example :
The CCI, ROC, RSI, %R, Stochastic output similar information, all remove the trend in the price, the CCI and ROC are both centered around 0 and the %R, RSI and stochastic oscillator around 50. The SMA and EMA also output similar information.
In technical analysis this practice is often discouraged since the indicators will output the same kind of information, this lead to redundancy. However such practice has been seen a lot in machine learning models using technical indicators. Maybe that a higher amount of multicollinearity between indicators allow to strengthen the relationship between the forecast horizon and the indicators input window length.
Conclusion
We talked (a lot) about indicator inputs window length, what problems they cause us and how we can find solutions to those problems. Also we have seen that the forecasting performance of ML models can be higher when they use indicators outputs with input window length equal to the forecasting horizon. This can make to make the process of forecasting financial market price with ML models using technical indicators more efficient.
ML is a recurring subject in financial forecasting, those algorithms offer the hope to make technical indicators more useful, and indeed, technical indicators and ML models can benefits from each others, however it is sad to observe that classical indicators are mainly used instead of newer ones, but its also encouraging in the sense that more research can be done, using newer material/procedures.
Thanks for reading !
Heffae USDJPY - Cloud interaction & predictive path fittingHeffae Clouds functioning as adaptive support and resistance in FOREX markets. High validity path fitting, cloud color provides granular detail on path validity, constitution of paths use default maths with a higher offset.
This demonstrates the flexibility and power of Heffae Clouds. The ability to automatically adapt and produce high validity path-fitting for many different asset classes.