Bitcoin Relative Value IndicatorThis script retrieves the close price data for Bitcoin, DXY, CPIAUCSL, M2 money supply, and SPX and calculates the average of the four data points. It then calculates the relative value of Bitcoin by dividing the Bitcoin close price by the average of the four data points. The script determines whether the relative value is increasing or decreasing and plots the relative value on the chart using a green line if it's increasing and a red line if it's decreasing.
Educational
BTC CorrelationsIn this script, we define the symbols we want to compare Bitcoin to, and the timeframe we want to use. We then calculate the correlation coefficient between Bitcoin and each symbol over a 20-bar period. Finally, we plot the correlation signals for each symbol and set threshold lines at 0, 1, and -1 to indicate positive, neutral, and negative correlations.
CAPTURING THE VIX FUTURES ROLL YIELD
Our trading strategy utilizes the VIX term structure as a tool for gaining valuable insights on market sentiments. We identify the relationship between VIX futures prices and maturity dates, which can be either contango or backwardation. The slope of the VIX term structure is also a leading indicator and usually changes direction before volatility changes.
To execute this strategy, we use volatility ETNs, such as SVXY, which is a portfolio of short front and next month VIX futures. We have observed that the VIX quite often leads the S&P 500, and when this occurs, the signal lets us know whether to be long or short.
Additionally, we consider the difference between future and cash prices, which is often called roll yield. When the VIX futures term structure is in contango, roll yield is positive, and when it is in backwardation, roll yield is negative. We use a combination of the VIX term structure and roll yield to trade VIX ETNs.
When roll yield is positive over time, VIX ETNs tend to lose value. To earn a positive return, we take a long position in inverse VIX ETN, such as SVXY. However, buy and hold SVXY performance is mediocre. Therefore, we can improve the performance by making use of roll yield. We go long SVXY when roll yield is positive, and when yield is negative, we go long VXX. This strategy allows us to effectively trade VIX ETNs by using a combination of, VIX term structure, and roll yield to make informed trading decisions.
basilPort Portfolio Tracker Pro [basilChart]This script is helps giving detailed information about the portfolio.
Prominent features of this portfolio tracking indicator are:
- Chart of your portfolio: This portfolio tracker let’s you view the chart of your portfolio real-time.
- Visualized Profit/Loss: Indicator will let you know of your profit and loss on the chart.
- In-Depth Monitoring: Most Gained 1st, 2nd, 3rd and Most Lost 1st, 2nd, 3rd.
- All Time Highs: Let’s us view All Time Highs on the portfolio chart for each equity on the chart.
- 40 Different Symbols: Supports monitoring 40 different symbols at the same time, real-time.
- 10 Pair Detailed View: For the first 10 symbol in our portfolio, indicator supports viewing detailed info about each of them. Such as: Price, Cost, Qty, Profit Percentage, Chart TF Profit Percentage, Weight
basilPort Portfolio Tracker Pro indicator can be used to:
- Track your investments: The basilPort Portfolio Tracker allows you to enter all your investments and their associated details, such as the ticker symbol, purchase price, and quantity. It then calculates your total portfolio value, including gains and losses.
- Monitor portfolio performance: Provides an overview of your portfolio's performance over time. You can see how your portfolio is performing on a daily, weekly, or monthly basis, and compare it to the performance of the overall market.
- Analyze asset allocation: Helps you analyze your portfolio's asset allocation, which is the percentage of your portfolio invested in different symbols. You can use this information to adjust your portfolio and diversify your holdings.
- Set investment goals: You can use the Portfolio Tracker to set investment goals and track your progress towards achieving them. For example, you can set a goal of achieving a certain rate of return or accumulating a specific amount of wealth by a certain date.
Overall, the Portfolio Tracker is a useful tool for investors who want to monitor their portfolio's performance, evaluate their investment strategies, and make informed investment decisions.
Best and worst 3 performers in our portfolio:
From Data Window, script let’s us see the best and worst 3 performers in our portfolio. To know how to read it we follow this pattern:
- Check 1st Gained value.
- Find the nth symbol from script’s Inputs tab.
- Check 1st Gained to see its Profit Percentage.
An example scenario to reading Data Window is explained at the very end of the description.
Using the script:
- Add this script to the chart from indicators tab
- Set starting date for the basilGrid Portfolio Tracker Pro either by dragging and dropping the vertical line or by the date-time picker from indicator Inputs tab.
- Set symbols and enable them to monitor with this indicator.
- Set quantity and price information for the symbols you have selected.
- Set visual settings to tailor your experience.
basilPort Portfolio Tracker is an indicator that allows you to track and analyze the performance of your investment portfolio over time. It's a helpful tool for investors who want to monitor their holdings and evaluate their investment strategies.
In this example we used pair BTCUSDT 1h timeframe, our settings are:
Inputs Tab:
- Start Date: 2022-12-13 13:00
- Show All Time Highs: Unchecked
- Show Pair Data (First 10): Checked
- Show Total Data: Checked
Symbols:
- BINANCE:ETHUSDT Qty 4.2 Price 1 332
- BINANCE:BTCUSDT Qty 0.5 Price 17 469
- BINANCE:BNBUSDT Qty 20 Price 270
- BINANCE:AVAXUSDT Qty 200 Price 13.61
- BATS:PYPL Qty 50 Price 78.5
- BATS:AMZN Qty 40 Price 95.4
- BATS:ETSY Qty 40 Price 135.64
For example, if you check Data Window, you'll see the following:
An example scenario:
- Bought Portfolio Value 39142.98 => The cost of the portfolio
- Current Portfolio Value 39142.98 => The current value of the portfolio
- 1st Gained 2.00 => The most gained symbol's index. (Checking the Symbols what we see on the 2nd spot is this symbol, we can see this value indicates BINANCE:BTCUSDT)
- 1st Gained 28.09 => Means BINANCE:BTCUSDT is +%28.09
- 2nd Gained 4.00 => Again, after checking the Symbols, we now know what this value indicates. It is AVAXUSDT.
- 2nd Gained 18.59 => Means BINANCE:AVAXUSDT is +%18.59
..
And so on to Lost section. Only difference between Gained and Lost section indicates Lost equities.
This script's purpose is to make easier to have more control over the portfolio. With in depth data that’ll help with decision-making.
Donchian Trend V1The Donchian Trend strategy is a trend-following approach that uses the Donchian Channels indicator to identify potential entry and exit points in a security. The Donchian Channels are formed by taking the highest high and the lowest low prices over a specified period and plotting them as upper and lower channels around the current price. The width of the channels indicates the level of volatility in the market.
In this strategy, the Donchian Channels are used as a trend filter to determine the direction of the market. When the price is above the upper channel, it suggests an uptrend, and when the price is below the lower channel, it indicates a downtrend. The length of the Donchian Channels is a key parameter in the strategy, as it determines the look-back period for identifying the high and low prices.
Additional Logic: To further refine the entry and exit signals, The script uses two moving averages, a fast one (MA5) and a slow one (MA45), to identify trends and generate trading signals. When the fast moving average crosses above the slow moving average, a buy signal is generated, indicating that the market is trending upwards. Conversely, when the fast moving average crosses below the slow moving average, a sell signal is generated, indicating that the market is trending downwards.
Evaluation: The script was backtested on historical price data for the pair. The backtest results showed that the script was able to generate a net profit of , with a profit factor of and a Sharpe ratio of . The script also includes metrics such as the number of winning and losing trades, the average trade, and the largest winning and losing trades.
The strategy is evaluated based on its net profit, gross profit, gross loss, max run-up, max drawdown, buy & hold return, Sharpe ratio, Sortino ratio, and profit factor. The parameters used in the backtest include a Donchian Channel length of 42, which corresponds to a weekly time with divide of 4h time frame, and a short-term MA of 5 and a long-term MA of 45 for more accurate entry and exit signals.
Disclaimer: This script is for educational and research purposes only and should not be used for trading with real money without further testing and validation. Past performance is not indicative of future results.
Ticker Ratio LevelsIndicator for constructing levels of price ratios from other tickers.
The user can choose from predefined tickers such as Gold(XAU), DXY, BTC, etc.
How it works:
Takes the important extremum of the closing candle from your current chart and builds a level based on the chart selected in the settings.
This function allows you to determine the price level based on the current price and the price at the time of a certain date. To do this, it first determines the time when the last candle before the specified date occurred. Then the price at the time of this candle and at the current moment is calculated. Finally, the price level is calculated relative to the price at the time of the candle. The result of this calculation will be the price level.
How to Use:
By default, the indicator is set to 1D for the BTC chart. But you can adjust any levels on the assets you are interested in.
You can adjust the levels both in the settings and by moving them around the chart.
Simply click on the indicator name or level, and vertical lines will appear, which you can drag to any location. (The vertical lines serve as the beginning of the calculation point)
Example of work on ETH paired with DXY.
ARCHENS SHARESThis script marks the high and low of 9.45 to 10.15 price. When the price breaks high, then gives Buy signal. When the price breaks low, then it gives Sell Signal. These buy and sell signals are given with labels "ARCHENS BUY" or "ARCHENS SELL". With my observation in stock market, I have made this strategy.
This strategy works in normal candle pattern but i observed that it works well in heikenashi candle. For this strategy to work well, we have to select 5 mins heikenashi candles.
If this strategy gives "ARCHENS buy", then buy it. Target should be as per individuals mind. But Stop loss should be hitted when there are two continue opposite {red} heikenashi candle.
If this strategy gives "ARCHENS sell", then sell it. Target should be as per individuals mind. But Stop loss should be hitted when there are two continue opposite {green} heikenashi candle.
The Strat [LuxAlgo]The Strat indicator is a full toolkit regarding most of the concepts within "The Strat" methodology with features such as candle numbering, pivot machine gun (PMG) highlighting, custom combo highlighting, and various statistics included.
Alerts are also included for the detection of specific candle numbers, custom combos, and PMGs.
🔶 SETTINGS
Show Numbers on Chart: Shows candle numbering on the chart.
Style Candles: Style candles based on the detected number. Only effective on non-line charts and if the script is brought to the front.
🔹 Custom Combo Search
Combo: User defined combo to be searched by the script. Combos can be composed of any series of numbers including (1, 2, -2, 3), e.g : 2-21. No spaces or other characters should be used.
🔹 Pivot Machine Gun
Show Labels: Highlight detected PMGs with a label.
Min Sequence Length: Minimum sequence length of consecutive higher lows/lower highs required to detect a PMG.
Min Breaks: Minimum amount of broken previous highs/lows required to detect a PMG.
Show Levels: Show levels of the broken highs/lows.
🔹 Pivot Combos
Pivot Lookback: Lookback period used for detecting pivot points.
Right Bars Scan: Number of bars scanned to the right side of a detected pivot.
Left Bars Scan: Number of bars scanned to the left side of a detected pivot.
🔹 Dashboard
Show Dashboard: Displays statistics dashboard on chart.
Numbers Counter: Displays the numbers counter section on the dashboard.
Pivot Combos: Displays pivots combo section on the dashboard.
%: Display the percentage of detected pivot combos on the dashboard instead of absolute numbers.
Pivot Combos Rows: Number of rows displayed by the "Pivots Combo" dashboard section.
Show MTF: Showa MTF candle numbering on the dashboard.
Location: Location of the dashboard on the chart.
Size: Size of the displayed dashboard.
🔶 USAGE
This script allows users with an understanding of The Strat to quickly highlight elements such as candle numbers, pivot machine guns, and custom combos. The usage for these concepts is given in the sub-sections below.
🔹 Candle Numbers
The Strat assigns a number to individual candles, this number is determined by the current candle position relative to the precedent candle, these include:
Number 1 - Inside bar, occurs when the previous candle range engulfs the current one.
Number 2 Up - Upside Directional Bar, occurs when the current price high breaks the previous high while the current low is lower than the previous high.
Number 2 Down - Downside Directional Bar, occurs when the current price low breaks the previous low while the current high is higher than the previous low.
Number 3 - Outside bar, occurs when the current candle range engulfs the previous one.
The script can highlight the number of a candle by using labels but can also style candles by depending on the candle number. Inside bars (1) only have their candle wick highlighted, directional bars (2) (-2) only have their candle body highlighted. Outside bars have their candle range highlighted.
Note that downside directional bars are highlighted with the number -2.
Users can see the total amount of times a specific candle number is detected on the historical data on the dashboard available within the settings, as well as the number of times a candle number is detected relative to the total amount of detected candle numbers expressed as a percentage.
It is also possible to see the current candle numbers returned by multiple timeframes on the dashboard.
🔹 Searching For Custom Combos
Combos are made of a sequence of two or more candle numbers. These combos can highlight multiple reversals/continuation scenarios. Various common combos are documented by The Strat community.
This script allows users to search for custom combos by entering them on the Combo user setting field.
When a user combo is found, it is highlighted on the chart as a box highlighting the combo range.
🔹 Pivot Combos
It can be of interest to a user to display the combo associated with a pivot high/low. This script will highlight the location of pivot points on the chart and display its associated combo by default. These are based on the Pivot Combo lookback and not displayed in real-time.
Users can see on the dashboard the combos associated with a pivot high/low, these are ranked by frequency.
🔹 Pivot Machine Gun (PMG)
Pivot Machine Guns (PMG)s describe the scenario where a single price variation breaks the value of multiple past successive higher lows/lower highs. This can highlight a self-exciting behavior, where even more past successive higher lows/lower highs get broken.
Users can select the minimum sequence length of successive higher lows/lower highs required for a PMG to be detected, as well the amount of these successive higher lows/lower highs that must be broken.
Transmit signals to overlayThis indicator transmits signals from another indicator panel to the main panel through the chart.
It may be suitable when it is not possible to use the main indicator with the "overlay=true" attribute.
For the script to work, the input signal must be "1" for BUY and "0" for SELL.
Alternative words: transmit signals, send, connect, broadcast, copy signals, duplicate.
---
You can change display style:
---
You can use alerts:
Time of Day - Volatility Report█ OVERVIEW
The indicator analyses the volatility and reports statistics by the time of day.
█ CONCEPTS
Around the world and at various times, different market participants get involved in the markets. How does this affect the market?
Knowing this gets you better prepared and improves your trading. Here are some ideas to explore:
When is the market busy and quiet?
What time is it the most volatile?
Which pairs in your watchlist are moving while you are actively trading?
Should you adjust your trading time? Should you change your trading pairs?
When does your strategy perform the best?
What entry times do your winners have in common? What about the exit times of your losers?
Is it worth keeping your trade open overnight?
Bitcoin (UTC+0)
Gold (UTC+0)
Tesla, Inc. (UTC+0)
█ FEATURES
Selectable time zones
Display the statistics in your geographical time zone (or other market participants), the exchange time zone, or UTC+0.
Configurable outputs
Output the report statistics as mean or median.
█ HOW TO USE
Plot the indicator and visit the 1H timeframe.
█ NOTES
Gaps
The indicator includes the volatility from gaps.
Calculation
The statistics are not reported from absolute prices (does not favor trending markets) nor percentage prices (does not depict the different periods of volatility that markets can go through). Instead, the script uses the prices relative to the average range of previous days (daily ATR).
Extended trading session
The script analyses extended hours when activated on the chart.
Daylight Saving Time (DST)
The exchange time or geographical time zone selected may observe Daylight Saving Time. For example, NASDAQ:TSLA always opens at 9:30 AM New York time but may see different opening times in another part of the globe (New York time corresponds to UTC-4 and UTC-5 during the year).
TSG 5% Daily CalculatorThis is a calculator I've created to help visualize Target and Risk Levels based on leverage use to trade crypto.
How to use it ?
Basic Use:
- Set the Direction of your trade - either Long or Short
- Set the Leverage you use in your trade - it is crutial to define the risk and target levels
- Set the Risk Amount you want to risk (in %) of your total balance ( Advised 2-3% )
- Set the Target Amount you want to profit at the target (the idea of this is 5% daily, so 5%).
- Set Entry Price if you have opened a position, and you will visually see your progress. Otherwise the levels will be adjusted to the Close of the candle.
Additions:
- Set your Initial Balance - to help you visualize on the Table your progress
- Set your Current Balance - for visualization purposes on ongoing trades and on the Table
- Entry Date - Advised to set it when you open a trade - you will be tracking the progress of your trade since the candle on which you opened it
- Show Table - to show the table of 5% daily and the target it is set on per day
- Table Size - Set table to be small or normal
- Together with the Table you have a big blue area behind that ends on the day you will become a Millionaire based on the Initial Balance, Current balance and Target % in your inputs
Flare🔶 METHODS
• Pine Script™ introduces methods ( 1 , 2 )! Much kuddos for the developers, Tradingview, and all who has worked on it!
• This educational script will show the simplified way of writing built-in methods, not to create a new method.
🔹 Simplified way of writing built-in methods:
· Instead of:
newArray = array.new()
array.unshift(newArray, 1)
lin = line.new(na, na, na, na)
line.set_xy1(lin, bar_index , close)
line.set_xy2(lin, bar_index + 10, close)
label newLabel = label.new(bar_index, high)
if barstate.islast
label.delete(newLabel)
· We now can write it like this:
newArray = array.new()
newArray.unshift(1)
lin = line.new(na, na, na, na)
lin.set_xy1(bar_index , close)
lin.set_xy2(bar_index + 10, close)
label newLabel = label.new(bar_index, high)
if barstate.islast
newLabel.delete()
——————————————————————————————————————————————————————————
· When using sometimes brackets are necessary:
label lab = label.new(bar_index, high)
if barstate.islast
label.set_color(lab, color.red)
label.delete(lab )
· ->
label lab = label.new(bar_index, high)
if barstate.islast
lab.set_color(color.red)
(lab ).delete() // lab .delete() doesn't compile at the moment
——————————————————————————————————————————————————————————
🔶 OVERVIEW OF SCRIPT
• The basic principles are:
· Find 1 point ( close ) x bars back from current bar ( settings: 'x close back').
· Create a 'Flare' shaped object from that point to current bar or further (dependable of "Width of Flare").
· Calculate where current close is located versus the Flare lines.
· On that bases, change colour and draw plotshapes.
· Below bar if current close is located in the upper part of the Flare
· Above bar if current close is located in the lower part of the Flare
· Above & Below if located in the middle part of the Flare
-> Above & Below colours has 3 different colours (adjustable), dependable on the position
🔶 EXAMPLES
· Neutral zone:
· Light Bullish zone:
· Bullish zone:
· Very Bullish / Overbought zone:
· Light Bearish zone:
· Bearish zone:
· Very Bearish / Oversold zone:
🔶 TECHNIQUES
🔹 I. Make a User Defined Type (UDT) Flare, with:
· 5x linefill - array of linefill
· int iDir, which captures the direction (current location of close in Flare)
· color cCol, this is a colour variable in relation to the direction.
🔹 II. Different functions will add a new Flare object, and update the values on each bar.
· Explanation of each function can be found in the script.
🔶 EXTRA's
· The input.color() is located in the function set_flare_B(flare obj)
· Best to put the inputs at the beginning of the script, I included this alternative just to show it is possible (but mostly not ideal)
· Background colour (settings: Bgcolor) can be enabled for better visibility of colours
Global Unemployment RateThe Global Unemployment rate estimates what is the rate of unemployment of the whole world, taking same data from multiple countries and normalizing them.
It includes the Eurozone + 19 countries from all the continents, which are some of the richest countries as well as some of the most populous.
It sadly does not include India as its unemployment data on trading view as of today (Feb 2023) is only since year 2019, which is too short
Entry Percent: EssamThis Pine Script code is designed to perform the task of computing and showcasing the profit percentage, profit value, and the duration for which a specific asset is held, all in real-time. The script effectively leverages the built-in resources to provide a seamless and robust experience, as it presents the calculated figures in an easily readable format on the chart, without causing any lag or disruptions to the chart.
ICT MTF FVG [MK]FVGs (Fair Value Gaps) are significant levels that may act as support or resistance to price. The script finds FVGs as per ICT trading system, then plots the full FVG to the right side of the chart. FVG boxes do not change size when they are semi-mitigated as its important to know where the original FVG midpoint lies. Plotting to the right side of price allows for a cleaner chart. The script is MTF and can display FVG boxes for the following timeframes. Chart, 5,10,15,30,1hr,4hr,8hr,12hr,D,W,M.
Below shows 1hr FVGs marked out. NOTE: this is not what the script does, this is for explanation only.
Below shows what the script will do. 1hr FVGs shown on 15min chart
SMT Divergence [promuckaj]SMT Divergence indicator will track your main symbol on the chart against other one you set, for example you can use it on S&P 500 chart while you set there to track and compare it with Nasdaq, it will search for divergence between them, according to swing points, and print it on the chart for you.
There is option to set custom swing points period, colors, lines, debug info panel that will show you in real time values and times of last two swing highs and lows points that is formed on second symbol you want to track.
You can activate also alerts for bullish and bearish divergences separately, as you wish.
There is option to setup divergence types you want to get:
#1
100% aligned divergences only - means both swing points are aligned at the same bar and time between two assets.
#2
all divergences - means you will get also the rest potential divergences that is not 100% aligned between two assets according to swing points. This means that, while swing points is formed on main symbol, indicator will compare their bars and times to the second symbol and if it looks like divergence you will get it on the chart.
Just to clarify "divergence" between two symbols, it means that for bearish one symbol need to form higher low while the other need to form higher high, and vice versa for bullish, lower low / lower high.
Everyone enjoy !
Trade Entry Check list - Smart Money ConceptThe indicator you see is written to evaluate the input parameters for a trade. Since my own style is smart money, and I always used to write on paper or mentally calculate the necessary inputs for a trade, I wrote this indicator to prevent mental or paper calculations.
This indicator is made up of different sections that you can see in the table and make the necessary changes in the Options section.
The first section is your instrument, which is automatically displayed on every chart.
The next section is the current market, which is written based on smart money and divided into Asia Time, Frankfurt Time, London Time, Lunch Time, and New York Time sections. Depending on our style, we usually do not trade during the Frankfurt Time and Lunch Time sections.
The next section is about the ascending or descending structure of the 4-hour and 15-minute timeframes, which of course, you can change this structure to your desired one.
These two sections have both manual and automatic modes. I went through a lot of trouble for the automatic section, so don't easily skip it and be sure to test it.
The following sections relate to other reasons for entering a trade, which are divided into several sections. The first section is the entry reasons related to my personal strategy, which is completely defined and shows the input calculation in the Calculation section. The second section is your inputs without calculation in the Counter section, and the third section is your personal inputs including the Counter. You have deep access to customizing this table.
How To Import And Offset CSV DataExample method of how to import, offset, and plot CSV data using an array.
NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!
Normalize [JOY] Normalize compares the price of an asset across different timeframes. I have used the daily, weekly, and monthly timeframes. The resulting plot shows the degree to which the instrument deviates from the timeframes. Users can choose their period if desired.
ICT Liquidty H/L [MK]indicator shows liquidity levels at pivot highs and lows on the chart timeframe. Levels are drawn as a horizontal line up to the last active bar. Once a level has been passed through, the level is highlighted. The liquidity level will remain highlighted until a pre determined amount of bars have closed after the level was passed. These liquidity levels can be used as targets for trades, or as potential reversal points. Liquidity (or resting orders) at key pivot points form a key part of the ICT trading system. Users can configure the indicator to display the untapped liquidity levels, or they can be completely hidden until they are passed through.
ICT Opening Gaps [MK]
The indicator plots levels which can act as magnets to price. The levels are gap areas which are used within the ICT (The Inner Circle Trader) trading system.
The indicator plots 5 areas of interest:
1: Daily Volume Imbalances - Referencing the Daily chart, boxes are calculated from close to open between all candles. Candles which have only 'wicks' between the close and open prices are considered 'volume imbalances. The boxes can then be shown on LTFs to aid in decision making for intraday traders. Imbalances can be limited to a maximum amount shown and mitigated imbalances can be removed from the chart. All colors can be customised.
Volume Imbalance example:
2: NWOG - New Week Opening Gap - Plotted from Friday Close at 1659 to Sunday Opening at 1800 (EST). The current NWOG can be displayed on its own, or previous weeks can also be shown (ICT recommends the previous 4 weeks also). Boxes are plotted with a midline and all colors can be customised.
New Week Opening Gaps example:
3. NDOG - New Day Opening Gaps - Plotted from day close at 1659 (EST) to restart at 1800 (EST). All colors can be customised. These gaps can be very small so line widths of 3+ are recommended if the lines are to be seen on HTFs
New Day Opening Gap example:
4. New Opening Gap - Plotted from close at 1659 to Session open at 0930 (EST). These areas can possibly be closed/filled after opening at some time. The indicator will draw box to the right of price which shows if the Opening Gap is UP or DOWN. The box will change color to show up or down, or text alone can be used instead of the box. All colors can be customised.
New Opening Gap Box example:
5. 0930 Opening Line - Draws a horizontal line from the opening price at 0930 (EST) to the last bar on the chart. This is the level used to calculate the New Opening Gap. All colors can be customised.
0930 Opening Line example:
Everything ICT v1█ OVERVIEW
This script presents some of the concepts taught by the ICT. It includes "Fair value gaps", "Double tops and bottoms", "New week opening gaps", "Optimal trade entry" and some other minor things. This is a work in progress and there will be more concepts included in the future.
█ FEATURES
The first group in the indicator's menu is "Active fair value gaps" .
Its purpose is to display a FVG if the price enters one. Most of the other scripts are deleting the FVG when the price go through it but this script won't. You can choose how many candles to look back for a FVG, FVG lines transparency and to show only current FVG and delete old ones.
Second, you can choose to show relatively equal highs and lows otherwise known as double bottoms and tops . There is a filter which will remove some of the lines. It is included to clean up your chart a bit but if you don't want to miss something you can leave it enabled.
There is a precision value which is ranging between 20 and 120. Higher number means the difference between the two highs/lows should be very small. On its biggest setting 120 it will display only equal highs/lows.
You can choose the colors and width of the lines.
"Weekend gaps" category is self explanatory. You can chose either to show them or not, colors and width.
"Optimal trade entry" is constantly measuring a defined range and it's presenting real-time a graph on the chart with which you can easily find if price is in OTE.
There are options to choose how many candles to look back for defining a range and everything else is for the minimal visual representation.
And lastly, there are options to show horizontal line at 0:00 am NY local time, clock adjustment setting if the line doesn't correspond to its spot and option to change the color of a FVG candle which in my opinion is the most useful thing in a trading indicator.
Credits: ICT
═════════════════════════════════════════════════════════════════════════
This indicator is not meant to be, and do not constitute, financial, investment, trading, or other types of advice.
Please note that it is NOT providing trading signals but trading ideas instead.
Under no circumstances will the Programmer be held responsible or liable in any way for any claims, damages, losses, expenses, costs or liabilities whatsoever (including, without limitation, any direct or indirect damages for loss of profits, business interruption or loss of information) resulting or arising directly or indirectly from your use of or inability to use this indicator or anything linked to it, or from your reliance on the information and material on this indicator, even if the Programmer has been advised of the possibility of such damages in advance.
All trades you make are your responsibility.
ICT MacrosThis script allows traders to visualize the range of time when a macro (an automated series of instructions/trades from large fund traders, executed by an algorithm) will likely occur in the market. It does this by drawing vertical lines and labels on the chart at these specific times:
(Macro Open) - 9:50 AM EST
(Macro Close) - 10:10 AM EST
(Macro Open) - 10:50 AM EST
(Macro Close) - 11:10 AM EST
(Macro Open) - 1:10 PM EST
(Macro Close) - 1:40 PM EST
(Macro Open) - 3:15 PM EST
(Macro Close) - 3:45 PM EST
The theory behind the use of these macros - is that the market will either seek buy side or sell side liquidity, or seek to rebalance price at a point of interest in between the open and close of the macro. Traders who follow this theory can use that information to anticipate how price might behave.
When a macro occurs, the script draws a vertical line on the chart using a dotted line style with a user-defined color. Additionally, a label is placed above the line to indicate whether it is a Macro Open or Macro Close event.
To preserve space, the labels are abbreviated on chart - "Macro Open" (M.O.) and "Macro Close" (M.C.) for both the morning and afternoon trading sessions. The labels may be turned on/off by the user.
The script also includes alerts that can notify traders when a macro occurs. These alerts can be set to go off once per bar close, and the alert message indicates the specific macro type and time.
This script is entirely open-source, meaning that traders can read the code and modify it as needed. Credit to the foundation of this script goes to TradingView user @rickyzcarroll for his open source Strat Assistant Hour Flip script. Important changes include the specific time changes and alert function.