Moving Average Ratio [InvestorUnknown]Overview
The "Moving Average Ratio" (MAR) indicator is a versatile tool designed for valuation, mean-reversion, and long-term trend analysis. This indicator provides multiple display modes to cater to different analytical needs, allowing traders and investors to gain deeper insights into the market dynamics.
Features
1. Moving Average Ratio (MAR):
Calculates the ratio of the chosen source (close, open, ohlc4, hl2 …) to a longer-term moving average of choice (SMA, EMA, HMA, WMA, DEMA)
Useful for identifying overbought or oversold conditions, aiding in mean-reversion strategies and valuation of assets.
For some high beta asset classes, like cryptocurrencies, you might want to use logarithmic scale for the raw MAR, below you can see the visual difference of using Linear and Logarithmic scale on BTC
2. MAR Z-Score:
Computes the Z-Score of the MAR to standardize the ratio over chosen time period, making it easier to identify extreme values relative to the historical mean.
Helps in detecting significant deviations from the mean, which can indicate potential reversal points and buying/selling opportunities
3. MAR Trend Analysis:
Uses a combination of short-term (default 1, raw MAR) and long-term moving averages of the MAR to identify trend changes.
Provides a visual representation of bullish and bearish trends based on moving average crossings.
Using Logarithmic scale can improve the visuals for some asset classes.
4. MAR Momentum:
Measures the momentum of the MAR by calculating the difference over a specified period.
Useful for detecting changes in the market momentum and potential trend reversals.
5. MAR Rate of Change (ROC):
Calculates the rate of change of the MAR to assess the speed and direction of price movements.
Helps in identifying accelerating or decelerating trends.
MAR Momentum and Rate of Change are very similar, the only difference is that the Momentum is expressed in units of the MAR change and ROC is expressed as % change of MAR over chosen time period.
Customizable Settings
General Settings:
Display Mode: Select the display mode from MAR, MAR Z-Score, MAR Trend, MAR Momentum, or MAR ROC.
Color Bars: Option to color the bars based on the current display mode.
Wait for Bar Close: Toggle to wait for the bar to close before updating the MAR value.
MAR Settings:
Length: Period for the moving average calculation.
Source: Data source for the moving average calculation.
Moving Average Type: Select the type of moving average (SMA, EMA, WMA, HMA, DEMA).
Z-Score Settings:
Z-Score Length: Period for the Z-Score calculation.
Trend Analysis Settings:
Moving Average Type: Select the type of moving average for trend analysis (SMA, EMA).
Longer Moving Average: Period for the longer moving average.
Shorter Moving Average: Period for the shorter moving average.
Momentum Settings:
Momentum Length: Period for the momentum calculation.
Rate of Change Settings:
ROC Length: Period for the rate of change calculation.
Calculation and Plotting
Moving Average Ratio (MAR):
Calculates the ratio of the price to the selected moving average type and length.
Plots the MAR with a gradient color based on its Z-Score, aiding in visual identification of extreme values.
// Moving Average Ratio (MAR)
ma_main = switch ma_main_type
"SMA" => ta.sma(src, len)
"EMA" => ta.ema(src, len)
"WMA" => ta.wma(src, len)
"HMA" => ta.hma(src, len)
"DEMA" => ta.dema(src, len)
mar = (waitforclose ? src : src) / ma_main
z_col = color.from_gradient(z, -2.5, 2.5, color.green, color.red)
plot(disp_mode.mar ? mar : na, color = z_col, histbase = 1, style = plot.style_columns)
barcolor(color_bars ? (disp_mode.mar ? (z_col) : na) : na)
MAR Z-Score:
Computes the Z-Score of the MAR and plots it with a color gradient indicating the magnitude of deviation from the mean.
// MAR Z-Score
mean = ta.sma(math.log(mar), z_len)
stdev = ta.stdev(math.log(mar),z_len)
z = (math.log(mar) - mean) / stdev
plot(disp_mode.mar_z ? z : na, color = z_col, histbase = 0, style = plot.style_columns)
plot(disp_mode.mar_z ? 1 : na, color = color.new(color.red,70))
plot(disp_mode.mar_z ? 2 : na, color = color.new(color.red,50))
plot(disp_mode.mar_z ? 3 : na, color = color.new(color.red,30))
plot(disp_mode.mar_z ? -1 : na, color = color.new(color.green,70))
plot(disp_mode.mar_z ? -2 : na, color = color.new(color.green,50))
plot(disp_mode.mar_z ? -3 : na, color = color.new(color.green,30))
barcolor(color_bars ? (disp_mode.mar_z ? (z_col) : na) : na)
MAR Trend:
Plots the MAR along with its short-term and long-term moving averages.
Uses color changes to indicate bullish or bearish trends based on moving average crossings.
// MAR Trend - Moving Average Crossing
mar_ma_long = switch ma_trend_type
"SMA" => ta.sma(mar, len_trend_long)
"EMA" => ta.ema(mar, len_trend_long)
mar_ma_short = switch ma_trend_type
"SMA" => ta.sma(mar, len_trend_short)
"EMA" => ta.ema(mar, len_trend_short)
plot(disp_mode.mar_t ? mar : na, color = mar_ma_long < mar_ma_short ? color.new(color.green,50) : color.new(color.red,50), histbase = 1, style = plot.style_columns)
plot(disp_mode.mar_t ? mar_ma_long : na, color = mar_ma_long < mar_ma_short ? color.green : color.red, linewidth = 4)
plot(disp_mode.mar_t ? mar_ma_short : na, color = mar_ma_long < mar_ma_short ? color.green : color.red, linewidth = 2)
barcolor(color_bars ? (disp_mode.mar_t ? (mar_ma_long < mar_ma_short ? color.green : color.red) : na) : na)
MAR Momentum:
Plots the momentum of the MAR, coloring the bars to indicate increasing or decreasing momentum.
// MAR Momentum
mar_mom = mar - mar
// MAR Momentum
mom_col = mar_mom > 0 ? (mar_mom > mar_mom ? color.new(color.green,0): color.new(color.green,30)) : (mar_mom < mar_mom ? color.new(color.red,0): color.new(color.red,30))
plot(disp_mode.mar_m ? mar_mom : na, color = mom_col, histbase = 0, style = plot.style_columns)
MAR Rate of Change (ROC):
Plots the ROC of the MAR, using color changes to show the direction and strength of the rate of change.
// MAR Rate of Change
mar_roc = ta.roc(mar,len_roc)
// MAR ROC
roc_col = mar_roc > 0 ? (mar_roc > mar_roc ? color.new(color.green,0): color.new(color.green,30)) : (mar_roc < mar_roc ? color.new(color.red,0): color.new(color.red,30))
plot(disp_mode.mar_r ? mar_roc : na, color = roc_col, histbase = 0, style = plot.style_columns)
Summary:
This multi-purpose indicator provides a comprehensive toolset for various trading strategies, including valuation, mean-reversion, and trend analysis. By offering multiple display modes and customizable settings, it allows users to tailor the indicator to their specific analytical needs and market conditions.
Educational
ArbitrageDashboardv3310824This indicator allows you to monitor the spread (difference in exchange rates) between two assets in real-time for up to 12 trading pairs simultaneously.
⚙️ How does the indicator work?
In the settings menu, you can select two trading pairs, such as BTCUSDT on Binance and BTCUSDT on Bybit. The script then fetches prices from both exchanges and compares them, calculating the percentage difference (spread). This process is repeated for all 12 trading pairs added in the settings. The script works only with the assets and exchanges available on TradingView.
⚡️ How to use it?
When the spread is negative, it means the asset's price on the first exchange is lower than on the second. By buying on the first exchange and selling on the second, you can make a profit (taking into account the exchange fees). When the spread is positive, the opposite is true. The buy prices and exchanges are shown in a green Buy row, while sell prices and exchanges are displayed in a red Sell row. If the spread is zero, prices are the same on both exchanges, and no arbitrage opportunity exists. For better accuracy, use the smallest timeframe available in your TradingView subscription, such as minute or second intervals.
🕒 Arbitrage Situation Counter
For each trading pair, the table below the Buy row shows the number of arbitrage situations within a specified timeframe. An arbitrage situation occurs when the spread exceeds the Signal Threshold Level set by the user. Each time this happens, the counter increases by one. It only counts situations that occurred within the selected timeframe, such as the past hour for a 1-hour period. You can track arbitrage situations for up to three different periods simultaneously, ranging from 5 minutes to 24 hours. This counter helps evaluate the potential for arbitrage in the selected trading pairs. If a pair shows only 1-2 arbitrage situations per hour, it might be better to look for another pair.
🔔 Setting Up Alerts
In the script settings, you can set the Spread Signal Threshold. When the spread reaches this level, the table for that asset will be highlighted. This threshold also acts as a signal for setting up alerts. To set alerts, go to the Alerts tab in the TradingView menu on the right, click "Create Alert", and select this indicator under "Condition". You can then name the alert and finish the setup by clicking "Create".
We, the authors, have long been involved in cryptocurrency arbitrage and created this script for our own trading, but you can use it for any assets and markets as you see fit.
We also offer lighter versions of the indicator that track the spread for one or three trading pairs. These versions also display the spread chart, which can be useful for historical analysis. If the full indicator is too resource-intensive for your device, try these lighter versions:
🧩 Arbitrage Spread v1 : 1 pair + 1 chart
🧩 Arbitrage Spread v2 : 3 pairs + 3 charts
If your hardware can handle it, you can use the 12-pair version as a dashboard and add one of the versions with a spread chart for a detailed view of one or three pairs.
--
Этот индикатор позволяет в реальном времени отслеживать изменение спреда (разницы в цене) между двумя активами для 12 торговых пар одновременно.
⚙️ Как работает индикатор?
В меню настроек индикатора пользователь выбирает две торговые пары, например BTCUSDT на бирже Binance и BTCUSDT на бирже Bybit. Скрипт получает цены с обеих бирж и сравнивает их, рассчитывая процентное отклонение (спред). Этот процесс выполняется для всех 12 торговых пар, указанных в настройках. Скрипт работает только с теми активами и биржами, которые доступны на TradingView.
⚡️ Как использовать?
Когда спред отрицательный, это означает, что цена на первый актив ниже, чем на второй. В таком случае можно купить актив на первой бирже и продать на второй, получив прибыль (не забывая учитывать биржевые комиссии). Когда спред положительный, ситуация обратная. Биржи и цены для покупки отображаются в зеленой строке Buy, а для продажи – в красной строке Sell. При нулевом спреде цены на обеих биржах одинаковы, и арбитражная ситуация отсутствует.
Для повышения точности индикатора используйте минимально доступный таймфрейм на TradingView – минутный или секундный.
🕒 Счетчик арбитражных ситуаций
По каждой торговой паре в таблице под строкой Buy отображается количество арбитражных ситуаций за определенный промежуток времени. Арбитражная ситуация возникает, когда спред превышает установленный пользователем сигнальный уровень (Signal Threshold Level). При каждом превышении этого уровня счетчик увеличивается на единицу. Счетчик учитывает арбитражные ситуации за определенный период, например, за последний час для 1-часового периода (1h). Можно отслеживать количество арбитражных ситуаций одновременно для трех временных периодов от 5 минут до суток.
Счетчик помогает оценить перспективность арбитража выбранных пар. Если за час на паре было всего 1-2 арбитражные ситуации, возможно, лучше поискать другую пару.
🔔 Настройка оповещений
В настройках скрипта можно задать пороговое значение спреда (Spread Signal Threshold). Когда спред достигнет этого уровня, таблица для данного актива будет подсвечена. Этот уровень также служит сигналом для настройки оповещений.
Для настройки оповещений откройте вкладку «Оповещения» в меню TradingView справа. Нажмите кнопку «Создать оповещение». В открывшемся окне в строке «Условие» выберите данный индикатор. Затем задайте название и завершите настройку, нажав кнопку «Создать».
Мы, авторы этого скрипта, давно занимаемся арбитражем криптовалют и создали его для себя, но вы можете использовать его для любых активов и на любых рынках по своему усмотрению.
У нас также есть более простая версия индикатора, которая отслеживает спред для одной или трех торговых пар. В этих версиях можно просматривать график самого спреда, что полезно для оценки его динамики. Если этот индикатор кажется вам или вашему устройству слишком тяжелым, вы можете воспользоваться облегченными версиями:
🧩 Arbitrage Spread v1 : 1 пара + 1 график
🧩 Arbitrage Spread v2 : 3 пары + 3 графика
Если ваше оборудование позволяет, вы можете добавить несколько индикаторов на экран. Например, использовать версию с 12 парами как дашборд, а одну из версий с графиком спреда для более детального анализа по одному или трем инструментам.
Portfolio Index Generator [By MUQWISHI]▋ INTRODUCTION:
The “Portfolio Index Generator” simplifies the process of building a custom portfolio management index, allowing investors to input a list of preferred holdings from global securities and customize the initial investment weight of each security. Furthermore, it includes an option for rebalancing by adjusting the weights of assets to maintain a desired level of asset allocation. The tool serves as a comprehensive approach for tracking portfolio performance, conducting research, and analyzing specific aspects of portfolio investment. The output includes an index value, a table of holdings, and chart plotting, providing a deeper understanding of the portfolio's historical movement.
_______________________
▋ OVERVIEW:
The image can be taken as an example of building a custom portfolio index. I created this index and named it “My Portfolio Performance”, which comprises several global companies and crypto assets.
_______________________
▋ OUTPUTS:
The output can be divided into 4 sections:
1. Portfolio Index Title (Name & Value).
2. Portfolio Specifications.
3. Portfolio Holdings.
4. Portfolio Index Chart.
1. Portfolio Index Title, displays the index name at the top, and at the bottom, it shows the index value, along with the chart timeframe, e.g., daily change in points and percentage.
2. Portfolio Specifications, displays the essential information on portfolio performance, including the investment date range, initial capital, returns, assets, and equity.
3. Portfolio Holdings, a list of the holding securities inside a table that contains the ticker, average entry price, last price, return percentage of the portfolio's initial capital, and customized weighted percentage of the portfolio. Additionally, a tooltip appears when the user passes the cursor over a ticker's cell, showing brief information about the company, such as the company's name, exchange market, country, sector, and industry.
4. Index Chart, display a plot of the historical movement of the index in the form of a bar, candle, or line chart.
_______________________
▋ INDICATOR SETTINGS:
Section(1): Style Settings
(1) Naming the index.
(2) Table location on the chart and cell size.
(3) Sorting Holdings Table. By securities’ {Return(%) Portfolio, Weight(%) Portfolio, or Ticker Alphabetical} order.
(4) Choose the type of index: {Equity or Return (%)}, and the plot type for the index: {Candle, Bar, or Line}.
(5) Positive/Negative colors.
(6) Table Colors (Title, Cell, and Text).
(7) To show/hide any indicator’s components.
Section(2): Performance Settings
(1) Calculation window period: from DateTime to DateTime.
(2) Initial Capital and specifying currency.
(3) Option to enable portfolio rebalancing in {Monthly, Quarterly, or Yearly} intervals.
Section(3): Portfolio Holdings
(1) Enable and count security in the investment portfolio.
(2) Initial weight of security. For example, if the initial capital is $100,000 and the weight of XYZ stock is 4%, the initial value of the shares would be $4,000.
(3) Select and add up to 30 symbols that interested in.
Please let me know if you have any questions.
OrderBlock Trend (CISD)OrderBlock Trend (CISD) Indicator
Overview:
The "OrderBlock Trend (CISD)" AKA: change in state of delivery by ICT inner circle trader this indicator is designed to help traders identify and visualize market trends based on higher timeframe candle behavior. This script leverages the concept of order blocks, which are price levels where significant buying or selling activity has occurred, to signal potential trend reversals or continuations. By analyzing bullish and bearish order blocks on a higher timeframe, the indicator provides visual cues and statistical insights into the market's current trend dynamics.
Key Features:
Higher Timeframe Analysis: The indicator uses a higher timeframe (e.g., Daily) to assess the trend direction based on the open and close prices of candles. This approach helps in identifying more significant and reliable trend changes, filtering out noise from lower timeframes.
Bullish and Bearish Order Blocks: The script detects the first bullish or bearish candle on the selected higher timeframe and uses these candles as reference points (order blocks) to determine the trend direction. A bullish trend is indicated when the current price is above the last bearish order block's open price, and a bearish trend is indicated when the price is below the last bullish order block's open price.
Visual Trend Indication: The indicator visually represents the trend using background colors and plot shapes:
A green background and a square shape above the bars indicate a bullish trend.
A red background and a square shape above the bars indicate a bearish trend.
Candle Count and Statistics: The script keeps track of the number of up and down candles during bullish and bearish trends, providing percentages of up and down candles in each trend. This data is displayed in a table, giving traders a quick overview of market sentiment during each trend phase.
User Customization: The higher timeframe can be adjusted according to the trader's preference, allowing flexibility in trend analysis based on different time horizons.
Concepts and Calculations:
The "OrderBlock Trend (CISD)" indicator is based on the concept of order blocks, a key area where institutional traders are believed to place large orders, creating significant support or resistance levels. By identifying these blocks on a higher timeframe, the indicator aims to highlight potential trend reversals or continuations. The use of higher timeframe data helps filter out minor fluctuations and focus on more meaningful price movements.
The candle count and percentage calculations provide additional context, allowing traders to understand the proportion of bullish or bearish candles within each trend. This information can be useful for assessing the strength and consistency of a trend.
How to Use:
Select the Higher Timeframe: Choose the higher timeframe (e.g., Daily) that best suits your trading strategy. The default setting is "D" (Daily), but it can be adjusted to other timeframes as needed.
Interpret the Trend Signals:
A green background indicates a bullish trend, while a red background indicates a bearish trend. The corresponding square shapes above the bars reinforce these signals.
Use the information on the proportion of up and down candles during each trend to gauge the trend's strength and consistency.
Trading Decisions: The indicator can be used in conjunction with other technical analysis tools and indicators to make informed trading decisions. It is particularly useful for identifying trend reversals and potential entry or exit points based on the behavior of higher timeframe order blocks.
Customization and Optimization: Experiment with different higher timeframes and settings to optimize the indicator for your specific trading style and preferences.
Conclusion:
The "OrderBlock Trend (CISD)" indicator offers a comprehensive approach to trend analysis, combining the power of higher timeframe order blocks with clear visual cues and statistical insights. By understanding the underlying concepts and utilizing the provided features, traders can enhance their trend detection and decision-making processes in the markets.
Disclaimer:
This indicator is intended for educational purposes and should be used in conjunction with other analysis methods. Always perform your own research and risk management before making trading decisions.
Some known bugs when you switch to lower timeframe while using daily timeframe data it didn't use the daily candle close to establish the trend change but your current time frame If some of you know how to fix it that would be great if you help me to I would try my best to fix this in the future :) credit to ChatGPT 4o
Auto Fib GOLDEN TARGET Golden Target Auto Fib Indicator
Unlock the power of automatic Fibonacci analysis with the Golden Target Auto Fib Indicator. Designed for traders who want to effortlessly incorporate Fibonacci retracement levels into their strategy, this indicator dynamically calculates and plots key Fibonacci levels based on recent price action.
Key Features:
Automatic Fibonacci Levels: Automatically determines the critical Fibonacci retracement levels using the most recent high and low over a user-defined period.
Customizable Length: Adjust the period over which the Fibonacci levels are calculated to match your trading style and market conditions.
Dynamic Plotting: Fibonacci levels are plotted in real-time, reflecting current market conditions and potential support and resistance areas.
Color-Coded Levels: Distinguishes between different Fibonacci levels with distinct colors, making it easy to identify significant price points at a glance.
Target Labels (Optional): Optionally display labels next to the Fibonacci levels to help identify potential target zones and better visualize the key levels.
How It Works:
The Golden Target Auto Fib Indicator calculates Fibonacci retracement levels based on the highest high and lowest low over a specified length. The levels plotted include key Fibonacci ratios: 23.6%, 38.2%, 61.8%, and the 100% extension, providing valuable insights into potential support and resistance areas as well as price targets.
Usage:
Adjust Settings: Set the Length parameter to define the period over which Fibonacci levels are calculated.
Analyze Levels: Observe the plotted Fibonacci levels and their color-coded lines to identify potential price retracement zones and target areas.
Incorporate Into Strategy: Use these levels in conjunction with your trading strategy to make more informed decisions on entry and exit points.
Whether you're a day trader or a swing trader, the Golden Target Auto Fib Indicator simplifies Fibonacci analysis and integrates seamlessly into your TradingView charts, helping you make more precise trading decisions.
Get started today and enhance your technical analysis with the Golden Target Auto Fib Indicator!
Feel free to adjust the description according to the specific features or customization options of your indicator.
1000SATS and ORDI Market Cap RatioSure! Here is a detailed description and usage guide for your TradingView indicator:
### Indicator Description
**Title**: 1000SATS/ORDI Market Cap Ratio
**Description**: The "1000SATS/ORDI Market Cap Ratio" indicator calculates and visualizes the market capitalization ratio between 1000SATS and ORDI. This indicator allows traders and investors to analyze the relative market strength and valuation trends of 1000SATS compared to ORDI over time. By tracking this ratio, users can gain insights into market dynamics and potential trading opportunities between these two assets.
### Indicator Usage
**Purpose**:
- To compare the market capitalizations of 1000SATS and ORDI.
- To identify potential undervaluation or overvaluation of 1000SATS relative to ORDI.
- To assist in making informed trading and investment decisions based on market cap trends.
**How to Use**:
1. **Add the Indicator to Your Chart**:
- Open TradingView and navigate to your chart.
- Click on the "Indicators" button at the top of the chart.
- Select "Pine Editor" and paste the provided script.
- Click "Add to Chart" to apply the indicator.
2. **Interpret the Ratio**:
- The indicator will plot a line representing the ratio of the market capitalization of 1000SATS to ORDI.
- A rising ratio indicates that the market cap of 1000SATS is increasing relative to ORDI, suggesting stronger market performance or higher valuation of 1000SATS.
- A falling ratio indicates that the market cap of 1000SATS is decreasing relative to ORDI, suggesting weaker market performance or lower valuation of 1000SATS.
3. **Analyze Trends**:
- Use the indicator to spot trends and potential reversal points in the market cap ratio.
- Combine the ratio analysis with other technical indicators and chart patterns to enhance your trading strategy.
4. **Set Alerts**:
- Set custom alerts on the ratio to notify you of significant changes or specific thresholds being reached, enabling timely decision-making.
**Example**:
- If the ratio is consistently rising, it may indicate a good opportunity to consider 1000SATS as a stronger investment relative to ORDI.
- Conversely, if the ratio is falling, it may be a signal to reevaluate the strength of 1000SATS compared to ORDI.
**Note**: Always conduct thorough analysis and consider other market factors before making trading decisions based on this indicator.
### Script
```pinescript
//@version=4
study("1000SATS and ORDI Market Cap Ratio", shorttitle="1000SATS/ORDI Ratio", overlay=true)
// Define the circulating supply for ORDI and 1000SATS
ORDI_supply = 21000000 // Circulating supply of ORDI
SATS_1000_supply = 2100000000000 // Circulating supply of 1000SATS
// Fetch the price data for ORDI
ordi_price = security("BINANCE:ORDIUSDT", timeframe.period, close)
// Fetch the price data for 1000SATS
sats_1000_price = security("BINANCE:1000SATSUSDT", timeframe.period, close)
// Calculate the market capitalizations
ordi_market_cap = ordi_price * ORDI_supply
sats_1000_market_cap = sats_1000_price * SATS_1000_supply
// Calculate the market cap ratio
ratio = sats_1000_market_cap / ordi_market_cap
// Plot the ratio
plot(ratio, title="1000SATS/ORDI Market Cap Ratio", color=color.blue, linewidth=2)
```
This description and usage guide should help users understand the purpose and functionality of your indicator, as well as how to effectively apply it in their trading activities on TradingView.
MultiTFlevels with Volume Display1. Overview
This indicator is intended for use on trading platforms like TradingView and provides the following features:
Volume Profile Analysis:
Shows cumulative volume delta (CVD) and displays buying and selling volumes.
Historical OHLC Levels:
Plots historical open, high, low, and close levels for various timeframes (e.g., daily, weekly, monthly).
Customizable Settings:
Allows users to toggle different elements and customize display options.
2. Inputs
Timeframe Display Toggles:
Users can choose to display OHLC levels from different timeframes such as previous month, week, day, 4H, 1H, 30M, 15M, and 5M.
CVD Display Toggle: Option to show or hide the Cumulative Volume Delta (CVD).
Line and Label Customization:
leftOffset and rightOffset: Define how far lines are extended left and right from the current bar.
colorMonth, colorWeek, etc.: Customize colors for different timeframe OHLC levels.
labelOffset and rightOffset: Control the positioning of volume labels.
3. Key Features
Cumulative Volume Delta (CVD)
Calculation:
Computes the cumulative volume delta by adding or subtracting the volume based on whether the close price is higher or lower than the open price.
Display:
Shows a label on the chart indicating the current CVD value and whether the market is leaning towards buying or selling.
Historical OHLC Levels
Data Retrieval:
Uses the request.security function to fetch OHLC data from different timeframes (e.g., monthly, weekly, daily).
Plotting:
Draws lines and labels on the chart to represent open, high, low, and close levels for each selected timeframe.
Buying and Selling Volumes
Calculation:
Calculates buying and selling volumes based on whether the close price is higher or lower than the open price.
Display:
Shows labels on the chart for buying and selling volumes.
4. Functions
getOHLC(timeframe)
Retrieves open, high, low, and close values from the specified timeframe.
plotOHLC(show, open, high, low, close, col, prefix)
Draws OHLC lines and labels on the chart for the given timeframe and color.
5. Usage
Chart Overlay: The indicator is overlaid on the main chart (i.e., it appears directly on the price chart).
Historical Analysis:
Useful for analyzing historical price levels and volume dynamics across different timeframes.
Volume Insights:
Helps traders understand the cumulative volume behavior and market sentiment through the CVD and volume labels.
In essence, this indicator provides a comprehensive view of historical price levels across multiple timeframes and the dynamics of market volume through CVD and volume labels. It can be particularly useful for traders looking to combine price action with volume analysis for a more in-depth market assessment.
Important Levels by Sandun Kolambage
### Pine Script Indicator: Important Levels by Sandun Kolambage
#### Description
Introducing our new pivot point and high/low indicator for TradingView! This indicator is designed to help traders identify key levels of support and resistance across different timeframes, from daily to yearly. By analyzing historical data and market trends, our indicator displays the most important pivot points and high/low levels, giving you a better understanding of market dynamics and potential trading opportunities.
Whether you're a day trader, swing trader, or long-term investor, our indicator can help you optimize your trading strategy and achieve your financial goals. Install our indicator on TradingView today and start taking advantage of these important levels!
#### Key Features
- **Daily, Weekly, Monthly, and Yearly Levels:** Automatically plots the open, high, low, and close prices for different timeframes to help traders identify significant levels.
- **Pivot Points:** Calculates and displays pivot points for weekly, monthly, and yearly timeframes, providing additional support and resistance levels.
- **Customizable Line Styles:** Offers options to customize the appearance of the lines (solid, dashed, or dotted) for better visualization.
- **Conditional Coloring:** Uses color coding to highlight the relationship between different timeframe closes, making it easy to spot important levels.
#### How It Works
1. **Daily, Weekly, Monthly, and Yearly Levels:**
- The indicator uses `request.security` to fetch and display open, high, low, and close prices for daily, weekly, monthly, and yearly timeframes.
- Lines are plotted at these key levels with colors indicating their relationship to closes of other timeframes.
2. **Pivot Points:**
- Pivot points are calculated using the formula \((High + Low + Close) / 3\).
- These pivot points are plotted on the chart and labeled clearly to indicate potential support and resistance areas.
3. **Customizable Line Styles:**
- Users can select from solid, dashed, or dotted lines to represent the key levels and pivot points for better clarity and personal preference.
4. **Conditional Coloring:**
- The indicator applies conditional coloring to the lines based on the comparison of current close prices across different timeframes. Yellow indicates lower closes, and red indicates higher closes, making it easy to identify important price levels quickly.
#### Usage Instructions
1. **Enable Key Levels:**
- Toggle the "Daily Weekly Monthly High/Low" option to display or hide the respective levels.
- Select your preferred line style (solid, dashed, dotted) for better visibility.
2. **Display Pivot Points:**
- Toggle the "Pivot" option to show or hide the weekly, monthly, and yearly pivot points on the chart.
3. **Interpret Color Coding:**
- Yellow lines indicate levels where the close price is lower compared to a specific timeframe close.
- Red lines indicate levels where the close price is higher compared to a specific timeframe close.
- Specific colors for yearly levels and pivots are used to distinguish them clearly on the chart.
By following these guidelines, traders can effectively use this indicator to identify critical price levels and make informed trading decisions.
MNQ/NQ Rotations [Tiestobob]### Indicator Description: MNQ/NQ Rotations
TO BE USED ONLY ON THE CONTINOUS CONTRACTS NQ1! and MNQ1! It will not work on others or the forward contracts of these.
#### Overview
The MNQ/NQ Rotations indicator is designed for traders of Nasdaq futures (MNQ and NQ) to visualize key price levels where typical market rotations occur. This indicator identifies and highlights the xxx.20 and xxx.80 levels based on empirical data and trading experience, allowing traders to recognize potential support and resistance points during trading sessions.
#### Key Features
- **Timeframe Selection**: The indicator allows users to specify a timeframe for identifying breakout candles, ensuring flexibility across different trading strategies.
- **Active Trading Range**: Users can define an active trading range, focusing the analysis on specific hours when the market is most active.
- **Visual Representation**: The indicator paints horizontal lines at key price levels (xxx.20 and xxx.80), extending them across a user-defined length to aid in visual analysis.
- **Customization**: Users can customize the color of the lines to match their charting preferences.
#### Inputs
- **Timeframe (`tf`)**: Defines the timeframe to select the breakout candle (default: 1 minute).
- **Active Trading Range (`session`)**: Specifies the time range for identifying breakout candles (default: 08:00-12:00).
- **Line Color (`line_color`)**: Allows customization of the line color (default: purple).
#### Logic
1. **Session Validation**: The indicator checks if the current bar falls within the specified active trading range.
2. **Price Point Calculation**: For each candle close, the indicator calculates the nearest xxx.20 and xxx.80 levels.
3. **Line Drawing**: Horizontal lines are drawn at these key levels, extending a specified length forward to highlight potential rotation points.
#### Use Cases
- **Support and Resistance Identification**: By highlighting the xxx.20 and xxx.80 levels, traders can easily spot areas where the market is likely to reverse or consolidate.
- **Breakout Trading**: Traders can use the indicator to identify breakout levels and set appropriate entry points.
- **Risk Management**: The visual cues provided by the indicator can help traders set more effective stop-loss and take-profit levels.
#### Example
A trader using a 1-minute timeframe with an active trading range from 08:00 to 12:00 will see horizontal lines painted at the nearest xxx.20 and xxx.80 levels for each candle close during this period. These lines serve as visual markers for typical rotation points, aiding in decision-making and trade planning.
#### Conclusion
The MNQ/NQ Rotations indicator is a powerful tool for traders looking to enhance their market analysis of Nasdaq futures. By focusing on empirically derived rotation levels, this indicator provides clear visual cues for identifying key price levels, supporting more informed trading decisions.
HTF TriangleHTF Triangle by ZeroHeroTrading aims at detecting ascending and descending triangles using higher time frame data, without repainting nor misalignment issues.
It addresses user requests for combining Ascending Triangle and Descending Triangle into one indicator.
Ascending triangles are defined by an horizontal upper trend line and a rising lower trend line. It is a chart pattern used in technical analysis to predict the continuation of an uptrend.
Descending triangles are defined by a falling upper trend line and an horizontal lower trend line. It is a chart pattern used in technical analysis to predict the continuation of a downtrend.
This indicator can be useful if you, like me, believe that higher time frames can offer a broader perspective and provide clearer signals, smoothing out market noise and showing longer-term trends.
You can change the indicator settings as you see fit to tighten or loosen the detection, and achieve the best results for your use case.
Features
It draws the detected ascending and descending triangles on the chart.
It supports alerting when a detection occurs.
It allows for selecting ascending and/or descending triangle detection.
It allows for setting the higher time frame to run the detection on.
It allows for setting the minimum number of consecutive valid higher time frame bars to fit the pattern criteria.
It allows for setting a high/low factor detection criteria to apply on higher time frame bars high/low as a proportion of the distance between the reference bar high/low and open/close.
It allows for turning on an adjustment of the triangle using highest/lowest values within valid higher time frame bars.
Settings
Ascending checkbox: Turns on/off ascending triangle detection. Default is on.
Descending checkbox: Turns on/off descending triangle detection. Default is on.
Higher Time Frame dropdown: Selects higher time frame to run the detection on. It must be higher than, and a multiple of, the chart's timeframe. Default is 5 minutes.
Valid Bars Minimum field: Sets minimum number of consecutive valid higher time frame bars to fit the pattern criteria. Default is 3. Minimum is 1.
High/Low Factor checkbox: Turns on/off high/low factor detection criteria. Default is on.
High/Low Factor field: Sets high/low factor to apply on higher time frame bars high/low as a proportion of the distance between the reference bar high/low and open/close. Default is 0. Minimum is 0. Maximum is 1.
Adjust Triangle checkbox: Turns on/off triangle adjustment using highest/lowest values within valid higher time frame bars. Default is on.
Detection Algorithm Notes
The detection algorithm recursively selects a higher time frame bar as reference. Then it looks at the consecutive higher time frame bars (as per the requested number of minimum valid bars) as follows:
Ascending Triangle
Low must be higher than previous bar.
Open/close max value must be lower than (or equal to) reference bar high.
When high/low factor criteria is turned on, high must be higher than (or equal to) reference bar open/close max value plus high/low factor proportion of the distance between reference bar high and open/close max value.
Descending Triangle
High must be lower than previous bar.
Open/close min value must be higher than (or equal to) reference bar low.
When high/low factor criteria is turned on, low must be lower than (or equal to) reference bar open/close min value minus high/low factor proportion of the distance between reference bar low and open/close min value.
VWAP with RSIVWAP with RSI Indicator
Overview
The VWAP with RSI Indicator is a powerful tool that combines the Volume Weighted Average Price (VWAP) with the Relative Strength Index (RSI) to provide traders with comprehensive insights into price trends, volume-weighted price levels, and market momentum. This dual-indicator setup enhances your trading strategy by offering a clearer understanding of the market conditions, potential entry and exit points, and trend reversals.
Key Features
VWAP (Volume Weighted Average Price):
Calculation: The VWAP is calculated using the high, low, and close prices, weighted by trading volume over a specified period.
Purpose: VWAP provides an average price that reflects the trading volume at different price levels, helping traders identify the true average price over a given period.
Visualization: The VWAP line is plotted in blue on the price chart, indicating the volume-weighted average price.
RSI (Relative Strength Index):
Calculation: RSI is based on the average gains and losses over a specified period (default is 14 periods) and ranges from 0 to 100.
Purpose: RSI measures the speed and change of price movements, identifying overbought or oversold conditions in the market.
Overbought/Oversold Levels:
Overbought: RSI above 70 (red line).
Oversold: RSI below 30 (green line).
Midline: RSI at 50 (gray dashed line).
Visualization: The RSI line changes color based on its value (purple for normal, red for overbought, green for oversold) and is plotted below the price chart.
Background Fill for RSI:
Overbought Area: Shaded red when RSI is above 70.
Oversold Area: Shaded green when RSI is below 30.
Bullish and Bearish Divergence Detection:
Bullish Divergence: Occurs when price forms a lower low, but RSI forms a higher low, indicating potential upward reversal.
Visualization: Bullish divergence points are marked with a green line and labeled "Bull."
Bearish Divergence: Occurs when price forms a higher high, but RSI forms a lower high, indicating potential downward reversal.
Visualization: Bearish divergence points are marked with a red line and labeled "Bear."
Alerts: Conditions for bullish and bearish divergences trigger alerts.
Settings
VWAP Settings:
hideonDWM: Option to hide VWAP on daily or higher timeframes.
src: Source for VWAP calculation (default is hlc3 - (high + low + close)/3).
offset: Offset for plotting the VWAP.
RSI Settings:
rsiLengthInput: Period length for RSI calculation (default is 14).
rsiSourceInput: Source for RSI calculation (default is close price).
maTypeInput: Type of moving average applied to RSI (options: SMA, EMA).
maLengthInput: Length of the moving average applied to RSI.
How to Use
Trend Identification: Use VWAP to identify the average price level and market trend. If the price is above VWAP, it suggests an uptrend, and if below, it suggests a downtrend.
Overbought/Oversold Conditions: Use RSI to identify potential reversal points. RSI above 70 indicates overbought conditions, and below 30 indicates oversold conditions.
Divergence: Look for bullish or bearish divergences between price and RSI to anticipate potential trend reversals.
Conclusion
By combining VWAP and RSI, this indicator provides a robust framework for analyzing market conditions, identifying trends, and making more informed trading decisions. Enhance your trading strategy today with the VWAP with RSI Indicator!
Global Market Cap of all measuable assets# Comprehensive Global Market Cap Overview
This indicator provides a dynamic, real-time estimate of the total global market value across multiple asset classes and economic sectors. It aims to give traders and analysts a broad perspective on the state of global markets and wealth.
## Features:
- Real-time data for major market segments including stocks, bonds, real estate, cryptocurrencies, and commodities
- Estimates for hard-to-quantify sectors like derivatives, private equity, and OTC markets
- Includes often-overlooked categories such as cash deposits, insurance markets, and natural resources
- Static estimates for art/collectibles and intellectual property
- Total global value calculation and breakdown by category
- Easy-to-read table display of all categories
## Categories Tracked:
1. Global Stock Market
2. Global Bond Market
3. Real Estate
4. Cryptocurrencies
5. Commodities
6. Derivatives Market
7. Private Equity and Venture Capital
8. Cash and Bank Deposits
9. Insurance Markets
10. Sovereign Wealth Funds
11. OTC Markets
12. Natural Resources
13. Art and Collectibles
14. Intellectual Property
## Data Sources:
- Uses popular ETFs and indices as proxies for global markets where possible
- Incorporates data from specific company stocks to represent certain markets (e.g., CME for derivatives, OTCM for OTC markets)
- Utilizes FRED data for bank deposits
- Includes static estimates for categories without reliable real-time data sources
## Notes:
- All values are approximate and should be used for general perspective rather than precise financial analysis
- Some categories use scaled proxy data, which may not perfectly represent global totals
- Static estimates are used where real-time data is unavailable and should be updated periodically
- The total global value includes human capital but this is not displayed in the table due to its speculative nature
This indicator is designed to provide a comprehensive overview of global market value, going beyond traditional market capitalization metrics. It's ideal for traders, researchers, and anyone interested in gaining a broader understanding of global wealth distribution across various sectors.
Please note that due to the complexity of global markets and limitations in data availability, all figures should be considered estimates and used as part of a broader analysis rather than as definitive values.
CofG Oscillator w/ Added Normalizations/TransformationsThis indicator is a unique study in normalization/transformation techniques, which are applied to the CG (center of gravity) Oscillator, a popular oscillator made by John Ehlers.
The idea to transform the data from this oscillator originated from observing the original indicator, which exhibited numerous whips. Curious about the potential outcomes, I began experimenting with various normalization/transformation methods and discovered a plethora of interesting results.
The indicator offers 10 different types of normalization/transformation, each with its own set of benefits and drawbacks. My personal favorites are the Quantile Transformation , which converts the dataset into one that is mostly normally distributed, and the Z-Score , which I have found tends to provide better signaling than the original indicator.
I've also included the option of showing the mean, median, and mode of the data over the period specified by the transformation period. Using this will allow you to gather additional insights into how these transformations effect the distribution of the data series.
I've also included some notes on what each transformation does, how it is useful, where it fails, and what I've found to be the best inputs for it (though I'd encourage you to play around with it yourself).
Types of Normalization/Transformation:
1. Z-Score
Overview: Standardizes the data by subtracting the mean and dividing by the standard deviation.
Benefits: Centers the data around 0 with a standard deviation of 1, reducing the impact of outliers.
Disadvantages: Works best on data that is normally distributed
Notes: Best used with a mid-longer transformation period.
2. Min-Max
Overview: Scales the data to fit within a specified range, typically 0 to 1.
Benefits: Simple and fast to compute, preserves the relationships among data points.
Disadvantages: Sensitive to outliers, which can skew the normalization.
Notes: Best used with mid-longer transformation period.
3. Decimal Scaling
Overview: Normalizes data by moving the decimal point of values.
Benefits: Simple and straightforward, useful for data with varying scales.
Disadvantages: Not commonly used, less intuitive, less advantageous.
Notes: Best used with a mid-longer transformation period.
4. Mean Normalization
Overview: Subtracts the mean and divides by the range (max - min).
Benefits: Centers data around 0, making it easier to compare different datasets.
Disadvantages: Can be affected by outliers, which influence the range.
Notes: Best used with a mid-longer transformation period.
5. Log Transformation
Overview: Applies the logarithm function to compress the data range.
Benefits: Reduces skewness, making the data more normally distributed.
Disadvantages: Only applicable to positive data, breaks on zero and negative values.
Notes: Works with varied transformation period.
6. Max Abs Scaler
Overview: Scales each feature by its maximum absolute value.
Benefits: Retains sparsity and is robust to large outliers.
Disadvantages: Only shifts data to the range , which might not always be desirable.
Notes: Best used with a mid-longer transformation period.
7. Robust Scaler
Overview: Uses the median and the interquartile range for scaling.
Benefits: Robust to outliers, does not shift data as much as other methods.
Disadvantages: May not perform well with small datasets.
Notes: Best used with a longer transformation period.
8. Feature Scaling to Unit Norm
Overview: Scales data such that the norm (magnitude) of each feature is 1.
Benefits: Useful for models that rely on the magnitude of feature vectors.
Disadvantages: Sensitive to outliers, which can disproportionately affect the norm. Not normally used in this context, though it provides some interesting transformations.
Notes: Best used with a shorter transformation period.
9. Logistic Function
Overview: Applies the logistic function to squash data into the range .
Benefits: Smoothly compresses extreme values, handling skewed distributions well.
Disadvantages: May not preserve the relative distances between data points as effectively.
Notes: Best used with a shorter transformation period. This feature is actually two layered, we first put it through the mean normalization to ensure that it's generally centered around 0.
10. Quantile Transformation
Overview: Maps data to a uniform or normal distribution using quantiles.
Benefits: Makes data follow a specified distribution, useful for non-linear scaling.
Disadvantages: Can distort relationships between features, computationally expensive.
Notes: Best used with a very long transformation period.
Conclusion
Feel free to explore these normalization/transformation techniques to see how they impact the performance of the CG Oscillator. Each method offers unique insights and benefits, making this study a valuable tool for traders, especially those with a passion for data analysis.
9:30 Opening Price MarkerIndicator Name: 9:30 Opening Price Marker
Description:
The "9:30 Opening Price Marker" is a custom indicator for TradingView that highlights the opening price at 9:30 AM in the UTC-4 time zone (Eastern Daylight Time) on the chart. It helps traders and analysts easily identify and track the price level at which the market opens each day.
Features:
Timezone Conversion: The indicator converts the current time to the UTC-4 timezone (Eastern Daylight Time) to accurately determine the 9:30 AM opening price.
Visual Marker: It visually marks the opening price with a dotted line on the chart, making it prominent for quick reference.
Label: Additionally, it includes a label next to the opening price line, indicating "9:30 Opening Price", enhancing clarity and usability.
Overlay: The indicator is designed to overlay on the price chart, ensuring it doesn't clutter other technical analysis tools or indicators.
Usage:
Day-to-Day Analysis: Traders can use this indicator to quickly gauge market sentiment at the daily opening, which can influence intraday trading strategies.
Reference Point: Acts as a reference point for identifying price movements and potential trading opportunities relative to the day's opening price.
Time-Specific Insights: Provides insights into price action immediately following the market open, aiding in decision-making based on early trading activity.
Installation: Copy the provided Pine Script code into TradingView's Pine Editor, save the script as an indicator, and apply it to your chart.
Disclaimer : This indicator is intended for informational purposes only and should not be solely relied upon for trading decisions. Always consider multiple sources of information and perform thorough analysis before executing trades.
Several Fundamentals in One [aep]
**Financial Ratios Indicator**
This comprehensive Financial Ratios Indicator combines various essential metrics to help traders and investors evaluate the financial health of companies at a glance. The following categories are included:
### Valuation Ratios
- **P/B Ratio (Price to Book Ratio)**: Assesses if a stock is undervalued or overvalued by comparing its market price to its book value.
- **P/E Ratio TTM (Price to Earnings Ratio Trailing Twelve Months)**: Indicates how many years of earnings would be needed to pay the current stock price by comparing the stock price to earnings per share over the last twelve months.
- **P/FCF Ratio TTM (Price to Free Cash Flow Ratio Trailing Twelve Months)**: Evaluates a company's ability to generate free cash flow by comparing the market price to free cash flow per share over the last twelve months.
- **Tobin Q Ratio**: Indicates whether the market is overvaluing or undervaluing a company’s assets by comparing market value to replacement cost.
- **Piotroski F-Score (0-9)**: A scoring system that identifies financially strong companies based on fundamental metrics.
### Efficiency
- **Net Margin % TTM**: Measures profitability by calculating the percentage of revenue that becomes net profit after all expenses and taxes.
- **Free Cashflow Margin %**: Indicates a company’s efficiency in generating free cash flow from its revenues by showing the percentage of revenue that translates into free cash flow.
- **ROE%, ROIC%, ROA%**: Evaluate a company’s efficiency in generating profits from equity, invested capital, and total assets, respectively.
### Liquidity Metrics
- **Debt to Equity Ratio**: Shows the level of debt relative to equity, helping assess financial leverage.
- **Current Ratio**: Measures a company's ability to pay short-term debts by comparing current assets to current liabilities.
- **Long Term Debt to Assets**: Evaluates the level of long-term debt in relation to total assets.
### Dividend Policy
- **Retention Ratio % TTM**: Indicates the proportion of earnings reinvested in the company instead of distributed as dividends.
- **Dividend/Earnings Ratio % TTM**: Measures the percentage of earnings paid out as dividends to shareholders.
- **RORE % TTM (Return on Retained Earnings)**: Assesses how effectively a company utilizes retained earnings to generate additional profits.
- **Dividend Yield %**: Indicates the dividend yield of a stock by comparing annual dividends per share to the current stock price.
### Growth Ratios
- **EPS 1yr Growth %**: Measures the percentage growth of earnings per share over the last year.
- **Revenue 1yr Growth %**: Evaluates the percentage growth of revenue over the last year.
- **Sustainable Growth Rate**: Indicates the growth rate a company can maintain without increasing debt, assessing sustainable growth using internal resources.
Utilize this indicator to streamline your analysis of financial performance and make informed trading decisions.
Kernel SwitchThe indicator uses different kernel regression functions and filters to analyze and smooth the price data. It incorporates various technical analysis features like moving averages, ATR-based channels, and the Kalman filter to generate buy and sell signals. The purpose of this indicator is to help traders identify trends, reversals, and potential trade entry and exit points.
Key Components and Functionalities:
Kernel and Filter Selection:
Kernel: Options include RationalQuadratic, Gaussian, Periodic, and LocallyPeriodic.
Filter: Options include No Filter, Smooth, and Zero Lag.
Source: The source data for the calculations (default is close).
Lookback Period: The lookback period for the kernel calculations.
Relative Weight: Used for RationalQuadratic kernel.
Start at Bar: The starting bar index for the calculations.
Period: Used for Periodic and LocallyPeriodic kernels.
Additional Calculations:
Multiplier: Option to apply a multiplier to the kernel output.
Smoothing: Option to apply EMA smoothing to the kernel output.
Kalman Filter: Option to apply a Kalman filter to the smoothed output.
ATR Length: The length of the ATR used for calculating upper and lower bands.
Kernel Regression:
The code uses a switch statement to select and apply the chosen kernel function with the specified parameters.
Kalman Filter:
A custom function to apply a Kalman filter to the kernel output, providing additional smoothing and trend estimation.
ATR-based Channels:
Upper and lower bands are calculated using the kernel output and ATR, adjusted by a multiplier.
Buy/Sell Signals:
Buy signals are generated when the kernel output crosses above its previous value.
Sell signals are generated when the kernel output crosses below its previous value.
Plotting:
The main kernel output is plotted with color changes based on its direction (green for up, red for down).
Upper and lower bands are plotted based on the ATR-adjusted kernel output.
Buy and sell signals are marked on the chart with labels.
Additional markers are plotted when the high crosses above the upper band and the low crosses below the lower band.
Usage:
This indicator is used to analyze and smooth price data using various kernel regression functions and filters. It helps traders identify trends and potential reversal points, providing visual signals for buy and sell opportunities. By incorporating ATR-based channels and the Kalman filter, the indicator offers additional insights into price movements and volatility. Traders can customize the parameters to fit their specific trading strategies and preferences.
Important Note:
This script is provided for educational and template purposes and does not constitute financial advice. Traders and investors should conduct their research and analysis before making any trading decisions.
Simple Risk-to-Reward Multiplier A simple R/R indicator that allows you to input your entry price and stop loss (in ticks). Then, your take profit levels are R-multipliers based on your stop loss. You can have up to 5 take profit levels on your chart. There is also a function to indicate if it is a long or short setup. You can also set alerts with this script, allowing you the ability not to have to stare at the charts all day.
Strategy SEMA SDI WebhookPurpose of the Code:
The strategy utilizes Exponential Moving Averages (EMA) and Smoothed Directional Indicators (SDI) to generate buy and sell signals. It includes features like leverage, take profit, stop loss, and trailing stops. The strategy is intended for backtesting and automating trades based on the specified indicators and conditions.
Key Components and Functionalities:
1.Strategy Settings:
Overlay: The strategy will overlay on the price chart.
Slippage: Set to 1.
Commission Value: Set to 0.035.
Default Quantity Type: Percent of equity.
Default Quantity Value: 50% of equity.
Initial Capital: Set to 1000 units.
Calculation on Order Fills: Enabled.
Process Orders on Close: Enabled.
2.Date and Time Filters:
Inputs for enabling/disabling start and end dates.
Filters to execute strategy only within specified date range.
3.Leverage and Quantity:
Leverage: Adjustable leverage input (default 3).
USD Percentage: Adjustable percentage of equity to use for trades (default 50%).
Initial Capital: Calculated based on leverage and percentage of equity.
4.Take Profit, Stop Loss, and Trailing Stop:
Inputs for enabling/disabling take profit, stop loss, and trailing stop.
Adjustable parameters for take profit percentage (default 25%), stop loss percentage (default 4.8%), and trailing stop percentage (default 1.9%).
Calculations for take profit, stop loss, trailing price, and maximum profit tracking.
5.EMA Calculations:
Fast and slow EMAs.
Smoothed versions of the fast and slow EMAs.
6.SDI Calculations:
Directional movement calculation for positive and negative directional indicators.
Difference between the positive and negative directional indicators, smoothed.
7.Buy/Sell Conditions:
Long (Buy) Condition: Positive DI is greater than negative DI, and fast EMA is greater than slow EMA.
Short (Sell) Condition: Negative DI is greater than positive DI, and fast EMA is less than slow EMA.
8.Strategy Execution:
If buy conditions are met, close any short positions and enter a long position.
If sell conditions are met, close any long positions and enter a short position.
Exit conditions for long and short positions based on take profit, stop loss, and trailing stop levels.
Close all positions if outside the specified date range.
Usage:
This strategy is used to automate trading based on the specified conditions involving EMAs and SDI. It allows backtesting to evaluate performance based on historical data. The strategy includes risk management through take profit, stop loss, and trailing stops to protect gains and limit losses. Traders can customize the parameters to fit their specific trading preferences and risk tolerance. Differently, it can perform leverage analysis and use it as a template.
By using this strategy, traders can systematically execute trades based on technical indicators, helping to remove emotional bias and improve consistency in trading decisions.
Important Note:
This script is provided for educational and template purposes and does not constitute financial advice. Traders and investors should conduct their research and analysis before making any trading decisions.
Parabolic SAR Waves [MMA]Parabolic SAR Waves
Description:
The "Parabolic SAR Waves " is an advanced version of the traditional Parabolic SAR indicator, customized for TradingView. This script incorporates dynamic acceleration factors and optional gradient coloration to enhance visual interpretation and utility for traders aiming to accurately capture trends and predict potential reversals.
Features:
- Dynamic Acceleration: Adjust the initial, incremental, and maximum values of the acceleration factor to suit various market conditions and trading preferences.
- Gradient Coloring: Use gradient colors to indicate the strength and stability of the trend, providing visual cues that are easy to interpret.
- Trend Visibility: The SAR dots are plotted directly on the price chart, making it easy to spot trend changes and maintain situational awareness.
- Overlay Feature: Designed to overlay directly on the price charts, allowing for seamless integration with other technical analysis tools.
Benefits:
- Trend Detection: Helps in identifying the beginning and potential reversal of trends, aiding in timely decision-making.
- Stop-Loss Management: Utilizes the positions of the SAR dots as dynamic stop-loss points, which helps in risk management.
- Visual Simplicity: Enhances the decision-making process through a straightforward visual representation of trend data.
Parameters:
- Acceleration Start (accel_start): The initial value for the acceleration, set to 0.02 by default.
- Acceleration Increment (accel_inc): The amount by which the acceleration increases, set to 0.005 by default.
- Acceleration Maximum (accel_max): The maximum limit of the acceleration factor, set to 0.1 by default.
- Use Gradient Colors (use_gradient): A boolean toggle to enable or disable gradient coloring, enabled by default.
Indicator Usage:
1. To apply, select this indicator from TradingView's indicator library.
2. Adjust the acceleration parameters based on your specific trading strategy and market analysis.
3. Interpret the indicator signals:
- Green SAR dots below the price bars indicate a bullish trend.
- Red SAR dots above the price bars signify a bearish trend.
- Gradient colors, if enabled, provide insights into the acceleration factor's intensity relative to trend strength.
Alerts:
- Bullish Reversal Alert: Issues a notification if there is a potential upward reversal when the trend shifts to bullish.
- Bearish Reversal Alert: Alerts when there's potential for a downward move as the trend turns bearish.
The "Parabolic SAR Waves " is a robust tool, ideal for traders who need precise, customizable trend-following capabilities that integrate seamlessly with other market analysis strategies. Enhance your trading with detailed trend insights and adaptive parameter controls.
20-day High BreakoutOverview:
The 20-day High Breakout Indicator is a very simple yet powerful tool designed for traders seeking to capitalize on significant price movements in the stock market. This indicator identifies potential buy and sell signals based on a stock's 20-day high breakout levels, making it an essential addition to your trading strategy.
Key Features:
Swing Period Input: Customize the swing period to your preferred number of days, with a default of 20 days, allowing flexibility based on your trading style.
Trailing Stop Level: Automatically calculates the trailing stop level based on the highest high and lowest low within the defined swing period, helping to manage risk and lock in profits.
Buy and Sell Signals: Generates clear buy signals when the price crosses above the trailing stop level and sell signals when the price crosses below, enabling timely entries and exits.
Visual Indicators: Plots buy signals as green upward triangles below the bars and sell signals as red downward triangles above the bars, providing easy-to-interpret visual cues directly on the chart.
How It Works:
Resistance and Support Levels: The indicator calculates the highest high (resistance) and lowest low (support) over the defined swing period.
Swing Direction: It determines the market direction by comparing the current closing price to the previous resistance and support levels.
Trailing Stop Calculation: Depending on the market direction, the trailing stop level is set to either the support or resistance level.
Signal Generation: Buy and sell signals are generated based on the crossover of the closing price and the trailing stop level, filtered to ensure only valid signals are displayed.
Visual Representation: The trailing stop level is plotted as a line, and buy/sell signals are marked with respective shapes for easy identification.
Usage:
Trend Following: Ideal for traders looking to follow trends and catch significant breakouts in the stock price.
Risk Management: Helps in managing risk by providing a trailing stop level that adjusts with market movements.
Visual Clarity: The clear visual signals make it easy for traders to interpret and act upon the indicator's signals.
Add the 20-day High Breakout Indicator to your TradingView charts to enhance your trading strategy and gain an edge in identifying profitable trading opportunities.
Inversion Fair Value Gaps [TradingFinder] IFVG ICT Signal| Alert🔵 Introduction
🟣 Inversion Fair Value Gap (IFVG)
An ICT Inversion Fair Value Gap, or reverse FVG, occurs when a fair value gap fails to hold its price, resulting in the price moving beyond and breaking the gap. This situation marks the initial change in price momentum.
Generally, prices respect fair value gaps and continue in their trend direction. However, when a fair value gap is breached, it transforms into an inversion fair value gap, signaling a potential short-term reversal or a subsequent change in direction.
🔵 How to Use
🟣 Identifying an Inversion Fair Value Gap
To spot an IFVG, you must first identify a fair value gap.
Inversion fair value gaps can be categorized into two types :
🟣 Bullish Inversion Fair Value Gap
A bullish IFVG occurs when a bearish fair value gap is invalidated by the price closing above it.
Steps to identify it :
Identify a bearish fair value gap.
When the price closes above this gap, it becomes a bullish inversion fair value gap.
This gap acts as a support level, pushing the price upwards and indicating a shift in momentum from sellers to buyers.
🟣 Bearish Inversion Fair Value Gap
A bearish IFVG happens when a bullish fair value gap fails, with the price closing below it.
Steps to identify it :
Identify a bullish fair value gap.
When the price closes below this gap, it becomes a bearish inversion fair value gap.
This gap acts as a resistance level, pushing the price downwards and indicating a shift in momentum from buyers to sellers.
🔵 Settings
🟣 Global Settings
Show All Inversion FVG: If disabled, only the most recent FVG will be displayed.
IFVG Validity Period (Bar): Determines the maximum duration (in number of candles) that the FVG and IFVG remain valid.Switching Colors Theme Mode: Includes three modes: "Off", "Light", and "Dark". "Light" mode adjusts colors for light mode use, "Dark" mode adjusts colors for dark mode use, and "Off" disables color adjustments.
🟣 Logic Settings
FVG Filter : This refines the number of identified FVG areas based on a specified algorithm to focus on higher quality signals and reduce noise.
Types of FVG filters :
Very Aggressive Filter : Adds a condition where, for an upward FVG, the last candle's highest price must exceed the middle candle's highest price, and for a downward FVG, the last candle's lowest price must be lower than the middle candle's lowest price. This minimally filters out FVGs.
Aggressive Filte r: Builds on the Very Aggressive mode by ensuring the middle candle is not too small, filtering out more FVGs.
Defensive Filter : Adds criteria regarding the size and structure of the middle candle, requiring it to have a substantial body and specific polarity conditions, filtering out a significant number of FVGs.
Very Defensive Filter : Further refines filtering by ensuring the first and third candles are not small-bodied doji candles, retaining only the highest quality signals.
Mitigation Level FVG and IFVG : Options include "Proximal", "Distal", or "50 % OB" modes, which you can choose based on your needs. The "50 % OB" line is the midpoint between distal and proximal.
🟣 Display Settings
Show Bullish IFVG : Toggles the display of demand-related boxes.
Show Bearish IFVG : Toggles the display of supply-related boxes.
🟣 Alert Settings
Alert Inversion FVG Mitigation : Enables alerts for Inversion FVG mitigation.
Message Frequency : Determines the frequency of alerts. Options include 'All' (every function call), 'Once Per Bar' (first call within the bar), and 'Once Per Bar Close' (final script execution of the real-time bar). Default is 'Once per Bar'.
Show Alert Time by Time Zone : Configures the time zone for alert messages. Default is 'UTC'.
Display More Info : Provides additional details in alert messages, including price range, date, hour, and minute. Set to 'Off' to exclude this information.
ICT Killzones and Sessions W/ Silver Bullet + MacrosForex and Equity Session Tracker with Killzones, Silver Bullet, and Macro Times
This Pine Script indicator is a comprehensive timekeeping tool designed specifically for ICT traders using any time-based strategy. It helps you visualize and keep track of forex and equity session times, kill zones, macro times, and silver bullet hours.
Features:
Session and Killzone Lines:
Green: London Open (LO)
White: New York (NY)
Orange: Australian (AU)
Purple: Asian (AS)
Includes AM and PM session markers.
Dotted/Striped Lines indicate overlapping kill zones within the session timeline.
Customization Options:
Display sessions and killzones in collapsed or full view.
Hide specific sessions or killzones based on your preferences.
Customize colors, texts, and sizes.
Option to hide drawings older than the current day.
Automatic Updates:
The indicator draws all lines and boxes at the start of a new day.
Automatically adjusts time-based boxes according to the New York timezone.
Killzone Time Windows (for indices):
London KZ: 02:00 - 05:00
New York AM KZ: 07:00 - 10:00
New York PM KZ: 13:30 - 16:00
Silver Bullet Times:
03:00 - 04:00
10:00 - 11:00
14:00 - 15:00
Macro Times:
02:33 - 03:00
04:03 - 04:30
08:50 - 09:10
09:50 - 10:10
10:50 - 11:10
11:50 - 12:50
Latest Update:
January 15:
Added option to automatically change text coloring based on the chart.
Included additional optional macro times per user request:
12:50 - 13:10
13:50 - 14:15
14:50 - 15:10
15:50 - 16:15
Usage:
To maximize your experience, minimize the pane where the script is drawn. This minimizes distractions while keeping the essential time markers visible. The script is designed to help traders by clearly annotating key trading periods without overwhelming their charts.
Originality and Justification:
This indicator uniquely integrates various time-based strategies essential for ICT traders. Unlike other indicators, it consolidates session times, kill zones, macro times, and silver bullet hours into one comprehensive tool. This allows traders to have a clear and organized view of critical trading periods, facilitating better decision-making.
Credits:
This script incorporates open-source elements with significant improvements to enhance functionality and user experience.
Forex and Equity Session Tracker with Killzones, Silver Bullet, and Macro Times
This Pine Script indicator is a comprehensive timekeeping tool designed specifically for ICT traders using any time-based strategy. It helps you visualize and keep track of forex and equity session times, kill zones, macro times, and silver bullet hours.
Features:
Session and Killzone Lines:
Green: London Open (LO)
White: New York (NY)
Orange: Australian (AU)
Purple: Asian (AS)
Includes AM and PM session markers.
Dotted/Striped Lines indicate overlapping kill zones within the session timeline.
Customization Options:
Display sessions and killzones in collapsed or full view.
Hide specific sessions or killzones based on your preferences.
Customize colors, texts, and sizes.
Option to hide drawings older than the current day.
Automatic Updates:
The indicator draws all lines and boxes at the start of a new day.
Automatically adjusts time-based boxes according to the New York timezone.
Killzone Time Windows (for indices):
London KZ: 02:00 - 05:00
New York AM KZ: 07:00 - 10:00
New York PM KZ: 13:30 - 16:00
Silver Bullet Times:
03:00 - 04:00
10:00 - 11:00
14:00 - 15:00
Macro Times:
02:33 - 03:00
04:03 - 04:30
08:50 - 09:10
09:50 - 10:10
10:50 - 11:10
11:50 - 12:50
Latest Update:
January 15:
Added option to automatically change text coloring based on the chart.
Included additional optional macro times per user request:
12:50 - 13:10
13:50 - 14:15
14:50 - 15:10
15:50 - 16:15
ICT Sessions and Kill Zones
What They Are:
ICT Sessions: These are specific times during the trading day when market activity is expected to be higher, such as the London Open, New York Open, and the Asian session.
Kill Zones: These are specific time windows within these sessions where the probability of significant price movements is higher. For example, the New York AM Kill Zone is typically from 8:30 AM to 11:00 AM EST.
How to Use Them:
Identify the Session: Determine which trading session you are in (London, New York, or Asian).
Focus on Kill Zones: Within that session, focus on the kill zones for potential trade setups. For instance, during the New York session, look for setups between 8:30 AM and 11:00 AM EST.
Silver Bullets
What They Are:
Silver Bullets: These are specific, high-probability trade setups that occur within the kill zones. They are designed to be "one shot, one kill" trades, meaning they aim for precise and effective entries and exits.
How to Use Them:
Time-Based Setup: Look for these setups within the designated kill zones. For example, between 10:00 AM and 11:00 AM for the New York AM session .
Chart Analysis: Start with higher time frames like the 15-minute chart and then refine down to 5-minute and 1-minute charts to identify imbalances or specific patterns .
Macros
What They Are:
Macros: These are broader market conditions and trends that influence your trading decisions. They include understanding the overall market direction, seasonal tendencies, and the Commitment of Traders (COT) reports.
How to Use Them:
Understand Market Conditions: Be aware of the macroeconomic factors and market conditions that could affect price movements.
Seasonal Tendencies: Know the seasonal patterns that might influence the market direction.
COT Reports: Use the Commitment of Traders reports to understand the positioning of large traders and commercial hedgers .
Putting It All Together
Preparation: Understand the macro conditions and review the COT reports.
Session and Kill Zone: Identify the trading session and focus on the kill zones.
Silver Bullet Setup: Look for high-probability setups within the kill zones using refined chart analysis.
Execution: Execute the trade with precision, aiming for a "one shot, one kill" outcome.
By following these steps, you can effectively use ICT sessions, kill zones, silver bullets, and macros to enhance your trading strategy.
Usage:
To maximize your experience, shrink the pane where the script is drawn. This minimizes distractions while keeping the essential time markers visible. The script is designed to help traders by clearly annotating key trading periods without overwhelming their charts.
Originality and Justification:
This indicator uniquely integrates various time-based strategies essential for ICT traders. Unlike other indicators, it consolidates session times, kill zones, macro times, and silver bullet hours into one comprehensive tool. This allows traders to have a clear and organized view of critical trading periods, facilitating better decision-making.
Credits:
This script incorporates open-source elements with significant improvements to enhance functionality and user experience. All credit goes to itradesize for the SB + Macro boxes
Order Blocks & Breaker Blocks [TradingFinder] Signals + Alerts🔵 Introduction
Order Block and Breaker Block, are powerful tools in technical analysis. By understanding these concepts, traders can enhance their ability to predict potential price reversals and continuations, leading to more effective trading strategies.
Using historical price action, volume analysis, and candlestick patterns, traders can identify key areas where institutional activities influence market movements.
🟣 Demand Order Block and Supply Breaker Block
Demand Order Block : A Demand Order Block is formed when the price succeeds in breaking the previous high pivot.
Supply Breaker Block : A Supply Breaker Block is formed when the price succeeds in breaking the Demand Order Block. As a result, the Order Block changes its role and turns from the role of price support to resistance.
🟣 Supply Order Block and Demand Breaker Block
Supply Order Block : A Supply Order Block is formed when the price succeeds in breaking the previous low pivot.
Demand Breaker Block : A Demand Breaker Block is formed when the price succeeds in breaking the Supply Order Block. As a result, the Order Block changes its role and turns from the role of price resistance to support.
🔵 How to Use
🟣 Order Blocks (Supply and Demand)
Order blocks are zones where the likelihood of a price reversal is higher. In demand zones, buying opportunities arise, while in supply zones, selling opportunities can be explored.
The "Refinement" feature allows you to adjust the width of the order block to fit your trading strategy. There are two modes in the "Order Block Refine" feature: "Aggressive" and "Defensive." The primary difference between these modes is the width of the order block.
For risk-averse traders, the "Defensive" mode is ideal as it offers a lower loss limit and a higher reward-to-risk ratio.
Conversely, for traders who are willing to take more risks, the "Aggressive" mode is more suitable. This mode, with its wider order block width, caters to those who prefer entering trades at higher prices.
🟣 Breaker Blocks (Supply and Demand)
Trading based on breaker blocks is the same as order blocks and the price in these zones is likely to be reversed.
🔵 Setting
🟣 Global Setting
Pivot Period of Order Blocks Detector : Enter the desired pivot period to identify the Order Block.
Order Block Validity Period (Bar) : You can specify the maximum time the Order Block remains valid based on the number of candles from the origin.
Mitigation Level Order Block : Determining the basic level of a Order Block. When the price hits the basic level, the Order Block due to mitigation.
Mitigation Level Breaker Block : Determining the basic level of a Breaker Block. When the price hits the basic level, the Breaker Block due to mitigation.
Switching Colors Theme Mode : Three modes "Off", "Light" and "Dark" are included in this parameter. "Light" mode is for color adjustment for use in "Light Mode".
"Dark" mode is for color adjustment for use in "Dark Mode" and "Off" mode turns off the color adjustment function and the input color to the function is the same as the output color.
🟣 Order Block Display
Show All Order Block : If it is turned off, only the last Order Block will be displayed.
Demand Main Order Block : Show or not show and specify color.
Demand Sub (Propulsion & BoS Origin) Order Block : Show or not show and specify color.
Supply Main Order Block : Show or not show and specify color.
Supply Sub (Propulsion & BoS Origin) Order Block : Show or not show and specify color.
🟣 Breaker Block Display
Show All Breaker Block : If it is turned off, only the last Breaker Block will be displayed.
Demand Main Breaker Block : Show or not show and specify color.
Demand Sub (Propulsion & BoS Origin) Breaker Block : Show or not show and specify color.
Supply Main Breaker Block : Show or not show and specify color.
Supply Sub (Propulsion & BoS Origin) Breaker Block : Show or not show and specify color.
🟣 Order Block Refinement
Refine Order Blocks : Enable or disable the refinement feature. Mode selection.
🟣 Alert
Alert Name : The name of the alert you receive.
Alert Demand OB Mitigation :
On / Off
Alert Demand BB Mitigation :
On / Off
Alert Supply OB Mitigation :
On / Off
Alert Supply BB Mitigation :
On / Off
Message Frequency :
This string parameter defines the announcement frequency. Choices include: "All" (activates the alert every time the function is called), "Once Per Bar" (activates the alert only on the first call within the bar), and "Once Per Bar Close" (the alert is activated only by a call at the last script execution of the real-time bar upon closing). The default setting is "Once per Bar".
Show Alert Time by Time Zone :
The date, hour, and minute you receive in alert messages can be based on any time zone you choose. For example, if you want New York time, you should enter "UTC-4". This input is set to the time zone "UTC" by default.
Display More Info :
Displays information about the price range of the order blocks (Zone Price) and the date, hour, and minute under "Display More Info".
If you do not want this information to appear in the received message along with the alert, you should set it to "Off".