Probability Effort Scalper [PES]Probability Effort Scalper
Indicator is made of Two Basic Component
1. Probability Distribution Filter
2. Cumulative Effort Volumes
What is a Probability Distribution Filter ?
A filter which segregate the outcomes of any experiment into binary score of momentum based probabilities, so the filter is actually acting as a classifier to classify the probability of future occurrence of any event { in this case Stock prices going up / going down } { Long/ Short / Exit } by Binomial fitting method.
So the script uses Predictive Differential Filter, for filtering out the probability distribution, it actually uses differential calculations on binomial models.
Basic Assumptions:
That the Stock prices are in semi-strong efficiency
That the Stock prices follow up the Binomial Distribution
What is Cumulative Effort Volume
Effort Volume estimation is the process of predicting the most realistic amount of Volume Required to Push the Prices up or down, Its a group estimation model,
works on law of effort vs results and estimates the flow of the prices, (same as fluid dynamics), it's basically used to justify the harmony and Divergence occurrence in probability distribution.
How to use the Indicator
Simple Concept :
{ Signal candle = candle with a Triangle mark }
Long on the High of the Long Signal Candle,
Short on the Low of the Short Signal Candle
Exit on the Candle where "X" is present
For Long / Buy Signals {refer image below}
For Short / Sell Signals {refer image below}
Provisions for Alerts
Listed below are the Types of Alerts :
BUY SIGNAL
SELL SIGNAL
BOTH BUY/SELL SIGNAL
ALL STOP / EXIT SIGNALS
EXIT FROM LONG
EXIT FROM SHORT
What Securities will it work upon ?
The indicator works on every liquid security : stocks, futures, futures of indexes, forex, crypto : Having a Volume Informations provided by tradingview
Since the Indicator uses Volume Effort Estimation, The securities that you can apply the indicator on should be liquid
How to Get Access
Just Private Message me, would be happy to help you out !
Do not use comment box for asking for access, use it only for constructive feedbacks
Cerca negli script per "binary"
Overloaded Volume-Canddle v1This indicator will detect the candle has volume "too strong" base on "n" previous candle.
The Yellow Line is avg volume base n candle previous.
The Red line show over power volume of canlde.
Important : This indicator can use for forex, but i recommend it for binary options only.
Technimentals S&P Weighted FlowThis script runs a proprietary money flow algorithm three times with different user defined inputs on the subsectors of the S&P, weights their outputs directly according to their weighting in the S&P and then plots the cumulative total of the 33 outputs as a single line which overlays the chart.
The algorithm works by measuring relative volatility on each candlestick compared to the previous candlestick and compares that with it's smoothed recent volatility . This produces a binary (signum) output which is then weighted and accumulated.
The script is designed for use on shorter term timeframes. I do not recommend using this indicator on the daily timeframe or higher unless you lower the timeframe setting inside the script itself. The reason for this is that the signals it provides are often very slow and require zooming the chart out to get enough context to interpret the signals. For example, using this indicator on the one minute timeframe may produce signals several days out, or more!
Technimentals NDX Weighted FlowThis script runs a proprietary money flow algorithm three times with different user defined inputs on the top 20 components of the NDX, weights their outputs directly according to their weighting in the NDX and then plots the cumulative total of the 60 outputs as a single line which overlays the chart.
The algorithm works by measuring relative volatility on each candlestick compared to the previous candlestick and compares that with it's smoothed recent volatility . This produces a binary (signum) output which is then weighted and accumulated.
The script is designed for use on shorter term timeframes. I do not recommend using this indicator on the daily timeframe or higher unless you lower the timeframe setting inside the script itself. The reason for this is that the signals it provides are often very slow and require zooming the chart out to get enough context to interpret the signals. For example, using this indicator on the one minute timeframe may produce signals several days out.
Om Boy CandlesUsed by me to play binary option.
A little project to help my nephew decide which candle to refer to make SNR lines
Ranging Market Detector [AstrideUnicorn]Determining if the market is in a trend or a range regime is a very complex problem. And knowing the answer can be, in some situations, the real holy grail. If the trader knows when the market is in a range regime, they can avoid overtrading and make moving average crossover strategies more profitable. A regime switch from a trend to a range can be a signal to close open positions. It can also be helpful when trading such instruments as short-term binary options. When the market is ranging directional moves are not expected, and the trader should be careful as opening a position in such conditions is, by some degree, a random outcome game. Range breakouts trading is one more example when knowing the market regime is critical.
We have created an indicator that predicts the current market regime. It smooths the price using the Kalman filter and analyzes the curve's slope. If the absolute value of the slope is low, then the market is in range mode and vice versa. To distinguish between the two regimes, the algorithm compares the absolute value of the slope with its long-term average.
HOW TO USE
The indicator shows the difference between the absolute slope value and its long-term average as a histogram. When a bar of the histogram is higher than the threshold level presented by the red line, the market is in a trending regime. In this regime, the background of the indicator is blue. When the market is in a range regime, the indicator background turns red.
The threshold level helps to control the lag. The greater it is, the more lagging the indicator will be. By default, this value is set to a negative value. It means that the indicator switches from range to trend a little bit earlier than the slope gets higher than the average slope. You can use the value of zero or low negative values to find the optimal tradeoff between the strength of the signals and their lag.
SETTINGS
The indicator has one input parameter called Threshold. It sets the threshold level described above. Its value should be close to zero. The less the value is, the less is the indicator's lag, but at the same time, the less confirmed the regime-switching signals are.
The use cases can be very different. And as the code is open, you can also use the indicator as a building block for your custom trading strategies.
Let us know your thoughts and suggestions!
NEXT Stochastic 3xVW (Triple Volume Weighted)Overview:
This responsive version of the Stochastic oscillator modifies and extends the original to incorporate volume. It does so on 2 levels: by using Volume-Weighted Moving Average (VWMA) as input and applying a triple volume weighting filter within the internal algorithm, intelligently blending volume with what is otherwise pure momentum/distribution analysis. The result is more binary-like curve behavior (%K and %D oscillator lines), whose polarizing movement acts as both a signal and filter.
Below is a screenshot comparing NEXT Stochastic 3xVW with default settings to the original Stochastic oscillator on NQ M1 chart.
Application and Strategy Ideas:
NEXT Stochastic 3xVW is intended to be used like the original Stochastic oscillator within the context of technical analysis: identifying overvalued (above upper limit) and undervalued (below lower limit) price action, as well as establishing a bias baseline (bullish if over 50; bearish if under 50). Higher NEXT Stochastic 3xVW bottoms compared to lower price bottoms signify bullish divergence; lower NEXT Stochastic 3xVW tops compared to higher price tops signify bearish divergence. Trading %K/%D line crossing is also a popular strategy, with %K crossing over %D indicating bullish sentiment and %K crossing under %D indicating bearish sentiment.
Below is a screenshot showing NEXT Stochastic 3xVW overbought/oversold intraday strategy on SPY M1 chart. NEXT Stochastic 3xVW is set to 5,10,1,3 with long signal issued at lower limit of 30 and short at upper limit of 70.
Input Parameters:
VWMA Length - controls the averaging length of the volume-weighted moving average (based on close price and volume); used as Stochastic input
%K Length - volume-driven averaging length of the %K oscillator line - this is the faster of the two Stochastic lines
%K Smoothing - volume-driven smoothing factor of the %K line
%D Smoothing - volume-driven averaging length of the %D oscillator line (a %K derivative, post smoothing) - this is the slower of the two Stochastic lines
Upper Limit - the NEXT Stochastic 3xVW level above which market is considered overbought, default is 80
Base Bias - the NEXT Stochastic 3xVW level above which market bias is considered bullish, and below bearish
Lower Limit - the NEXT Stochastic 3xVW level below which market is considered oversold, default is 20
Signals and Alerts:
Discover and visualize NEXT Stochastic 3xVW strategies using the companion NEXT Strategy Visualizer indicator. While the %K/%D cross alerts can be set via NEXT Stochastic 3xVW indicator, the Strategy Visualizer will only plot long/short signals when %K or %D cross over or under overbought/oversold levels (as hown in the above SPY M1 screenshot). That being said, the next version of the Strategy Visualizer will also support %K/%D crosses.
Here is how to set NEXT Stochastic 3xVW %K/%D crossing alerts: open a chart, attach NEXT Stochastic 3xVW, and right-click on chart -> Add Alert. Condition: Next Stochastic >> %K >> Crossing >> Next Stochastic >> %D
MM DON v2The orginal MM Don was the best algo we created until the V2 Came about
Based on the nnfx trading style this algorithms has many different calculations to provide the best signal and confirmations
1. Up to 3 Baselines that can change between 15 different moving averages and filter out trades for you
2 Strict feature to all baselines and higher time frame signals
3. Strategy presets for easy and best optimal settings for the asset and timeframe
4. Updated support and resistance
5. Updated alerts that send full signals to your phone
6. Updated trading "modes" from Swing to Scalp
7. Added session with strict feature to only show trades during that selected session
8. selectable candle type for easier trend detection
9. Atr risk calculator optimized for Mobile app on trading view
Buy/Sell Alarms for all the moving averages
Breakeven Alarm after tp1 hits
Entry
3 TP
ATR x1.5 Stop Loss auto generated per signal.
Also be able to set tp alarms for both buy/sell entries. so you place your trade and be alerted when your take profits have been hit.
works on all timeframes for scalpers, intraday, or even swing.
effective on binary as well.
Directions are simple
combine simple Market Structure & as long as everything matches (Buy Signal & everything is Grey + baseline is grey) (Sell Signal & everything is Red + Baseline is Red) you can enter the signal generated, exit the trade when told to exit and Manage your trade.
this was made to make trading easy and create confidence with in the trader.
Link below or PM us for access to this indicator Happy Trading
3c.BotPlus-CrossRSIThe original Cross-RSI indicator computes buy/sell momentum based on two binary methods over multiple RSI price maps.
This indicator was initially created for stablecoins scalping but its use is not restricted to stablecoins.
It permits to catch the scalp opportunities when the price is moving quickly inside a range.
Good examples of stablecoins pairs are BUSD-VAI, AMP-USDT, DAI-UST.
The default Smooth Factor is 7. This is should be tuned to the fit the price movement for each pair. Each pair of stablecoins can perform better with a different Smooth Factor.
The Smooth Factor is used to reduce too much frequent signals in ranging periods. Increase the Smooth Factor till 14 to reduce the weaker signals and decrease to catch more signals.
Multi-TimeFrame SignalsI trade binary options on reversals. I use this as a confluence to prove that my analysis is correct. I use this on smaller time frames given the type of trading I do.
I do not use this as an entry trigger, so you should not blindly enter trades based on this solely . You were warned
This indicator (on default settings) will let you know when the 1 minute, 3 minute, and 5 minute timeframes RSI & Stochastics are all in an overbought or oversold state. It shows this by changing the background color on your chart to red (overbought) or green (oversold).
All of these settings are changeable. #winning
I left this as open-source as I figured out how to code this by using other open-source scripts as reference. I am a programmer that uses other languages.
I only published this script as a request from a close friend.
Financial Astrology Indexes ML Daily TrendDaily trend indicator based on financial astrology cycles detected with advanced machine learning techniques for some of the most important market indexes: DJI, UK100, SPX, IBC, IXIC, NI225, BANKNIFTY, NIFTY and GLD fund (not index) for Gold predictions. The daily price trend is forecasted through planets cycles (angular aspects, speed phases, declination zone), fast cycles are based on Moon, Mercury, Venus and Sun and Mid term cycles are based on Mars, Vesta and Ceres . The combination of all this cycles produce a daily price trend prediction that is encoded into a PineScript array using binary format "0 or 1" that represent sell and buy signals respectively. The indicator provides signals since 2021-01-01 to 2022-12-31, the past months signals purpose is to support backtesting of the indicator combined with other technical indicator entries like MAs, RSI or Stochastic . For future predictions besides 2022 a machine learning models re-train phase will be required.
When the signal moving average is increasing from 0 to 1 indicates an increase of buy force, when is decreasing from 1 to 0 indicates an increase in sell force, finally, when is sideways around the 0.4-0.6 area predicts a period of buy/sell forces equilibrium, traders indecision which result in a price congestion within a narrow price range.
We also have published same indicator for Crypto-Currencies research portfolio:
DISCLAIMER: This indicator is experimental and don’t provide financial or investment advice, the main purpose is to demonstrate the predictive power of financial astrology. Any allocation of funds following the documented machine learning model prediction is a high-risk endeavour and it’s the users responsibility to practice healthy risk management according to your situation.
Quantum Cryptocurrency Strength Indicator (CCSI)Exciting new markets require exciting new indicators and with the plethora of cryptocurrencies now available and increasingly being offered through mainstream brokers, at Quantum Trading we thought it was time for us to step in and develop something unique to help traders and investors trading the new kids on the block.
Cryptocurrencies like their more established cousins in forex, are in a constant state of flux moving from overbought to oversold and back again, but at a much faster pace, and generally associated with volatility. The challenge of course is picking those phases of price action where these conditions have been met and so offering the trader two opportunities. Either to take a position ahead of any reversal and so get in early before the trend develops, or alternatively to wait until the trend is underway and then jump in. You can think of this as a train in the station. Do you board early before it leaves, or jump aboard once it is underway? Both approaches have advantages and disadvantages, but the choice is yours.
So, our development team set to work to deliver the perfect indicator to deliver this information for you visually and quickly, and we are proud to announce the Cryptocurrency Strength Indicator or the CCSI for short. And if you thought this looks similar to its hugely popular currency strength indicator for forex then you would be right.
This indicator is of course a little different, though the principles of how to use it can be considered the same. So how does it work? Well, first of all, here we are dealing with a cryptocurrency pair, rather than isolating out the currency itself, as every cryptocurrency is quoted against the USD in some way. In these markets we are seeing the movement of the cryptocurrency against the US dollar and in developing the indicator we have chosen to display this against Tether. In other words, USDT.
The indicator displays seven of the most popular cryptocurrencies against the USDT, but what we have also included in the design is the option to deselect these and select others of your choice, so you have complete control of those cryptocurrencies you wish to trade. In addition, we understand that alerts are a hugely popular function of the TradingView platform, so we have added these in these also. And of course, as you would expect we have included the option to isolate out those of interest. So how do we use the indicator?
First, as you might expect, the cryptocurrency market tends to move ‘en mass’ – in other words generally either moving higher or lower together. You can think of this as an equivalent to the currency matrix in forex, where currencies of one denomination, such as the yen will all move in the same direction if the yen is being bought or sold universally. It is the same here. On occasion, on the faster timeframes, one does see divergence, but as a general rule, they will all tend to move together which is great as it gives you the confidence you are trading in the direction of the entire market. What is important however is the direction of the USDT. This will ALWAYS be in the opposite direction which is why we isolate it out from the others, to reveal precisely how this is moving. Remember, what drives a strong trend is when one currency is rising and another falling in forex and it is exactly the same here. When the USDT is rising strongly and the cryptocurrencies are falling, then a strong trend is underway. Equally, if the USDT is falling strongly then you will see a strong trend in your chosen cryptocurrency.
Next, we look for overbought and oversold opportunities in precisely the same way as for the currency strength indicator. Cryptocurrencies are in a constant state of flux moving from oversold to overbought and back again in all timeframes so there are always plenty of opportunities to employ this tactic and get in early at the start of a new trend. The angle of inclination of the line reveals the strength of the move, but equally, if the cryptocurrencies are moving sideways along with the USDT then we have to wait and be patient. But the beauty of this market is that it genuinely trades twenty-four hours a day, and seven days a week. Trend trading is another great tactic and as soon as the move is underway you can jump on the moving train and join a current trend and with cryptocurrencies, you don’t normally have to wait long as the price action is constant.
However, don’t just think of the Cryptocurrency Strength Indicator as a tool for simply getting you in. It will also help you to stay in and get out at the right time. After all if it’s good enough to get you in then it’s good enough to keep you in also. But remember, when the lines are moving sideways along with the USDT, then it’s a question of being patient and waiting. In other words, it helps to keep you out too.
The indicator works in all timeframes on the TradingView platform from seconds and upwards, so all trading approaches and tactics are catered for with this indicator. It can be used with any instrument whether through a conventional broker or for trading binary options which are extremely popular, and of course cryptocurrency futures too.
Financial Astrology Crypto ML Daily TrendThis daily trend indicator is based on financial astrology cycles detected with advanced machine learning techniques for the crypto-currencies research portfolio: ADA, BAT, BNB, BTC, DASH, EOS, ETC, ETH, LINK, LTC, XLM, XMR, XRP, ZEC and ZRX. The daily price trend is forecasted through this planets cycles (angular aspects, speed, declination), fast ones are based on Moon, Mercury, Venus and Sun and Mid term cycles are based on Mars, Vesta and Ceres. The combination of all this cycles produce a daily price trend prediction that is encoded into a PineScript array using binary format "0 or 1" that represent sell and buy signals respectively. The indicator provides signals since 2021-01-01 to 2022-12-31, the past months signals purpose is to support backtesting of the indicator combined with other technical indicator entries like MAs, RSI or Stochastic. For future predictions besides 2022 a machine learning models re-train phase will be required.
The resolution of this indicator is 1D, you can tune a parameter where you can determine how many future bars of daily trend are plotted and adjust an hours shift to anticipate future signals into current bar in order to produce a leading indicator effect to anticipate the trend changes with some hours of anticipation. Combined with technical analysis indicators this daily trend is very powerful because can help to produce approximately 60% of profitable signals based on the backtesting results. You can look at our open source Github repositories to validate accuracy using the backtesting strategies we have implemented in Jesse Crypto Trading Framework as proof of concept of the predictive potential of this indicator. Alternatively, we have implemented a PineScript strategy that use this indicator, just consider that we are pending to do signals update to the period July 2021 to December 2022: This strategy have accumulated more than 110 likes and many traders have validated the predictive power of Financial Astrology.
DISCLAIMER: This indicator is experimental and don’t provide financial or investment advice, the main purpose is to demonstrate the predictive power of financial astrology. Any allocation of funds following the documented machine learning model prediction is a high-risk endeavour and it’s the users responsibility to practice healthy risk management according to your situation.
I Ching Hexagrams Part 2IMPORTANT!
Get the other indicator I Ching Hexagrams Part 1 for the full set!
Here is the first half of the I Ching's hexagrams.
Each candle generates a hexagram at close, based on that candle and the previous 5.
A green candle is yang and a red candle is yin.
In this way, price action generates a hexagram.
Use this to generate a hexagram for the day or even to find interesting patterns to trade.
Have fun!
I Ching Hexagrams Part 1IMPORTANT!
Get the other indicator I Ching Hexagrams Part 2 for the full set!
Here is the first half of the I Ching's hexagrams.
Each candle generates a hexagram at close, based on that candle and the previous 5.
A green candle is yang and a red candle is yin.
In this way, price action generates a hexagram.
Use this to generate a hexagram for the day or even to find interesting patterns to trade.
Have fun!
MM Scalper A scalpers Dream just like my other algorithms you have your SL, 2TPs, and entry points to scalp the market based on these two MoneyMoves Moving averages.
can use
Entry
2 TP
ATR x1.5 or x2 Stop Loss auto generated per signal.
BB Bands, TMA Bands, Donchain channels, or volatility cloud
MTF support and resistance
pivot high/low
works on all timeframes for scalpers, intraday, or even swing.
effective on binary as well.
Directions are simple
when one Ma crosses the other you will receive a signal with all your inputs
the signals change based on the length you set on the Baseline and Slop
use market structure and its it a sure winner
Link below or PM us for access to this indicator Happy Trading
B3 PSAR v4This is an update to Pinescript version 4 for one of my oldest indicators, Parabolic Stop and Reverse.
The indicator math and algorithm has not been modified, but the stylization and usage has improved.
Added:
Bar-coloring = User sets the up and down colors in user interface style menu.
Inputs = The two inputs' up-down arrows now increment by thousandths & hundredths respectively. This is a vast improvement! Just leave the UI up when fishing for a value and watch the chart change.
Alerts!!! = Set your alerts to "B3 PSAR" then "Any alert() function call" in your Alerts User Interface; and you can also quickly turn alerts on/off in the PSAR indicator's UI.
Important Note:
TradingView has a version of PSAR, and you may find other scripters make the indicator as well.
People make claims on what math or algorithm is correct and what were Wilder's intentions for the indicator.
I am not interested in the theory, MY VERSION OF PSAR MATCHES OTHER PLATFORMS' CHART RESULTS for their native PSAR (Tradestation, TOS, etc). ;-)
Text copied from the obsolete posts:
Version 1 notes:
I have seen Parabolic SAR done several ways in the past and on several platforms. I have a few trailing systems I use to have a time-affected stop, meaning that as time goes, the way the stop works changes. In this method, you have a stop starting off of the high or low at the time of the cross of the previous stop, giving you a binary flipping agent. I like the usage of this system upon trendy action, however, in sideways action, the indicator flips back and forth with no pertinence. The flat lines represent the last price that was crossed, and as the PSAR crosses the line you essentially lock in profits in the trend.
Version 2 notes:
The minimum value inputs for acceleration and limiter inputs have been set to zero, by P.M. request.
Technical Ratings Pro - Pump WaveThis script uses the built in Technical Ratings indicator but interprets the data visually. It plots the results for "total", "MA" and "other" as pump waves. It uses MA to plot a trend line (can be turned off in settings) . Candles are colored to the rating strength and a percentage number was added to the results. For more informations on the Technical Ratings indicator please refer to official documentation.
Money Heist• This strategy is based off of Matthew Thayers Cashtrap Strategy.
• Market Timing markers based off of Evan Cabrals Market Timing Strategy.
• Psychological Support and Resistance Levels as well as 4 Hour High and Low Support and Resistance Levels.
• The Bollinger Bands will turn Red for Resistance and Green for Support when the Market is Consolidating. The bands will turn Red at the Bottom and Green at the Top when the Market is in a Heavy Trend.
• There is a 50 ema and 200 ema used to determine the trend of price and can also be used as support and resistance
• Two types of arrows can be used by heading to the settings and choosing one or the other. Either Conditional arrows based on a point system (3 being the highest) can be used or Regular CashTrap Arrows. Arrows should be used to confirm trade not as a the only reason to take a trade
PUT
Price should be below 50 EMA and 200EMA touching Top Red Bollinger Band at a Resistance level
CALL
Price should be above 50 EMA and 200EMA touching Bottom Green Bollinger Band at a Support Level
**This Strategy Is To Be Used With The Momentum RSI, Stochastic+, and RSI+**
MM DonBased on the nnfx trading style this algorithms has many different calculations to provide the best signal and confirmations
1. The SuperSmooth Forecast Moving Average
2. TrendLine Moving Average
3. Smoothed Heiken Ashi Moving Average
4. Baseline that can change between 15 different moving averages
Buy/Sell Alarms for all the moving averages
Exit buy/sell Alarms
Entry
3 TP
ATR x1.5 Stop Loss auto generated per signal.
Also be able to set tp alarms for both buy/sell entries. so you place your trade and be alerted when your take profits have been hit.
works on all timeframes for scalpers, intraday, or even swing.
effective on binary as well.
Directions are simple
combine simple Market Structure & as long as everything matches (Buy Signal & everything is blue + baseline is white) (Sell Signal & everything is Red + Baseline is Red) you can enter the signal generated, exit the trade when told to exit and Manage your trade.
this was made to make trading easy and create confidence with in the trader.
Link below or PM us for access to this indicator Happy Trading
YouKnowTheVibesThis is mainly used for trading binary options but can be used for regular forex trading as well. If price is above BOTH EMAs and PSAR then you're looking for BUY opportunities. If price is below then you're looking for sell opportunities. Wait for price to break the most recent fractal high/low and retest; wait for a confirmation candle then enter a call/put and the expiry time is THREE candles.
Technical checklistNo one indicator is perfect. People always have their favorite indicators and maintain a bias on weighing them purely on psychological reasons other than mathematical. This technical checklist indicator collected 20 common indicators and custom ones to address the issue of a bias weighted decision.
Here, I apply machine learning using a simple sigmoid neuron network with one hidden layer and a single node to avoid artifacts. For the ease of data collection, the indicator matrix is first shown as a heatmap. Once an uptrend signal window is selected manually, an indicator matrix can be recorded in a binary format (i.e., 1 0 0 1 1 0, etc.).
For example, the following indicator matrix was retrieved from the MRNA chart (deciscion: first 5 rows, buying; last 5 rows, no buying):
1 1 0 0 0 1 1 1 1 1 0 1 0 0 1 1 0 1 1 1
1 1 0 0 1 1 1 0 0 0 1 0 1 1 0 1 0 1 1 1
0 0 1 1 0 1 0 0 0 1 1 1 0 0 1 0 0 1 0 0
1 1 0 0 0 1 1 1 1 1 1 0 1 0 0 1 0 1 0 0
0 0 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 0 0
1 1 0 0 1 0 1 0 0 0 0 1 0 0 0 1 0 0 1 1
1 1 0 0 0 0 1 0 0 0 0 1 0 0 1 1 0 1 1 1
0 0 0 0 1 0 1 0 0 1 1 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 1 1
0 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 0 1 1 1
This matrix is then used as an input to train the machine learning network. With a correlated buying decision matrix as an output:
1
1
1
1
1
0
0
0
0
0
After training, the corrected weight matrix can be applied back to the indicator. And the display mode can be changed from a heatmap into a histogram to reveal buying signals visually.
Usage:
python stock_ml.py mrna_input.txt output.txt
Weight matrix output:
1.37639407
1.67969656
1.0162141
1.3184323
-1.88888442
8.32928588
-5.35777295
3.08739916
3.06464844
0.82986227
-0.53092333
-1.95045383
4.14441698
2.99179435
-0.08379438
1.70379704
0.4173048
-1.51870972
-2.14284707
-2.08513252
Corresponding indicators to the weight matrix:
1. Breakout
2. Reversal
3. Crossover of ema20 and ema60
4. Crossover of ema20 and ema120
5. MACD golden cross
6. Long cycle (MACD crossover 0)
7. RSI not overbought
8. KD not overbought and crossover
9. OBV uptrend
10. Bullish gap
11. High volume
12. Breakout up fractal
13. Rebounce of down fractal
14. Convergence
15. Turbulence reversal
16. Low resistance
17. Bullish trend (blue zone)
18. Bearish trend (red zone)
19. VIX close above ema20
20. SPY close below ema20
PS. It is recommended not to use default settings but to train your weight matrix based on underlying and timeframe.
Machine Learning: Logistic RegressionMulti-timeframe Strategy based on Logistic Regression algorithm
Description:
This strategy uses a classic machine learning algorithm that came from statistics - Logistic Regression (LR).
The first and most important thing about logistic regression is that it is not a 'Regression' but a 'Classification' algorithm. The name itself is somewhat misleading. Regression gives a continuous numeric output but most of the time we need the output in classes (i.e. categorical, discrete). For example, we want to classify emails into “spam” or 'not spam', classify treatment into “success” or 'failure', classify statement into “right” or 'wrong', classify election data into 'fraudulent vote' or 'non-fraudulent vote', classify market move into 'long' or 'short' and so on. These are the examples of logistic regression having a binary output (also called dichotomous).
You can also think of logistic regression as a special case of linear regression when the outcome variable is categorical, where we are using log of odds as dependent variable. In simple words, it predicts the probability of occurrence of an event by fitting data to a logit function.
Basically, the theory behind Logistic Regression is very similar to the one from Linear Regression, where we seek to draw a best-fitting line over data points, but in Logistic Regression, we don’t directly fit a straight line to our data like in linear regression. Instead, we fit a S shaped curve, called Sigmoid, to our observations, that best SEPARATES data points. Technically speaking, the main goal of building the model is to find the parameters (weights) using gradient descent.
In this script the LR algorithm is retrained on each new bar trying to classify it into one of the two categories. This is done via the logistic_regression function by updating the weights w in the loop that continues for iterations number of times. In the end the weights are passed through the sigmoid function, yielding a prediction.
Mind that some assets require to modify the script's input parameters. For instance, when used with BTCUSD and USDJPY, the 'Normalization Lookback' parameter should be set down to 4 (2,...,5..), and optionally the 'Use Price Data for Signal Generation?' parameter should be checked. The defaults were tested with EURUSD.
Note: TradingViews's playback feature helps to see this strategy in action.
Warning: Signals ARE repainting.
Style tags: Trend Following, Trend Analysis
Asset class: Equities, Futures, ETFs, Currencies and Commodities
Dataset: FX Minutes/Hours/Days