The hassle was I needed to manually train it to understand what I wanna read. I trained it using 50 articles and to my surprise, it's enough.
I've been reading a book called The Road to Ruin by Jim Rickards. He described how he got to his conclusion of how the stock market works by using Complexity Theory. Bill Williams would agree. Jim tells us that by using just enough data, we calculate the probability of an event to occur. We can't say for sure when but we know it's coming. This was my light bulb moment.
While Jim talks much about Bayesian Inference in which a probability of an event can always be updated as more evidence comes to light, I had my eyes set on binary probabilities of when prices are going up and down.
These are my assumptions:
- Prices breaking up a Bollinger basis line will have fuel to go up even higher
- Prices will go down when prices have broken up a Bollinger upper band
- Scalping is the main method so we should use a lower period Moving Average (MA)
- When prices are above MA, it's likelier a correction to the downside is imminent
- When prices are below MA, it's likelier a correction to the upside is imminent
- Optimize parameters for 1 hour timeframe which will give us time to react while still having more opportunities to trade
Jim Rickards started with limited data (events) while in technical trading, data are plentiful. I decided to classify 2 events which are:
- Next candles would be breaking up
- Next candles would be breaking down
- We won't know for sure when prices are going to break
- We won't know for sure how much the prices movements are going to be
Pr(Up|Indicator) = Pr(Indicator|Up) * Pr(Up) / Pr(Indicator|Up) * Pr(Up) + Pr(Indicator|Down) * Pr(Down)
Pr(Down|Indicator) = Pr(Indicator|Down) * Pr(Down) / Pr(Indicator|Down) * Pr(Down) + Pr(Indicator|Up) * Pr(Up)
Reading The Oscillator
- Green is the probability of prices breaking up
- Red is the probability of prices breaking down
- When either green or red is flatlining ceiling, immediately on the next candle when the probability decreases go short or long based on which direction you're observing - Strong Signal
- When either green or red is flatlining ceiling, take no action while it's ceiled
- Usually when either green or red is flatlining bottom, the next candle when the probability increases, immediately take a short long position based on the direction you're observing - Weak Signal
- When either green or red is flatlining bottom, take no action while it's bottomed
Use Once per Bar option when generating alerts.
This update changes how the oscillator is read. After tinkering with the indicator for a bit, I added a new probability called Prime Probability which is a combination of bot classifiers probabilities. A lower threshold is also added to define uncertainty or sideways movements. By adding these, we read the oscillator like below:
- Sideways or uncertainty is represented when the lower threshold area is colored gray, be very cautious when entering trades in this condition
- When prime probability changes from zero to a value above the lower threshold, a long signal is fired
- When breaking up probability changes from 100% to a value less than 100%, a long signal is fired
- When prime probability changes from a value above the lower threshold to zero, a short signal is fired
- When breaking down probability changes from 100% to a value less than 100%, a short signal is fired
All the long and short signals are strong signal provided that at the time the signal fires, probabilities tells us we're not in a sideways movement. Weaker signals although excluded from the indicator signals can be determined like below:
- When prime probability changes from zero or close to zero to a value within the lower threshold, this is a weak long signal
- When breaking up probability changes from a value above the lower threshold to a value less than the previous candle, this is a weak long signal
- When prime probability changes from a value within the lower threshold to zero or close to zero, this is a weak short signal
- When breaking down probability changes from a value above the lower threshold to a value less than the previous, this is a weak short signal
Play around with the lower threshold to find a suitable value. The default values in this indicator are derived from BTCUSDT in Binance at 1H timeframe.
Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.