Buy/Sell Aggregated Delta Pressure - InFinitoModified & Updated script from MARKET VOLUME by Ricardo M Arjona @XeL_Arjona that Includes Aggregated Volume , Delta Buy/Sell Pressure
Aggregation code originally from Crypt0rus
***The indicator can be used for any coin/symbol to aggregate volume , but it has to be set up manually***
***The indicator can be used with specific symbol data only by disabling the aggregation option, which allows for it to be used on any symbol***
- Calculated based on Aggregated Volume instead of by symbol volume . Using aggregated data makes it more accurate and allows to compare volume flow between different kinds of markets (Spot, Futures , Perpetuals, Futures+Perpetuals and All Volume ).
- As well, in order to make the data as accurate as possible, the data from each exchange aggregated is normalized to report always in terms of 1 BTC . In case this indicator is used for another symbol, the calculations can be adjusted manually to make it always report data in terms of 1 contract/coin.
- Buy/Sell Pressure: Smoothens the buy and sell volume into a signal for each. Which makes it easier to identify Buy and Sell Volume Flow.
- Buy/Sell Delta Pressure: Calculates the difference between Buy & Sell Pressure and plots a Delta signal that shows who is in control currently.
- Buy/Sell + Delta Pressure: Displays both Buy & Sell Pressure and Delta pressure. This can help to visualize who is in control but also how much pressure there is on each side.
- A Moving Average can be plotted to the Delta pressure. This, with confluence, can give great entries/exits
Things to look for:
- Divergences: If price keeps moving in one direction but the pressure to that side decreases it can be inferred that the move might slow down soon or revert. As well if pressure to one side increases but price does not react to it, it signals that the other side is stronger.
- MA/Zero Crossovers: Delta Pressure Crossover of its moving average or the 0 Line can indicate direction changes prematurely
Trading
Aggregated Volume Based Coloured Bars - InFinitoModified version of Kivanc's Volume Based Colored Bars that colors the bars with Aggregated Volume Data.
Aggregation code originally from Crypt0rus
***The indicator can be used for any coin/symbol to aggregate volume , but it has to be set up manually***
***The indicator can be used with specific symbol data only by disabling the aggregation option, which allows for it to be used on any symbol***
- Calculated based on Aggregated Volume instead of by symbol volume . Using aggregated data makes it more accurate and allows to see if the move was supported (Volume-wise) in all exchanges.
- As well, in order to make the data as accurate as possible, the data from each exchange aggregated is normalized to report always in terms of 1 BTC . In case this indicator is used for another symbol, the calculations can be adjusted manually to make it always report data in terms of 1 contract/coin.
MZ Adaptive Ichimoku Cloud (Volume, Volatility, Chikou Filter) This study is a functional enhancement to conventionally used Ichimoku Clouds . It uses particular effective adaptive parameters (Relative Volume Strength Index (MZ RVSI ), Volatility and Chikou Backward Trend Filter) to adapt dynamic lengths for Kijun-sen, Tenkan-sen, Senkou-span and Chikou .
This study uses complete available Ichimoku Clouds trading methodology to provide trade confirmations. Its still in experimental phase so will be updated accordingly.
ADAPTIVE LENGTH PARAMETERS
Relative Volume Strength Index (MZ RVSI )
For adaptive length, I tried using Volume and for this purpose I used my Relative Volume Strength Index " RVSI " indicator. RVSI is the best way to detect if Volume is going for a breakout or not and based on that indication length changes.
RVSI breaking above provided value would indicate Volume breakout and hence dynamic length would accordingly make Ichimoku Clouds more over-fitted to better act as support and resistance . Similar case would happen if Volume goes down and dynamic length becomes more under-fit.
Original RVSI Library and study can be found here:
Volatility
Average true range is used as volatility measurement and detection tool. Dual ATR condition would decide over-fitting or under-fitting of curve.
Chikou Backward Trend Filter
Chikou is basically close value of ticker offset to close and it is a good for indicating if close value has crossed potential Support/Resistance zone from past. Chikou is usually used with 26 period.
Chikou filter uses a lookback length calculated from provided lookback percentage and checks if trend was bullish or bearish within that lookback period.
Original Chikou Filter library and study can be found here:
ADAPTIVE ICHIMOKU CLOUD
Tenkan-Sen (Conversion Line)
Tenkan-sen is a moving average that is calculated by taking the average of the high and the low for the last nine periods conventionally but in this study its length is dynamically adapted based on Volume, Volatility and Chikou filter. Default adaption range is set to 9-30 which I found universally applicable to almost every market on all time-frames.
Kijun-Sen (Base Line)
The Kijun-Sen is usually considered a support/resistance line which also acts as an indicator of price movements in the future and takes a longer period into consideration, usually 26 periods compared to Tenkan-Sen’s nine periods is used conventionally. In this study, its length is set to vary in range of 20-60 based on adaptive parameters.
Senkou-Span (Leading Span)
Senkou-Span A : Senkou Span A is the average of the highs and lows of Tenkan-Sen and Kijun-Sen so it automatically adapts accroding to dynamic lengths of Tenkan and Kijun.
Senkou-Span B : Senkou Span B is usually calculated by averaging highs and lows of the past 52 periods and plotting it 26 points to the right but this study uses adaptive parameters to adapt its dynamic length in range of 50-120 which makes Kumo (Ichimoku Cloud) a better area for support and resistance. I don’t consider its necessary to adapt Kumo’s displacement to the right, so I used conventional 26 period as offset.
Chikou -Span (Lagging Span)
The Chikou Span, also known as the lagging span is formed by taking the price source and offsetting it back 26 periods to the left but I used adaptive length in range 26-50 which makes this tool a better option to check for Chikou -Price cross check in wide range.
TRADE SIGNALS & CONFIRMATIONS
Volume : RVSI used to detect volume breakout about given point. By default, On Balance Volume based RVSI is selected for all dynamic length adaption and also for trade confirmations.
Cross(Tenkan,Kijun) : Easiest way to detect trend as if Tenkan is above Kijun then market is uptrend and vice versa.
Volatility : High volatility is a good way to confirm if price is on the move or not.
Tenkan = Kijun : Because of a wide range of Tenkan and Kijun length; their value can become equal before reversal.
Chikou > Source : A very conventional way to detect price momentum as if Chikou is above price then market is in uptrend and vice versa.
Chikou Momentum : Another simpler way to represent Chikou > Source as if momentum of price source is uptrend then price will tend to follow.
Source > Kumo : Using the best tool of Ichimoku Clouds i.e. Kumo. If price crosses both Senkou-Span A & B then market has broken potential resistance leading to a good uptrend and vice versa.
Source > Tenkan : Better way to detect price trend in short term.
Chikou Backward Trend Filter : Different from Chikou >Source in a way that Chikou filter makes sure that price crosses highest/lowest within defined period.
CHARTING
Bars Coloring : Bars coloring is set as following :
src > tenkan-Sen and src > kijun-Sen : Strong uptrend detection and shown by green bars.
src < tenkan-Sen and src < kijun-Sen : Strong downtrend detection and shown by green bars.
src > tenkan-Sen and src < kijun-Sen : Better way to detect bottom reversals as if price comes above tenkan but remains below kijun; that’s early signs of recovery. Light red bars are used for this by default.
src < tenkan-Sen and src > kijun-Sen : Better way to detect top reversals as if price comes below tenkan but remains above kijun; that’s early signs of losing potential in uptrend. Dark Grey bars are used for this by default.
Kumo Coloring : Following steps are used to derive Kumo’s dynamic color:
Average of Senkou-span A and B is calculated.
RSI with 14 period of that average is calculated.
Gradient color based on calculated RSI values with 0-100 range is derived which is final Kumo color.
Chikou Span Coloring : Dynamic coloring from Chikou Filter is used as Indicator’s Chikou ’s color.
Signals Overlay : Red and Green small triangles are used as signals overlay.
Botvenko ScriptI just test&learn pine script...
Damn, what should I write here? So... Its just a differense between the logarithms of two prices of different periods (You can set the period you want)... And it looks really nice... Ahem...
I hope, you enjoy this piece of... Have a nice day, my dear.
Aggregated Money Flow Index - InFinitoModified Version of In-Built Money Flow Index Indicator. Aggregated Volume is used for it's calculation + a couple of other features.
Aggregation code originally from Crypt0rus
***The indicator can be used for any coin/symbol to aggregate volume , but it has to be set up manually***
***The indicator can be used with specific symbol data only by disabling the aggregation option, which allows for it to be used on any symbol***
- Calculated based on Aggregated Volume instead of by symbol volume . Using aggregated data makes it more accurate and allows to compare volume flow between different kinds of markets (Spot, Futures , Perpetuals, Futures+Perpetuals and All Volume ).
- As well, in order to make the data as accurate as possible, the data from each exchange aggregated is normalized to report always in terms of 1 BTC . In case this indicator is used for another symbol, the calculations can be adjusted manually to make it always report data in terms of 1 contract/coin.
- Added Moving Average ( SMA , EMA , WMA , RMA, VWMA ) that can be plotted to the MFI
- Added 10/90 level and 45/55 range level
Things to look for:
- Divergences: Can be a very good reversal signal
- MA crossovers & Oversold/Overbought levels crossover: With proper confluence, entering a position at MA crossover and exiting at oversold/overbought levels can give very good swing setups (Or scalps on LTF)
- Center range retests: Once in a trend, retesting the middle range can give very good entries and confirmations of the trend
- Confluence of the latter: In combination, if more than one of these occur at the same time it can give more clarity regarding the current state of the market.
Aggregated Chaikin Money Flow - InFinitoModified Version of In-Built Chaikin Money Flow Indicator. Aggregated Volume is used for it's calculation + a couple of other features.
Aggregation code originally from Crypt0rus
***The indicator can be used for any coin/symbol to aggregate volume , but it has to be set up manually***
***The indicator can be used with specific symbol data only by disabling the aggregation option, which allows for it to be used on any symbol***
- Calculated based on Aggregated Volume instead of by symbol volume. Using aggregated data makes it more accurate and allows to compare volume flow between different kinds of markets (Spot, Futures , Perpetuals, Futures+Perpetuals and All Volume ).
- As well, in order to make the data as accurate as possible, the data from each exchange aggregated is normalized to report always in terms of 1 BTC. In case this indicator is used for another symbol, the calculations can be adjusted manually to make it always report data in terms of 1 contract/coin.
- Added Moving Average ( SMA , EMA , WMA , RMA, VWMA) that can be plotted to the CMF
- Changed 0 line to a small range which tends to be more relevant than the 0 line. This range can be manually modified
Things to look for:
- Divergences: Can be a very good reversal signal
- MA crossovers: Can be a very good confluent Buy/Sell signal
- Center range retests: CMF is normally defined as bullish above 0 and bearish below 0. In this case it is above or below the middle range. Even if the start of the move was missed. The retest of the middle range can give very good entries.
- Confluence of the latter
Aggregated On Balance Volume - InFinitoOn Balance Volume calculated with aggregated and normalized volume data and a few other features:
Aggregation code originally from Crypt0rus
Candle Plotting code from LonesomeTheBlue
***The indicator can be used for any coin/symbol to aggregate volume, but it has to be set up manually***
As normal OBV, this indicator can be used to find divergences and to have an idea of volume flow. Using aggregated data makes it more accurate and allows to compare volume flow between different kinds of markets (Spot, Futures, Perpetuals, Futures+Perpetuals and All Volume).
As well, in order to make the data as accurate as possible, the data from each exchange aggregated is normalized to report always in terms of 1 BTC. In case this indicator is used for another symbol, the calculations can be adjusted manually to make it always report data in terms of 1 contract/coin.
Extra features:
- Based off LonesomeTheBlue, OBV can be plotted as candles and as Heiken Aishi candles (which give wick information)
- A Moving Average (SMA, EMA, WMA, RMA, VWMA) can be plotted to the OBV. This can be used as a confluent signal to enter a trade on a crossover or to know the strength of the current move.
- The OBV basis can be reset to 0 periodically, making it more oscillator-like and allowing to focus only on a certain period of time.
TRADING MADE SIMPLEThis indicator shows market structure. The standard method of using Williams Highs and Lows as pivots, is something of an approximation.
What's original here is that we follow rules to confirm Local Highs and Local Lows, and strictly enforce that a Low can only follow a confirmed High and vice-versa.
-- Highs and Lows
To confirm a candle as a Local High, you need a later candle to Close below its Low. To confirm a Local Low, you need a Close above its High.
A Low can only follow a High (after it's been confirmed). You can't go e.g High, High, Low, Low, only High, Low, High, Low.
When price makes Higher Highs and Higher Lows, market structure is said to be bullish. When price makes Lower Lows and Lower Highs, it's bearish.
I've defined the in-between Highs and Lows as "Ranging", meaning, neutral. They could be trend continuation or reversal.
-- Bullish/Bearish Breaks
A Bullish break in market structure is when the Close of the current candle goes higher than the previous confirmed Local High.
A Bearish Break is when the Close of the current candle goes lower than the most recent confirmed Local Low.
I chose to use Close rather than High to reduce edge case weirdness. The breaking candle often ends up being a big one, thus the close of that candle can be a poor entry.
You can get live warnings by setting the alert to Options: Only Once, because during a candle, the current price is taken as the Close.
Breaks are like early warnings of a change in market bias, because you're not waiting for a High or Low to be formed and confirmed.
Buy The Dip / Sell The Rally
Buy The Dip is a label I gave to the first Higher Low in a bullish market structure. Sell The Rally is the first Lower High in a bearish market structure.
These *might* be good buying/selling opportunities, but you still need to do your own analysis to confirm that.
== USAGE ==
The point of knowing market structure is so you don't make bullish bets in a bearish market and vice versa -
or if you do at least you're aware that that's what you're doing, and hopefully have some overwhelmingly good reason to do so.
These are not signals to be traded on their own. You still need a trade thesis. Use with support & resistance and your other favourite indicators.
Works on any market on any timeframe. Be aware that market structure will be different on different timeframes.
IMPORTANT: If you're not seeing what you expect, check your settings and re-read this entire description carefully. Confirming Highs and Lows can get deceptively complex.
AltSessionHello World
It’s no secret that trading sessions play a massive role in market movement and liquidity. We can clearly see in the image about how important identifying international trading hours are for a trader.
The Asian session starts around 1am GMT and often has a bearish bias through this session lasting for a few hours, after which Frankfurt and London traders start to come online and can often reverse the Asian sentiment.
The London session is the best session to trade traditionally starting around 7am GMT before the American traders come online and reverse market once again.
We have designed this indicator to help identify different trading hours easily with a background shade on the chart and also high/lows of the training session, as these levels can often be revisited.
We hope you find this indicator useful and please feel free to drop a comment if you have any updates you wish to be made or any future indicator script ideas, thank you.
Chikou Filter for Ichimoku CloudThis Indicator enhances functionality of Chikou-Span from Ichimoku Cloud using a simple trend filter.
Methodology
Chikou is basically close value of ticker offset to close and it is a good for indicating if close value has crossed potential Support/Resistance zone from past. Chikou is usually used with 26 period.
Chikou filter uses a lookback length calculated from provided lookback percentage and checks if trend was bullish or bearish within that lookback period.
Bullish : Trend is bullish if Chikou span is above high values of all candles within defined lookback period. Green color shows bullish trend.
Bearish: Trend is bearish if Chikou span is below low values of all candles within defined lookback period. This is indicated by red color.
Reversal / Choppiness : White color indicates that Chikou are swinging around candles within defined lookback period which is an indication of consolidation or trend reversal.
Default Settings
Different source types are included but I've found that (OHLC4+High+Low)/3 is better for Chikou and Symmetrically Weighted Moving Average (SWMA) is also applied but it produce some repainting though. Default period is set to 26 and lookback percentage is 50%. Low percentage would decrease filter's efficiency.
Usage
This filter can be used to check if Chikou crossover has occurred in past. This can be used with Donchain channels, Bollinger Bands or any Moving Average as replacement of High / Low values. I'll use this indicator in all my Ichimoku Cloud studies especially adaptive ones. Filter outputs in Color and Integer format; both can be used as signals definitions.
Ichimoku Cloud DistanceAn alternative way to look at the Ichimoku Cloud with various modes:
Distance to Center: the various lines of the Ichimoku system are displayed as the distance to the center of the cloud in percentage terms. 0 is the center of the cloud.
Distance to Edge: lines are displayed as the distance to the closest edge of the cloud in percentage terms. values inside the cloud are displayed as 0.
Hybrid: values outside of the cloud behave as the 'Distance to Edge' mode, values inside behave as 'Distance to Center' mode. The values outside the cloud are scaled by the supplied scale factor in order to make things more readable. Best value for this scale factor is chart/timeframe dependent. The interval from -1 to 1 is equivalent to the bottom and top of the cloud respectively; 0 is the center.
The background color is the color of the cloud.
[TTI] ATR channelsHISTORY AND CREDITS
Used by John Carter in his indicator’s toolbox. The ATR channels or the Keltner Channels represent the railroads or the natural movement of stocks.
WHAT IT DOES
Movements between the the The first multiplier lines (white) represent standard movement for the timeframe you are trading. Movements between the second multiplier (green/red lines) represent a 2stdv move of the stock in a single direction. Once a stock starts reaching the 3rd multiplier lines there’s an exponential chance that it will revert to the mean (cyan line)
Additionally, we have added the Institutional lines. These are thought in a Small Account Mastery class 2019 by John Carter, as the levels heavily watched by institutions. The default settings represent what John is teaching but they can be further customised.
HOW TO USE IT
ATRs channels or Keltner Channels can be great source for target or stop losses and can be used as a indicator for confluence with other technical tools like the Fibonacci lines.
Volatility ContractionVolatility Contraction is a strong trading setup for Positional Traders. It works on following time frame: Daily, Weekly and Monthly.
StocksDeveloper_AutoTraderWebLibrary "StocksDeveloper_AutoTraderWeb"
AutoTrader Web trading API functions implementation for Trading View.
preparePlaceOrderJson(account, symbol, group, variety) Prepare a place order json
Parameters:
account : Pseudo or group account number
symbol : AutoTrader Web's stock/derivative symbol
group : Set it to true to use group account (Default: false)
variety : Variety (Default: REGULAR)
Returns: A json message for the given order data
preparePlaceOrderAlertUsingOrderJson(orderJsonArray) Prepare a place order alert message using order json array
Parameters:
orderJsonArray : Order json can contain one or more orders
Returns: A complete alert message to place orders
preparePlaceOrderAlertMessage(account, symbol, group, variety, validity) Prepare a place order alert json message
Parameters:
account : Pseudo or group account number
symbol : AutoTrader Web's stock/derivative symbol
group : Set it to true to use group account (Default: false)
variety : Variety (Default: REGULAR)
validity : Validity (Default: DAY)
Returns: A complete alert message to place orders
RSI StrategySimple way how to use RSI and MA indicators for trading.
What we use:
• RSI
• SMA calculated by RSI (title: SMA_RSI)
• Delta of RSI and SMA_RSI (title: delta)
• SMA calculated by delta of RSI and SMA & RSI (title: SMA_RSI2)
Logic:
Upon the fact that we use the difference between two indicators that have similar values ( RSI and SMA_RSI), we get number around zero. Next, result is smoothed by calculated the SMA . This is the blue/purple line that appears on the chart - SMA_RSI2.
The trade open when SMA_RSI2 cross over the threshold. The trade close when SMA_RSI2 cross under the threshold below.
Also, the usual EMA 200 is used as a filter, which you can switch on or switch off.
TradingGroundhog - Fundamental Analysis - Multiple RSI Ema(Script Available Version of my previous Fundamental Analysis - Multiple RSI Ema )
As the number of crypto currencies is expanding, we need to find the one which will boom in the next months, weeks or even days.
Therefore, I present to you a Fundamental Analysis tool based on RSI built in order to compare the RSI between the diverse cryptocurrencies.
When cryptocurrencies start to trend, become active, minable and especially "buyable", people are investing their money into them.
As a result,the Daily RSI rises and the price of the crypto in question increases steadily.
With "Fundamental Analysis - Multiple RSI EMA" you can :
Follow up to 20 RSI from different exchanges at the same time.
Find easily Increasing/Decreasing RSI as the lines get transparent if their RSI decrease.
You can also select market with high potential of booming as :
Booming Market : 60 < Daily RSI <= 100 (Strong green background)
Potent Market : 55 < Daily RSI <= 60 (Light green background)
Sleepy Market : 50 < Daily RSI <= 55 (Light red background)
Dying Market : 0 < Daily RSI <= 50 (Strong red background)
Futur booming crypto will go from the Potent Market to the Booming Market
Can be used with the following time frames depending on the necessity:
4H
Daily (Preferred)
Weekly
Monthly
Good trades !
Disclaimer (As it should always be one to any script)
***
This script is intended for and only to be used for personal purposes only. No such information provided by it constitutes advice or a recommendation for any investment or trading strategy for any specific person. There is no guarantee presented or implied as to the accuracy of specific forecasts, projections, or predictive statements offered by the script. Users of the script agree that its original developer does not take responsibility for any of your investment decisions. Please seek professional advice before trading.
***
Fibonacci Moving AverageThe Fibonacci Moving Average is a powerful indicator that takes into account many underlying moving averages to give out an approximate short-term/long-term view of the markets. Its strength lies with dynamic support and resistance levels. I have created this indicator in order to improve trend-following entry positions.
ATR-Adjusted RSIThis indicator adjusts the RSI values using the Average True Range. It is used the same way as a normal RSI.
Security. Scalp Adviser by Antony SavacheGreat script for quick deals. Buy and after 5 minutes sell with a target yield of 0.3%
Works on the principle of getting out of the pit. The pit is determined thanks to the rsi on the 15-minute time frame, the exit is determined by the rsi on the 1-minute timeframe. You can play with the rci values in the settings
Binary Option Strategy Tester with MartingaleIn Binary options, strategy testing is a bit different. The script is just a try to test Binary options strategies.
Assumption:
We are opening position at next candle after signal come
We are taking the position at opening price
Our call will be profitable if we get a green candle and put will be profitable if we get a red candle
We can open only one trade at a time. So if we are in trade, subsequent signals will be ignored.
The script is not counting your profit or loss, it just counting the winning and losing trades.
Input Options:
Choose long only or short only test. Default is both.
You can continue your trade with Martingale Level, up to 5. Default is 1 (no Martingale)
You can choose Martingale trade type
SAME: if call subsequent trade will be call only and vice versa
OPPOSITE: if call subsequent trade will be put
FOLLOW CANDLE COLOR: Subsequent trade will follow previous candle color
OPPOSITE CANDLE COLOR: Subsequent trade will opposite of previous candle color
You can choose trading session to test. Default is false.
The strategy is taken from Vdub Binary Options SniperVX v1 (by @vdubus) . I have deleted extra parts and kept only the necessary part.
Without Martingale
Result Table
With Martingale
I am very new to Pine script, so waiting for your comments and review.
Ichimoku + RSI Crypto trending strategyThis is a crypto trending strategy designed for big timeframes such as 3-4h+.
Its components are:
RSI
ICHIMOKU full pack
Heikin Ashi candles for logic calculation inside
Rules for entry.
For long : we have a long cross condition on ichimoku and price is above the ichimoku lines, and at the same time RSI value is > 50.
For long : we have a short cross condition on ichimoku and price is below the ichimoku lines, and at the same time RSI value is < 50.
Rules for exit
We exit whenever we receive an opposite signal of the initial entry.
SInce this strategy is using no risk management inside, I recommend to be careful with it .
If you have any questions, let me know !
QFL bull bypassThis bypass indicator triggers plots 1 when the price is above the QFL base.
This can be used as a "bypass" by a consumer indicator that can skip trades when the bypass is triggering.
You can use it for long and short strategies, to prevent using buy or sell signals in areas were the price is either overextended.
QFL works better in 1, 2 or 4 hours timeframes.
DAYOFWEEK performance1 -Objective
"What is the ''best'' day to trade .. Monday, Tuesday...."
This script aims to determine if there are different results depending on the day of the week.
The way it works is by dividing data by day of the week (Monday, Tuesday, Wednesday ... ) and perform calculations for each day of the week.
1 - Objective
2 - Features
3 - How to use (Examples)
4 - Inputs
5 - Limitations
6 - Notes
7 - Final Tooughs
2 - Features
AVG OPEN-CLOSE
Calculate de Percentage change from day open to close
Green % (O-C)
Percentage of days green (open to close)
Average Change
Absolute day change (O-C)
AVG PrevD. Close-Close
Percentage change from the previous day close to the day of the week close
(Example: Monday (C-C) = Friday Close to Monday close
Tuesday (C-C) = Monday C. to Tuesday C.
Green % (C1-C)
Percentage of days green (open to close)
AVG Volume
Day of the week Average Volume
Notes:
*Mon(Nº) - Nº = Number days is currently calculated
Example: Monday (12) calculation based on the last 12 Mondays. Note: Discrepancies in numbers example Monday (12) - Friday (11) depend on the initial/end date or the market was closed (Holidays).
3 - How to use (Examples)
For the following example, NASDAQ:AAPL from 1 Jan 21 to 1 Jul 21 the results are following.
The highest probability of a Close being higher than the Open is Monday with 52.17 % and the Lowest Tuesday with 38.46 %. Meaning that there's a higher chance (for NASDAQ:AAPL ) of closing at a higher value on Monday while the highest chance of closing is lower is Tuesday. With an average gain on Tuesday of 0.21%
Long - The best day to buy (long) at open (on average) is Monday with a 52.2% probability of closing higher
Short - The best day to sell (short) at open (on average) is Tuesday with a 38.5% probability of closing higher (better chance of closing lower)
Since the values change from ticker to ticker, there is a substantial change in the percentages and days of the week. For example let's compare the previous example ( NASDAQ:AAPL ) to NYSE:GM (same settings)
For the same period, there is a substantial difference where there is a 62.5% probability Friday to close higher than the open, while Tuesday there is only a 28% probability.
With an average gain of 0.59% on Friday and an average loss of -0.34%
Also, the size of the table (number of days ) depends if the ticker is traded or not on that day as an example COINBASE:BTCUSD
4 - Inputs
DATE RANGE
Initial Date - Date from which the script will start the calculation.
End Date - Date to which the script will calculate.
TABLE SETTINGS
Text Color - Color of the displayed text
Cell Color - Background color of table cells
Header Color - Color of the column and row names
Table Location - Change the position where the table is located.
Table Size - Changes text size and by consequence the size of the table
5 - LIMITATIONS
The code determines average values based on the stored data, therefore, the range (Initial data) is limited to the first bar time.
As a consequence the lower the timeframe the shorter the initial date can be and fewer weeks can be calculated. To warn about this limitation there's a warning text that appears in case the initial date exceeds the bar limit.
Example with initial date 1 Jan 2021 and end date 18 Jul 2021 in 5m and 10 m timeframe:
6 - Notes and Disclosers
The script can be moved around to a new pane if need. -> Object Tree > Right Click Script > Move To > New pane
The code has not been tested in higher subscriptions tiers that allow for more bars and as a consequence more data, but as far I can tell, it should work without problems and should be in fact better at lower timeframes since it allows more weeks.
The values displayed represent previous data and at no point is guaranteed future values
7 - Final Tooughs
This script was quite fun to work on since it analysis behavioral patterns (since from an abstract point a Tuesday is no different than a Thursday), but after analyzing multiple tickers there are some days that tend to close higher than the open.
PS: If you find any mistake ex: code/misspelling please comment.