Volume+The enhanced Volume+ Indicator is a valuable tool that builds upon the traditional Volume indicator by incorporating a technique known as linear prediction.
In traditional Volume analysis, the volume data for a bar is only known once the bar has closed. However, with the enhanced Volume+ Indicator, we utilize linear prediction to estimate the closing volume of the k-bar before it actually closes. This estimation is based on historical volume observed in the market.
By employing this indicator, traders and investors can gain an early insight into the potential volume of the current bar, even before it concludes. This can be particularly useful for those who wish to make informed decisions based on volume analysis and its impact on price movements.
===========================中文版本===========================
增强的Volume+指标是一个有价值的工具,它通过结合一种称为线性预测的技术建立在传统成交量指标的基础上。
在传统的成交量分析中,只有在柱线收盘后才能知道柱线的成交量数据。然而,通过增强的Volume+指标,我们利用线性预测来估计 k 柱实际收盘前的收盘成交量。该估计基于市场观察到的历史交易量。
通过使用该指标,交易者和投资者可以在k柱结束之前就尽早了解当前柱的潜在交易量。对于那些希望根据交易量分析及其对价格变动的影响做出明智决策的人来说,这尤其有用。
Сферы применения Pine
kyle algo v1
Integration of multiple technical indicators: The strategy mainly combines two technical indicators - Keltner Channels and Supertrend, to generate trading signals. It also calculates fifteen exponential moving averages (EMAs) for the high price with different periods ranging from 9 to 51.
Unique combination of indicators: The traditional Supertrend typically uses Average True Range (ATR) to calculate its upper and lower bands. In contrast, this script modifies the approach to use Keltner Channels instead.
Flexible sensitivity adjustment: This strategy provides a "sensitivity" input parameter for users to adjust, which controls the multiplier for the range in the Supertrend calculation. This can make the signals more or less sensitive to price changes, allowing users to tailor the strategy to their own risk tolerance and trading style.
EMA Energy Representation: The code offers a visualization of "EMA Energy", which color-codes the EMA lines based on whether the closing price is above or below the EMA line. This can provide an intuitive understanding of market trends.
Clear visual signals: The strategy generates clear "BUY" and "SELL" signals, represented as labels on the chart. This makes it easy to identify potential entry and exit points in the market.
Customizable: The script provides several user inputs, making it possible to fine-tune the strategy according to different market conditions and individual trading preferences.
EMA (Exponential Moving Average) Principle:
The EMA is a type of moving average that assigns more weight to the most recent data.
It responds more quickly to recent price changes and is used to capture short-term price trends.
Principle of Color Change :
In this trading strategy, the color of the EMA line changes based on whether the closing price is above or below the EMA. If the closing price is above the EMA, the EMA line turns green,
indicating an upward price trend. Conversely, if the closing price is below the EMA, the EMA line turns red,
indicating a downward price trend. These color changes help traders to more intuitively identify price trends
In short, our team provides a lot of practical space
That is your development space
Enhanced Parabolic SAR + EMA 200 + MACD SignalsParabolic SAR + EMA 200 + MACD Signals Indicator is a popular technical analysis tool used by traders to identify potential entry and exit points in the market. It combines three widely used indicators: Parabolic SAR, EMA 200, and MACD.
The Parabolic SAR indicator helps determine potential price reversals. It places dots above or below the price chart to indicate the direction of the trend. When the dots are below the price, it suggests an upward trend, and when they are above the price, it indicates a downward trend.
The EMA 200 (Exponential Moving Average 200) is a moving average that gives more weight to recent price data. It is often used as a significant support or resistance level. Traders consider the price to be in an uptrend if it is above the EMA 200 and in a downtrend if it is below the EMA 200.
The MACD (Moving Average Convergence Divergence) is a trend-following momentum indicator that calculates the difference between two exponential moving averages. It consists of a MACD line and a signal line. When the MACD line crosses above the signal line, it generates a bullish signal, indicating a potential buying opportunity. Conversely, when the MACD line crosses below the signal line, it generates a bearish signal, suggesting a potential selling opportunity.
To use the MACD-Parabolic SAR-EMA200 Indicator for trading, you can follow these guidelines:
Buy conditions:
1. The price should be above the EMA 200.
2. The Parabolic SAR should indicate an upward trend (dots below the price).
3. The MACD delta (the difference between the MACD line and the signal line) should be positive.
Sell conditions:
1. The price should be below the EMA 200.
2. The Parabolic SAR should indicate a downward trend (dots above the price).
3. The MACD delta should be negative.
By combining these three indicators, traders can gain additional confirmation of the overall trend direction and make more informed trading decisions. However, it's important to note that no indicator guarantees successful trades, and it's always advisable to use additional analysis and risk management techniques in conjunction with technical indicators.
Default Strategy Template© CN_FX-999
Coded By Christian Nataliano
First Coded In 14/06/2023
Last Edited In 22/06/2023
This Is A Default Strategy Template That Can Make Your Strategy Scripts More Organized With The Benefit Of Having The Same Layouts & Not Needing To Copy Over The Common Codes Such As Displaying Backtest Results, Opening & Closing Trades, Pine Connector Capabilities And A Clean User Input Interface. This Is A Blank Strategy Script So Feel Free To Use It As Your Default Template For Your Future Strategies.
Credits To Some Of The Custom Code In The Scripts To © ZenAndTheArtOfTrading, Especially The Table Data Plotting
Lot Size Calculator - GER30 Variable Contract sizeLot size calculator is built for ger30 (dax) it has variable contract size to meet all different brokers requirements
right click and move to pane above to add to chart window, in settings you can change line colour to opaque
8AM Vertical LineThis script is a Pine Script indicator for TradingView. It draws a vertical line on the chart at a specific hour, which can be customized by the user. The default displayed hour is set to 8 AM, but it can be adjusted using the input options.
The indicator takes into account the timezone offset specified by the user to ensure the correct hour is displayed according to their local time. The vertical line is drawn with a specified color, style, and width, which can also be customized.
The purpose of this indicator is to visually mark a specific hour on the chart, allowing traders to easily identify and reference that particular time point. It can be useful for various trading strategies or analysis that involve specific hours of the day.
ASG Delta %This utility script provides a convenient way to calculate the percentage gain or drop of a token's price within a user-defined date range. It eliminates the need for manual measurement on individual charts, saving time and effort.
The script is particularly valuable when integrated into a daily token scanning routine for watchlists. By comparing the significant gains or drops among different tokens, traders can identify potential trading opportunities.
Simply select the desired date range, and the script will identify the highest and lowest price points achieved during that period. It then shows a visual representation in the form of a bullish or bearish box, displaying the percentage change (delta %). If the current price falls within the box's upper and lower bounds, additional percentage information can be shown in either the 'normal' or 'reverse' mode.
For instance, if a token experiences a -52.35% drop, enabling the 'Reverse' setting will reveal a potential 109.86% gain (from the low), or a 76.02% gain (from current price) or a potential drop of -16.5% (from current price) etc.. Having these basic statistics available, without having to manually chart them, especially during prolonged bear or bull markets, enables traders to make informed decisions and position themselves for more profitable trades.
I hope you find this script valuable. Your comments and recommendations are welcome as they will help improve the script's functionality further.
Ratio To Average - The Quant ScienceRatio To Average - The Quant Science is a quantitative indicator that calculates the percentage ratio of the market price in relation to a reference average. The indicator allows the calculation of the ratio using four different types of averages: SMA, EMA, WMA, and HMA. The ratio is represented by a series of histograms that highlight periods when the ratio is positive (in green) and periods when the ratio is negative (in red).
What is the Ratio to Average?
The Ratio to Average is a measure that tracks the price movements with one of its averages, calculating how much the price is above or below its own average, in percentage terms.
USER INTERFACE
Lenght: it adjusts the number of bars to include in the calculation of the average.
Moving Average: it allows you to choose the type of average to use.
Color Up/Color Down : it allows you to choose the color of the indicator for positive and negative ratios.
Autocorrelation - The Quant ScienceAutocorrelation - The Quant Science it is an indicator developed to quickly calculate the autocorrelation of a historical series. The objective of this indicator is to plot the autocorrelation values and highlight market moments where the value is positive and exceeds the attention threshold.
This indicator can be used for manual analysis when a trader needs to search for new price patterns within the historical series or to create complex formulas in estimating future prices.
What is autocorrelation?
Autocorrelation in trading is a statistical measure used to determine the presence of a relationship or pattern of dependence between values in a financial time series over time. It represents the correlation of past values in a series with its future values. In other words, autocorrelation in trading aims to identify if there are systematic relationships between the past prices or returns of a security or market and its future prices or returns. This analysis can be helpful in identifying patterns or trends that can be leveraged for informed trading decisions. The presence of autocorrelation may suggest that market prices or returns follow a certain pattern or trend over time.
Limitations of the model
It is important to note that autocorrelation does not necessarily imply a causal relationship between past and future values. Other variables or market factors may influence the dynamics of prices or returns, and therefore autocorrelation could be merely a random coincidence. Therefore, it is essential to carefully evaluate the results of autocorrelation analysis along with other information and trading strategies to make informed decisions.
How to use
The usage is very simple, you just need to add it to the current chart to activate the indicator.
From the user interface, you can manage two important features:
1. Lenght: the delay period applied to the historical series during the autocorrelation calculation can be managed from the user interface. By default, it is set to 20, which means that the autocorrelation ratio within the historical series is calculated with a delay of 20 bars.
2. Threshold: the threshold value that the autocorrelation level must meet can be managed from the user interface. By default, it is set to 0.50, which means that the autocorrelation value must be higher than this threshold to be considered valid and displayed on the chart.
3. Bar color: the color used to display the autocorrelation data and highlight the bars when autocorrelation is valid can be managed from the user interface.
To set up the chart
We recommend disabling the 'wick' and 'border' of the candlesticks from the chart settings for a high-quality user experience.
Support/ResistanceUse this code to stop support and resistance
This can be used with the momentum indicators that I have to see if we are likely to breakout or get rejected
Indicator Settings:
The indicator is titled "Support/Resistance | Breaks & Bounces" and is set to overlay on the price chart.
max_lines_count is set to 500, indicating the maximum number of support/resistance lines that can be plotted.
User Input:
The script allows users to customize the pivot method, sensitivity, and line width through input variables.
point_method determines whether the pivot calculation is based on "Candle Wicks" or "Candle Body".
left_bars represents the number of bars to the left used to identify pivot highs/lows.
right_bars is set equal to left_bars.
line_width controls the width of the support/resistance lines.
Global Variables and Arrays:
The script declares several variables and arrays to store information related to support and resistance levels, breakouts, and bounces.
high_source and low_source are calculated based on the selected pivot method.
fixed_pivot_high and fixed_pivot_low store the pivot highs and lows using the chosen sensitivity.
Variables and arrays are initialized for tracking support/resistance lines, breakout triggers, and bounce triggers.
Main Operation:
The main operation occurs when barstate.isconfirmed is true, indicating that a new bar has formed and its data is final.
The script iterates through the support/resistance lines to update their end points (x2) to the current bar.
For each support/resistance line, it checks if a breakout or bounce event has occurred based on the current and previous bar's price levels.
If a breakout or bounce event is detected, the corresponding trigger variables (red_breakout_trigger, red_rejection_trigger, green_breakout_trigger, green_rejection_trigger) are set to true.
The script also checks for changes in the pivot highs and lows and updates the support/resistance lines accordingly.
If a change is detected, it clears the existing lines, breakout, and bounce arrays and adds new lines for the updated pivot levels.
Annualized Spot-Future DifferenceThe "Annualized Spot-Future Difference" indicator (ASFD) compares the closing prices of a futures contract and its underlying spot asset. It calculates the price difference between the two instruments and annualizes this difference to provide a standardized measure for comparison.
The indicator takes inputs for the futures ticker symbol and the spot ticker symbol, allowing flexibility in selecting the specific assets for analysis. Additionally, it allows the user to input the contract date, which represents the expiration date of the futures contract.
The ASFD indicator plots the annualized difference between the futures and spot prices. It calculates the price difference by subtracting the spot price from the futures price. To annualize this difference, it considers the remaining days to the contract expiration and scales the difference accordingly.
The annualized difference can provide insights into market expectations, as it reflects the market's perception of the future price movement of the underlying asset. A positive value indicates that the futures price is higher than the spot price, potentially suggesting bullish sentiment. Conversely, a negative value suggests bearish sentiment, with the futures price lower than the spot price.
Traders and analysts can utilize the ASFD indicator to identify potential opportunities for arbitrage or evaluate market sentiment regarding the underlying asset. By monitoring changes in the annualized difference over time, they can gain insights into market dynamics and make informed trading decisions.
It's important to note that the ASFD indicator relies on accurate and up-to-date pricing data for both the futures and spot assets. Traders should verify that the selected ticker symbols correspond to the desired instruments and ensure that the contract date aligns with the relevant futures contract expiration.
Overall, the ASFD indicator provides a quantitative measure of the annualized price difference between futures and spot assets, enabling traders and analysts to assess market expectations and identify potential trading opportunities.
DZ SR Buy&Sell Enhanced StrategyThis ALGERIAN indicator titled "SR Buy&Sell with Enhanced Strategy" is designed to identify support and resistance levels on a financial chart, and generates enhanced buy and sell signals based on these levels. It is based on a trading strategy that uses a combination of moving means and standard deviation to calculate support and resistance levels.
The indicator plots support and resistance levels on the chart, with blue color for base level, red for resistance and green for support. Green arrows are displayed when a buy signal is generated, and red arrows when a sell signal is generated.
The market entry strategy is based on breaking support and resistance levels. When a buy signal is generated and no position is opened, a buy position is opened with a take profit and stop loss level calculated according to the parameters set by the user. Similarly, when a sell signal is generated and no position is opened, a sell position is opened with the corresponding take profit and stop loss levels.
The indicator also displays a “STOP” indicator when a position exit signal is generated, indicating to the trader that it is time to close the current position.
This indicator is a powerful tool for traders who want to exploit support and resistance levels to improve their trading decisions. It can be used in different financial markets and different time periods. Parameters such as average moving length, deviations and multiplier can be adjusted according to individual trader preferences.
Note: This indicator only provides potential signals and does not guarantee positive results with every trade. It is recommended to use this indicator in combination with other technical analysis and risk management tools to make informed decisions when trading.
Previous Day Close and Average VWAP value, Current Day 30 min HLThe code provided is a TradingView Pine Script that creates a combined indicator consisting of two separate components:
Indicator 1: Plot Lines with VWAP
This component plots lines on the chart using two different colors and widths.
It uses a custom function f_newLine to create a new line object with a specified color and width.
It uses another custom function f_moveLine to move a line to a specific location on the chart.
The line_close line is moved to a specific date and closing price.
The line_vwap line represents the VWAP (Volume Weighted Average Price) and is plotted using the line.new function.
The VWAP calculation is performed using the typical price (average of high, low, and close) and volume.
The VWAP is plotted on the chart using the plot function.
The previous day's VWAP is also plotted and connected to the current day's VWAP with a line.
Indicator 2: 30 Min high and low breakout
This component identifies a specific time range ("0915-0945") within each trading day.
It uses the ta.valuewhen function to find the highest and lowest prices during that time range.
The highest price is stored in the high_thirtymin variable, and the lowest price is stored in the low_thirtymin variable.
These prices are plotted on the chart as circles, with green representing the high and red representing the low.
The indicator combines these two components to provide visual information about the VWAP and the high/low breakout within a specific time range. The code also includes some additional logic to handle barstate and ensure correct calculations and plotting.
Period Candle CounterThis is a very simple utility indicator.
Shockingly nothing similar was available and I really needed something to quickly count period lengths by candles (to make adjustments to indicators based on a desired lookback timeframe), so I created this.
I thought I would share it because chances are if I needed something like this, other people may need it, too.
What it does:
Its really simple and this really truly is just a utility indicator that gives you raw information to make adjustments to other indicators. It just counts the number of candles in a user defined period of time.
It will count the number of red candles, green candles and then display the total candle count.
It will also display in percent (i.e. 52% green candles vs 48% red candles, etc.).
Its point and click, so once launched you just click the area you want to start the count and click the area you want to end the count.
Purpose:
Personally, I use it to make adjustments to timeframe lengths on indicators that look at averages and also on my time series indicator. If I want the price average or range for a specific period in time (say, the past 1.5 days of an uptrend), I will use this to count the candles in that period so that I can manually adjust whichever indicator to the correct lookback length, as most indicators are adjusted by candle length (i.e. 1 candle, 2 candles, 3 candles, etc.)
And that's it, pretty straight forward. Honestly pretty boring but its actually really pivotal for me to make adjustments to certain indicators.
Hope you find it helpful, too!
Safe trades!
XAUXXXThis simple script is meant to get around the limitations some data providers have, in terms of the length of historical data they choose to provide traders. Inspired by OANDA's XAUCAD pair only having data as far back as 2005, whereas XAUUSD has data back to to the 19th century.
By taking the OHLC data from XAUUSD and multiplying it by the price of USD in a desired currency you are able to see further back in time, the limitation now being the length of FX data available instead of the price of Precious metal / currency pair. As shown in the chart you can now see the price of Gold in CAD as far back as the late 1960s, a nearly half century of data uncovered for all to see!
Monthly Strategy Performance TableWhat Is This?
This script code adds a Monthly Strategy Performance Table to your Pine Script strategy scripts so you can see a month-by-month and year-by-year breakdown of your P&L as a percentage of your account balance.
The table is based on realized equity rather than open equity, so it only updates the metrics when a trade is closed.
That's why some numbers will not match the Strategy Tester metrics (such as max drawdown), as the Strategy Tester bases metrics like max drawdown on open trade equity and not realized equity (closed trades).
The script is still a work-in-progress, so make sure to read the disclaimer below. But I think it's ready to release the code for others to play around with.
How To Use It
The script code includes one of my strategies as an example strategy. You need to replace my strategy code with your own. To do that just copy the source code below into a blank script, delete lines 11 -> 60 and paste your strategy code in there instead of mine. The script should work with most systems, but make sure to read the disclaimer below.
It works best with a significant amount of historical data, so it may not work very effectively on intraday timeframes as there is a severe limitation of available bars on TradingView. I recommend using it on 4HR timeframes and above, as anything less will produce very little usable data. Having a premium TradingView plan will also help boost the number of available bars.
You can hover your mouse over a table cell to get more information in the form of tooltips (such as the Long and Short win rate if you hover over your total return cell).
Credit
The code in this script is based on open-source code originally written by QuantNomad, I've made significant changes and additions to the original script but all credit for the idea and especially the display table code goes to them - I just built on top of it:
Why Did I Make This?
None of this is trading or investment advice, just my personal opinion based on my experience as a trader and systems developer these past 6+ years:
The TradingView Strategy Tester is severely limited in some important ways. And unless you use complex Excel formulas on exported test data, you can't see a granular perspective of your system's historical performance.
There is much more to creating profitable and tradeable systems than developing a strategy with a good win rate and a good return with a reasonable drawdown.
Some additional questions we need to ask ourselves are:
What did the system's worst drawdown look like?
How long did it last?
How often do drawdowns occur, and how quickly are they typically recovered?
How often do we have a break-even or losing month or year?
What is our expected compounded annual growth rate, and how does that growth rate compare to our max drawdown?
And many more questions that are too long to list and take a lifetime of trading experience to answer.
Without answering these kinds of questions, we run the risk of developing systems that look good on paper, but when it comes to live trading, we are uncomfortable or incapable of enduring the system's granular characteristics.
This Monthly Performance Table script code is intended to help bridge some of that gap with the Strategy Tester's limited default performance data.
Disclaimer
I've done my best to ensure the numbers this code outputs are accurate, and according to my testing with my personal strategy scripts it appears to work fine. But there is always a good chance I've missed something, or that this code will not work with your particular system.
The majority of my TradingView systems are extremely simple single-target systems that operate on a closed-candle basis to minimize many of the data reliability issues with the Strategy Tester, so I was unable to do much testing with multiple targets and pyramiding etc.
I've included a Debug option in the script that will display important data and information on a label each time a trade is closed. I recommend using the Debug option to confirm that the numbers you see in the table are accurate and match what your strategy is actually doing.
Always do your own due diligence, verify all claims as best you can, and never take anyone's word for anything.
Take care, and best of luck with your trading :)
Kind regards,
Matt.
PS. If you're interested in learning how this script works, I have a free hour-long video lesson breaking down the source code - just check out the links below this script or in my profile.
Lot Size CalculatorThis is a public release of my Lot Size Calculator. I received a request for the code from a user so I am republishing the script so I can make it public (TV doesn't seem to give me the option to simply make it public once published ).
This is a very simple script to use. Simply choose your entry level and stop level on the chart and the indicator will calculate the lots. You can change your account risk and base currency units in the settings along with changing the scaling of the calculation to adjust the results with the lot sizing units of your broker. This allows the calculator to be used with CFDs, forex, Gold, etc.. Hope it helps in your trading it has been the single most useful tool in my trading as it has helped me always keep my risk locked up and on point that is why I released it.
One final quick note: Remember you can save your settings for your own account size and risk so you do not always have to modify the defaults when loading the script. Just a ease of use tip. I only add the script to my chart when I am about to take a trade so it is helpful to have everything set up in advance.
[Mad] Liquidation LevelsThe Liquidation Lines Technical Indicator is a trading tool designed to assist traders in identifying potential liquidation levels. This indicator generates virtual positions, known as "liquidation lines", which mark the points at which these positions would be liquidated under specified conditions.
Key Features:
Quantity of Lines: The indicator can create up to 125 liquidation lines, evenly distributed between long and short positions. This limit is derived from a maximum of 500 lines, divided by four to account for two types of leverage (long and short).
Customizable Liquidation Levels: Users are given the ability to set liquidation levels according to their individual trading strategies and the current market conditions.
Customizable Visuals: The color and thickness of the liquidation lines can be adjusted to suit personal preferences, providing a clear visual representation on the trading chart for ease of analysis.
Selectable Signal Sources: The indicator provides the flexibility to choose the signal source for creating the liquidation lines. Users can select from a range of popular technical analysis tools such as Bollinger Bands, MACD crosses, EMA crosses, or SMA crosses. This feature allows traders to customize the formation of liquidation lines based on their preferred technical indicators, adding to the comprehensiveness and versatility of the tool.
Two selectable Leverages: The indicator accommodates both long and short leverages, offering a comprehensive understanding of potential liquidation points for various trading scenarios.
Selectable Exchange Maintenance: The indicator allows users to select their specific cryptocurrency exchange. This feature ensures that the liquidation lines are accurately calculated according to the maintenance margin requirements of the chosen exchange, adding precision and customization to the trading analysis.
Liquidation Levels on OIThis indicator is used to display estimated contract liquidation prices. When there are dense liquidation areas on the chart, it indicates that there may be a lot of liquidity at that price level. The horizontal lines of different colors on the chart represent different leverage ratios. See below for details.
Let me introduce the principle behind this indicator:
1. When position trading volume increases or decreases significantly higher than usual levels in a specific candlestick chart, it indicates that a large number of contracts were opened during that period. We use the 60-day moving average change as a benchmark line. If the position trading volume changes more than 1.2x, 2x or 3x its MA60 value, it is considered small, medium or large abnormal increase or decrease.
2. This indicator takes an approximate average between high, open, low and close prices of that candlestick as opening price.
3. Since contracts involve liquidity provided by both buyers and sellers with equal amounts of long and short positions corresponding to each contract respectively; since we cannot determine actual settlement prices for contract positions; therefore this indicator estimates settlement prices instead which marks five times (5x), ten times (10x), twenty-five times (25x), fifty times (50x) and one hundred times (100x) long/short settlement prices corresponding to each candlestick chart generating liquidation lines with different colors representing different leverage levels.
4. We can view areas where dense liquidation lines appear as potential liquidation zones which will have high liquidity.
5. We can adjust orders based on predicted liquidation areas because most patterns in these areas will be quickly broken.
6. We provide a density histogram to display the liquidation density of each price range.
Special thanks to the following TradingView community members for providing open-source indicators and contributing to the development of this indicator!
Liquidation - @Mysterysauce
Open Interest Delta - By Leviathan - @LeviathanCapital
Regarding the relationship with the above-mentioned open source indicators:
1. Indicator Liquidation - @Mysterysauce can also draw a liquidation line in the chart, but:
(1) Our indicator generates a liquidation line based on abnormal changes in open interest; their indicator generates a liquidation line based on trading volume.
(2) Our indicator will generate both long and short liquidation lines at the same time; their indicator will only generate a liquidation line in a single direction.
We refer to their method of drawing liquidation lines when drawing our own.
2. Indicator Open Interest Delta - By Leviathan - @LeviathanCapital obtained OI data for Binance USDT perpetual contracts in the code. We refer to their method of obtaining OI data in our code.
============= 中文版本 =============
此指标用于显示估计合约清算价格。当图表上有密集的清算区域时,表示该价格水平可能存在大量流动性。图表上不同颜色的水平线代表不同杠杆比率。详情请参见下面的说明。
让我介绍一下这个指标背后的原理:
1. 当特定蜡烛图对应的合约仓位增加量(OI Delta)显著高于通常水平时,表示在那段时间有大量合约开仓。我们使用OI Delta的60日移动均线作为基准线。如果OI Delta超过其MA60值的1.2倍、2倍或3倍,则认为是小型、中型或大型的异常OI Delta。
2. 该指标将上述蜡烛图高、开、低和收盘价的平均值作为近似的合约开仓价。
3. 由于合约涉及买方和卖方之间相互提供流动性,每个合约对应相等数量的多头和空头头寸。由于我们无法确定合约头寸的实际清算价格,因此该指标估计了清算价格。它标记了与该蜡烛图相对应的多头和空头5倍、10倍、25倍、50倍和100倍的清算价格,生成清算线。不同杠杆水平用不同颜色表示。
4. 我们可以将出现密集清算线的区域视为潜在的清算区域。这些区域将具有高流动性。
5. 我们可以根据预测到的清算区域调整自己的订单,因为根据规律,这些清算区域大部分都会很快被击穿。
6. 我们提供了密度直方图来显示每个价格范围的清算密度
特别感谢以下TradingView社区成员提供开源指标并为该指标的开发做出贡献!
Liquidation - @Mysterysauce
Open Interest Delta - By Leviathan - @LeviathanCapital
与上述开源指标的关系:
1. 指标Liquidation - @Mysterysauce也可以在图中绘制清算线,但是:
(1)我们的指标是基于open interest的异常变化生成的清算线;他们的指标是基于成交量生成的清算线
(2)我们的指标会同时生成多头和空头清算线;他们的指标仅会在单一方向生成清算线
我们的指标在绘制清算线上参考了他们绘制清算线的方式
2. 指标Open Interest Delta - By Leviathan - @LeviathanCapital在代码中获取了Binance USDT永续合约的OI数据。我们在代码中参考他们获取OI数据的方式
Open Interest OffsetThis indicator is used to display whether there has been an abnormal increase or decrease in recent contract positions. Its usage is similar to the RSI indicator.
Please note that this indicator uses fixed (customizable) thresholds of 0.4 and 0.6 to indicate when abnormal opening and closing occur respectively. For some altcoins, their values may far exceed 0.4 so please adjust accordingly based on your symbol.
(1) When there is an abnormal increase in recent contract positions, the value of the indicator will be above 0.4. This means that there may be a liquidation market situation occurring subsequently. If the market background at this time is rising, it may not be suitable to continue buying because the indicator shows that it is currently overbought. On the contrary, it may be appropriate to sell now.
(2) When there is an abnormal decrease in recent contract positions, the value of the indicator will be below -0.4. This means that a liquidation market situation has occurred recently. If the market background at this time is falling, it may not be suitable to continue shorting because the indicator shows that it is currently oversold. On the contrary, it may be appropriate to buy now.
Special thanks to the following TradingView community members for providing open-source indicators and contributing to the development of this indicator!
Open Interest Delta - By Leviathan - @LeviathanCapital
Regarding the relationship with the above-mentioned open source indicator:
Indicator Open Interest Delta - By Leviathan - @LeviathanCapital obtained OI data for Binance USDT perpetual contracts in the code. We refer to their method of obtaining OI data in our code.
============= 中文版本 =============
该指标用于显示近期合约持仓量是否有异常的增加和减少。它的用法类似于RSI指标
请注意,该指标使用了固定的(可定制的)阈值0.4和0.6来提示异常开仓和平仓的发生。对于某些山寨币而言,指标的数值可能远大于0.4。请根据你所关注的标的自行调整
(1)当近期合约持仓量有异常的增加时,指标的值会在0.4以上。这意味着后续可能有清算行情的发生。若此时市场背景为上涨,此时可能不太适合继续做多,因为指标显示目前处于超买行情。相反,现在可能适合卖出
(2)当近期合约的持仓量有异常的减少时,指标的值会在-0.4以下。这意味着近期已经发生了清算行情。若此时市场背景为下跌,此时可能不太适合继续做空,因为指标显示目前处于超卖行情。相反,现在可能适合买入
特别感谢以下TradingView社区成员提供开源指标并为该指标的开发做出贡献!
Open Interest Delta - By Leviathan - @LeviathanCapital
与上述开源指标的关系:
指标Open Interest Delta - By Leviathan - @LeviathanCapital在代码中获取了Binance USDT永续合约的OI数据。我们在代码中参考他们获取OI数据的方式
libhs.log.DEMO◼ Overview
This is a demonstration of dual logging library I have ported from my personal use for public use. Please start bar replay from Bar#4, and progress automatically slowly or manually.You would need to go through 450+ bars to see the full capability.
Logger=A dual logging library for developers. Tradingview lacks logging capability. This library provided logging while developing your scripts and is to be used by developers when developing and debugging their scripts.
Using this library would potentially slow down you scripts. Hence, use this for debugging only. Once your code is as you would like it to be, remove the logging code.
◼︎ Usage (Console):
Console = A sleek single cell logging with a limit of 4096 characters. When you dont need a large logging capability.
//@version=5
indicator("demo.Console", overlay=true)
plot(na)
import GETpacman/log/2 as logger
var console = logger.log.new()
console.init() // init() should be called as first line after variable declaration
console.FrameColor:=color.green
console.log(' ')
console.log(' ')
console.log('Hello World')
console.log(' ')
console.log(' ')
console.ShowStatusBar:=true
console.StatusBarAtBottom:=true
console.FrameColor:=color.blue //settings can be changed anytime before show method is called. Even twice. The last call will set the final value
console.ShowHeader:=false //this wont throw error but is not used for console
console.show(position=position.bottom_right) //this should be the last line of your code, after all methods and settings have been dealt with.
◼︎ Usage (Logx):
Logx = Multiple columns logging with a limit of 4096 characters each message. When you need to log large number of messages.
//@version=5
indicator("demo.Logx", overlay=true)
plot(na)
import GETpacman/log/2 as logger
var logx = logger.log.new()
logx.init() // init() should be called as first line after variable declaration
logx.FrameColor:=color.green
logx.log(' ')
logx.log(' ')
logx.log('Hello World')
logx.log(' ')
logx.log(' ')
logx.ShowStatusBar:=true
logx.StatusBarAtBottom:=true
logx.ShowQ3:=false
logx.ShowQ4:=false
logx.ShowQ5:=false
logx.ShowQ6:=false
logx.FrameColor:=color.olive //settings can be changed anytime before show method is called. Even twice. The last call will set the final value
logx.show(position=position.top_right) //this should be the last line of your code, after all methods and settings have been dealt with.
◼︎ Fields (with default settings)
▶︎ IsConsole = True Log will act as Console if true, otherwise it will act as Logx
▶︎ ShowHeader = True (Log only) Will show a header at top or bottom of logx.
▶︎ HeaderAtTop = True (Log only) Will show the header at the top, or bottom if false, if ShowHeader is true.
▶︎ ShowStatusBar = True Will show a status bar at the bottom
▶︎ StatusBarAtBottom = True Will show the status bar at the bottom, or top if false, if ShowHeader is true.
▶︎ ShowMetaStatus = True Will show the meta info within status bar (Current Bar, characters left in console, Paging On Every Bar, Console dumped data etc)
▶︎ ShowBarIndex = True Logx will show column for Bar Index when the message was logged. Console will add Bar index at the front of logged messages
▶︎ ShowDateTime = True Logx will show column for Date/Time passed with the logged message logged. Console will add Date/Time at the front of logged messages
▶︎ ShowLogLevels = True Logx will show column for Log levels corresponding to error codes. Console will log levels in the status bar
▶︎ ReplaceWithErrorCodes = True (Log only) Logx will show error codes instead of log levels, if ShowLogLevels is switched on
▶︎ RestrictLevelsToKey7 = True Log levels will be restricted to Ley 7 codes - TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL, FATAL
▶︎ ShowQ1 = True (Log only) Show the column for Q1
▶︎ ShowQ2 = True (Log only) Show the column for Q2
▶︎ ShowQ3 = True (Log only) Show the column for Q3
▶︎ ShowQ4 = True (Log only) Show the column for Q4
▶︎ ShowQ5 = True (Log only) Show the column for Q5
▶︎ ShowQ6 = True (Log only) Show the column for Q6
▶︎ ColorText = True Log/Console will color text as per error codes
▶︎ HighlightText = True Log/Console will highlight text (like denoting) as per error codes
▶︎ AutoMerge = True (Log only) Merge the queues towards the right if there is no data in those queues.
▶︎ PageOnEveryBar = True Clear data from previous bars on each new bar, in conjuction with PageHistory setting.
▶︎ MoveLogUp = True Move log in up direction. Setting to false will push logs down.
▶︎ MarkNewBar = True On each change of bar, add a marker to show the bar has changed
▶︎ PrefixLogLevel = True (Console only) Prefix all messages with the log level corresponding to error code.
▶︎ MinWidth = 40 Set the minimum width needed to be seen. Prevents logx/console shrinking below these number of characters.
▶︎ TabSizeQ1 = 0 If set to more than one, the messages on Q1 or Console messages will indent by this size based on error code (Max 4 used)
▶︎ TabSizeQ2 = 0 If set to more than one, the messages on Q2 will indent by this size based on error code (Max 4 used)
▶︎ TabSizeQ3 = 0 If set to more than one, the messages on Q2 will indent by this size based on error code (Max 4 used)
▶︎ TabSizeQ4 = 0 If set to more than one, the messages on Q2 will indent by this size based on error code (Max 4 used)
▶︎ TabSizeQ5 = 0 If set to more than one, the messages on Q2 will indent by this size based on error code (Max 4 used)
▶︎ TabSizeQ6 = 0 If set to more than one, the messages on Q2 will indent by this size based on error code (Max 4 used)
▶︎ PageHistory = 0 Used with PageOnEveryBar. Determines how many historial pages to keep.
▶︎ HeaderQbarIndex = 'Bar#' (Logx only) The header to show for Bar Index
▶︎ HeaderQdateTime = 'Date' (Logx only) The header to show for Date/Time
▶︎ HeaderQerrorCode = 'eCode' (Logx only) The header to show for Error Codes
▶︎ HeaderQlogLevel = 'State' (Logx only) The header to show for Log Level
▶︎ HeaderQ1 = 'h.Q1' (Logx only) The header to show for Q1
▶︎ HeaderQ2 = 'h.Q2' (Logx only) The header to show for Q2
▶︎ HeaderQ3 = 'h.Q3' (Logx only) The header to show for Q3
▶︎ HeaderQ4 = 'h.Q4' (Logx only) The header to show for Q4
▶︎ HeaderQ5 = 'h.Q5' (Logx only) The header to show for Q5
▶︎ HeaderQ6 = 'h.Q6' (Logx only) The header to show for Q6
▶︎ Status = '' Set the status to this text.
▶︎ HeaderColor Set the color for the header
▶︎ HeaderColorBG Set the background color for the header
▶︎ StatusColor Set the color for the status bar
▶︎ StatusColorBG Set the background color for the status bar
▶︎ TextColor Set the color for the text used without error code or code 0.
▶︎ TextColorBG Set the background color for the text used without error code or code 0.
▶︎ FrameColor Set the color for the frame around Logx/Console
▶︎ FrameSize = 1 Set the size of the frame around Logx/Console
▶︎ CellBorderSize = 0 Set the size of the border around cells.
▶︎ CellBorderColor Set the color for the border around cells within Logx/Console
▶︎ SeparatorColor = gray Set the color of separate in between Console/Logx Attachment
◼︎ Methods (summary)
● init ▶︎ Initialise the log
● log ▶︎ Log the messages. Use method show to display the messages
● page ▶︎ Clear messages from previous bar while logging messages on this bar.
● show ▶︎ Shows a table displaying the logged messages
● clear ▶︎ Clears the log of all messages
● resize ▶︎ Resizes the log. If size is for reduction then oldest messages are lost first.
● turnPage ▶︎ When called, all messages marked with previous page, or from start are cleared
● dateTimeFormat ▶︎ Sets the date time format to be used when displaying date/time info.
● resetTextColor ▶︎ Reset Text Color to library default
● resetTextBGcolor ▶︎ Reset Text BG Color to library default
● resetHeaderColor ▶︎ Reset Header Color to library default
● resetHeaderBGcolor ▶︎ Reset Header BG Color to library default
● resetStatusColor ▶︎ Reset Status Color to library default
● resetStatusBGcolor ▶︎ Reset Status BG Color to library default
● setColors ▶︎ Sets the colors to be used for corresponding error codes
● setColorsBG ▶︎ Sets the background colors to be used for corresponding error codes. If not match of error code, then text color used.
● setColorsHC ▶︎ Sets the highlight colors to be used for corresponding error codes.If not match of error code, then text bg color used.
● resetColors ▶︎ Reset the colors to library default (Total 36, not including error code 0)
● resetColorsBG ▶︎ Reset the background colors to library default
● resetColorsHC ▶︎ Reset the highlight colors to library default
● setLevelNames ▶︎ Set the log level names to be used for corresponding error codes. If not match of error code, then empty string used.
● resetLevelNames ▶︎ Reset the log level names to library default. (Total 36) 1=TRACE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=CRITICAL, 7=FATAL
● attach ▶︎ Attaches a console to an existing Logx, allowing to have dual logging system independent of each other
● detach ▶︎ Detaches an already attached console from Logx
No Code SignalsNo Code Signals is an intuitive user interface for users to generate their own signals based on indicators they already have applied to their chart.
This indicator makes use of the new input.source() limits for importing data from external sources (indicators) into 1 indicator.
You are now able to import ANY number of sources from up to 10 different indicators.
Features:
- Import up to 10 unique values from up to 10 different indicators already on your chart!
- Compare those values against other imported indicator values, or chart ohlc values.
- Option to use a defined level instead of an active source.
- 5 Signal Options (Currently)
- Alerts, Each signal has its own alert condition.
- Labeled Signals, to tell which signal is which.
Potential Future Plans:
- More Signals & Analysis Options
- Possibly more imports
- Combining 2 (or more) signals into 1
Here is a Screenshot of a chart with signals, and the Interface creating the signals.
Enjoy!