Three Inside [TradingFinder] 3 Inside Up & Down Chart Patterns🔵 Introduction
"3 inside up" and "3 inside down" denote a duo of candlestick reversal patterns, each comprising three individual candles, commonly observed on candlestick charts.
These patterns manifest as a sequence of three candles, signaling a potential loss of momentum in the current trend and a potential reversal in direction.
This pattern consists of 3 consecutive candles and can be either "bullish" or "bearish".
In the bullish pattern, known as "Inside Up," emerging at the conclusion of a downtrend, the final candle must exhibit bullish characteristics, while the third candle from the end must display bearish traits.
Conversely, in the bearish pattern, termed "Inside Down," occurring at the culmination of an uptrend, the last candle must demonstrate bearish behavior, with the third candle from the end reflecting bullish attributes.
🔵 How to Use
Using this indicator is very simple. Filtering "Strong 3 Inside Bar" and "Weak 3 Inside Bar" is a feature available in the settings section. You can turn the filter "On" or "Off." By default, the "Filter" is set to "On."
" Filter: On ":
" Filter: Off ":
🔵 How to Display
For better display and differentiation of "Strong 3 Inside Bar" and "Weak 3 Inside Bar," when the "Filter: On" is active, the 3 Inside Bars are displayed in green and red colors. When the "Filter: Off" is active, the 3 Inside Bars are displayed in blue and black colors.
Educational
Periodic OHLHere is another experience on working with 'time' variable :)
This script generates potential support and resistance levels based on daily, weekly, and monthly open, high, and low prices. In such indicators, security calls produce effective results. However, similar tasks can also be performed by built-in variables. This script serves as an example of how alternative methods can be constructed.
The originality of the indicator is based on its ability to visualise the current open, high and low prices from the bar at which they occur. You can also display levels simultaneously.
I hope it helps everyone...
DISCLAIMER
This is just an indicator, nothing more. It is provided for informational and educational purposes exclusively. The utilization of this script does not constitute professional or financial advice. The user solely bears the responsibility for risks associated with script usage. Do not forget to manage your risk. And trade as safely as possible. Best of luck!
Historical Price Projection [LuxAlgo]The Historical Price Projection tool aims to project future price behavior based on historical price behavior plus a user defined growth factor.
The main feature of this tool is to plot a future price forecast with a surrounding area that exactly matches the price behavior of the selected period, with or without added drift.
Other features of the tool include:
User-selected period up to 500 bars anywhere on the chart within 5000 bars
User selected growth factor from 0 (no growth) to 100, this is the percentage of drift to be used in the forecast.
User selected area wide
Show/hide forecast area
🔶 USAGE
This tool generates a price projection with exactly the same price behavior over the period selected by the user, plus a growth factor .
The user must confirm the selection of the anchor point in order for the tool to be executed; this can be done directly on the chart by clicking on any bar, or via the date field in the settings panel.
As we can see on this chart, the four phases of the market cycle are clearly defined and marked, so we choose the distribution phase as our anchor point because in our analysis, we want to see how the market would behave if we were currently at the same point in the cycle.
In the image above, the growth factor parameter is set to 0 so that the projection matches the selection. The tool will use up to 500 bars after the selection point.
The growth factor is defined as the percentage of drift that the tool will use.
Drift is defined as follows:
For periods with a positive return: average negative return within the period
For negative return periods: average positive return within the period
On the chart above, we have selected the same period but added a growth factor of 10, so that the tool uses a 10% drift in its calculations of future prices.
As the return in the selected period is negative, the added drift will make the projection more bearish than the prices from the selection.
On this chart we have changed the selected period, we have chosen the accumulation phase of the last cycle as the anchor point, again with a growth factor of 10%.
As we can see, prices explode higher, making the projection very bullish, as the added effect of both the bullish selected period and the 10% drift is taken into account.
This last chart is a long-term chart, a quarterly chart of the Dow, and it will serve as a review exercise.
What if... everything goes south and the crash of '29 is repeated?
The answer is in the chart, and it is not for the faint of heart
In this case we have chosen a growth factor of 0 to see exactly the same price behaviour projected into the future.
🔶 SETTINGS
🔹 Data Gathering
Anchor point: Starting point for data collection, up to 500 bars will be used.
🔹 Data Transformation
Growth Factor: Values from 0 to 100, is the amount of drift used to calculate the next price in the series.
Area Width: Values from 0 to 100, controls the width of the area around the forecast as an increment/decrement of the growth factor.
🔹 Style
Price line width: Size of the price line.
Bullish color
Bearish color
Show Area: Show forecast area.
Area color
Dark Cloud [TradingFinder] Piercing Line Reversal chart Pattern
🔵 Introduction
"Reversal candlestick patterns" are among the Japanese candlestick patterns considered as alerts for a potential change in the current price trend. It is often assumed that by identifying reversal candlestick patterns, the price trend will definitely change, either from bullish to bearish or from bearish to bullish. However, this claim is not entirely accurate, and a change in price trend does not always mean a reversal.
Nonetheless, the importance of reversal candlestick patterns remains significant. By recognizing these patterns, you can better predict changes in the trend with higher probability and make better trading decisions.
🔵 Dark Cloud
The "Dark Cloud" pattern occurs when, after an upward trend, buyers continue to drive the price up in the first candle. However, in the next candle, with sellers entering and increasing selling pressure, the price starts to decrease compared to the close of the previous candle.
This price decrease is significant enough that in the last candle, the price goes lower than the open of the previous candle, serving as a warning sign for a potential change in price trend.
The fundamental principles for the formation of the "Dark Cloud" pattern include :
1.Two candles consisting of a positive candle (first candle) and a negative candle (second candle) whose main body should be above the halfway point of the first candle's main body but does not completely cover it.
2.The color of the main body of the second candle should be opposite to the color of the main body of the first candle.
Factors affecting the strength of the "Dark Cloud" pattern include :
1.The length of the bodies of both candles, especially the second candle, which increases the strength of the pattern.
2.The gap between the two bodies can also indicate the strength of the pattern.
3.The absence of a lower shadow in the second candle also indicates the strength of the pattern.
4.If the pattern forms in a price resistance range, it has more strength.
🔵 Piercing Line
The "Piercing Line" pattern occurs when, after a downward trend, sellers decrease the price by offering their shares on the first day. However, on the next day, with buyers entering and increasing demand, the price starts to increase compared to the close of the previous day.
This increase is significant enough that in the last candle, the price goes higher than the open of the previous day, serving as a warning sign for a reversal in the price trend. Overall, this pattern is the opposite of the "Dark Cloud" pattern and occurs under a bearish trend.
The fundamental principles for the formation of the "Piercing Line" pattern include :
1.Two candles consisting of a negative candle (first candle) and a positive candle (second candle) whose main body should be above the halfway point of the first candle's main body but does not completely cover it.
2.The color of the main body of the second candle should be opposite to the color of the main body of the first candle.
Factors affecting the strength of the "Piercing Line" pattern include :
1.The length of the bodies of both candles, especially the second candle, which increases the strength of the pattern.
2.The gap between the two bodies can also indicate the strength of the pattern.
3.The absence of an upper shadow in the second candle also indicates the strength of the pattern.
4.If the pattern forms in a price support range, it has more strength.
🔵 How to Use
The "green circle" symbol corresponds to the "Strong Piercing Line" signal, the "blue triangle" symbol corresponds to the "Weak Piercing Line" signal, the "red circle" symbol corresponds to the "Strong Dark Cloud" signal, and the "red triangle" symbol corresponds to the "Weak Dark Cloud" signal.
🔵 Setting
Using the "Show Dark Cloud" and "Show Piercing Line" buttons, you can enable or disable the display of Dark Cloud and Piercing Line.
BTC/USD Inflation priced in! ~Period 2009 - 2023 (by TAS)The script creates a custom indicator titled "BTC Adjusted for Economic Factors.
Adjusted BTC Price is plotted in red, making it more prominent. The adjusted price is Bitcoin's historical closing prices adjusted for cumulative inflation over time, based on the Core Consumer Price Index (CPI) annual inflation rates from 2009 onwards.
The script calculates the adjusted price of Bitcoin by taking into account the effect of inflation on its value. It uses annual CPI rates for each year from 2009 to 2022 to calculate a cumulative inflation factor. The script assumes a placeholder inflation rate of 2.5% for 2023, indicating that this value should be updated when the actual rate is available. The script suggests adding CPI rates for additional years as they become available to maintain the accuracy of the adjustment.
Here's a breakdown of how the script works:
Core CPI Annual Inflation Rates: It starts by defining the annual inflation rates for each year from 2009 to 2022, expressed as a percentage divided by 100 to convert to a decimal.
Cumulative Inflation Calculation: The script calculates cumulative inflation starting from the year 2009 up to the current year. For each year that has passed since 2009, it multiplies the cumulative inflation factor by (1 + cpiRate), where cpiRate is the inflation rate for that year. This effectively compounds the inflation rate over time.
Adjusting Bitcoin's Price: The script then adjusts Bitcoin's closing price (close) for the calculated cumulative inflation to get the adjusted price (adjustedPrice).
Plotting the Prices: Finally, it plots both the original and the adjusted Bitcoin prices on the chart, allowing users to visually compare how inflation has theoretically impacted Bitcoin's value over time.
--------------------------------------------------------------------------------------------------
Important to notice, Fib. Retracements from the 2017 cycle top to the recent top (¬80K) doesn't look invalidated.
--------------------------------------------------------------------------------------------------
Inputs and feedback are welcome!
Hull Trend and CompareThis Pine Script is a TradingView indicator called "Hull Trend and Compare." Its main purpose is to provide a visual representation of price trends and a comparative analysis between the selected symbol and another symbol chosen for comparison.
The key components and functionalities:
Price Trend Visualization:
1.Mode Selection:
Offers three modes: "Normal," "Linear," and "Heikin-Ashi."
Allows users to choose between a standard chart, linear regression, or Heikin-Ashi candlesticks.
2.Hull Moving Average (HullMA):
Calculates the HullMA for the selected mode and length.
Plots the HullMA on the chart.
Colors the background based on the relationship between HullMA and the closing price.
Generates buy and sell signals when the price crosses over or under the HullMA.
Symbol Comparison:
1.Comparison with Another Symbol:
Allows users to compare the selected symbol with another symbol (specified in the sym input).
Provides options to choose the method of calculation for the compared symbol (open, high, low, close).
Users can choose whether to use a different method of calculation (usem), adjust the length (len), and enable or disable comparison (usecmp).
Table Display:
1.Table for Technical Indicators:
Optionally displays a table showing technical indicators for both symbols.
Includes Stochastic Momentum, RSI (Relative Strength Index), and MACD (Moving Average Convergence Divergence).
Colors the table cells based on the direction of the indicators.
Users can customize the table's position, text size, and visibility (shwtbl).
Technical Indicators:
1.Stochastic Momentum (StochMoM):
Calculates %K and %D using the Stochastic formula.
Displays StochMoM values and colors cells based on bullish or bearish conditions.
2.Relative Strength Index (RSI):
Computes the RSI values and colors cells based on the direction of the trend.
3.MACD (Moving Average Convergence Divergence):
Calculates MACD and Signal line values.
Displays MACD values and colors cells based on bullish or bearish conditions.
Summary:
This script provides traders with a versatile tool for analyzing price trends, comparing symbols, and viewing key technical indicators. The combination of visual elements on the chart and a detailed table enhances the ability to make informed trading decisions.
This script is provided for educational purposes and does not constitute financial advice. Traders and investors should conduct their research and analysis before making any trading decisions.
Trading TP SL Risk Commission Calculator🎉 Introducing Your Trading TP SL Risk Commission Calculator! 🎉
Hey there, savvy trader! 🚀 Are you looking to enhance your trading game? Meet the Trading TP SL Risk Commission Calculator! This handy tool is here to guide you through the complexities of trading, providing insights into your potential risks and rewards. Let's walk through how you can leverage it for smarter trading decisions!
Setting Up 🛠
Let's get your calculator ready for action:
Lines and Labels Visibility: Flip this switch on to see your Entry, Take Profit (TP), Stop Loss (SL), and Liquidation points displayed on your chart. It's a great way to get a visual summary of your strategy.
Input Your Trade Details: Enter your Entry Price, Take Profit Price, and Stop Loss Price. These figures are crucial for mapping out your trade.
Order Info: Specify your Order Size in USD, the amount of Leverage you're using, and your platform's Commission Rate. This customizes the calculator to fit your unique trading setup.
Customizing Your View 🎨
Table Placement & Size: Pick the location and size for your results table to appear on your screen. Tailor it to your liking, whether you prefer it out of the way or front and center.
Deciphering Your Results 📊
With your inputs in place, the calculator springs into action. Here's what you'll find:
Risk Assessment (with Emojis!): Quickly gauge your risk level with our intuitive emoji system, ranging from "⛔️⛔️⛔️" (very high risk) to "✅✅✅" (very low risk).
Profit and Loss Insights: Understand your potential take-profit gains and stop-loss implications, both as percentages and in USD. We also factor in fees to give you a clear picture.
Liquidation Alert: For those using leverage, the liquidation price calculation is crucial to avoid unpleasant surprises.
Expert Tips 💡
Stay Flexible: Market conditions evolve, so should your strategy. Revisit and adjust your inputs regularly to stay aligned with your trading goals.
Risk Emoji Check: Keep an eye on your risk level emojis. A sea of "⛔️" might signal it's time to reassess your approach.
Use Visual Guides: The on-chart lines and labels offer a quick visual reference to how your current trade measures up against your TP, SL, and liquidation thresholds.
Dive In and Trade Smart! 🚦
This calculator isn't just about making calculations; it's about empowering you to make informed trading decisions. With this tool in your arsenal, you're equipped to navigate the trading waters with confidence and clarity.
Machine Learning: Multiple Logistic Regression
Multiple Logistic Regression Indicator
The Logistic Regression Indicator for TradingView is a versatile tool that employs multiple logistic regression based on various technical indicators to generate potential buy and sell signals. By utilizing key indicators such as RSI, CCI, DMI, Aroon, EMA, and SuperTrend, the indicator aims to provide a systematic approach to decision-making in financial markets.
How It Works:
Technical Indicators:
The script uses multiple technical indicators such as RSI, CCI, DMI, Aroon, EMA, and SuperTrend as input variables for the logistic regression model.
These indicators are normalized to create categorical variables, providing a consistent scale for the model.
Logistic Regression:
The logistic regression function is applied to the normalized input variables (x1 to x6) with user-defined coefficients (b0 to b6).
The logistic regression model predicts the probability of a binary outcome, with values closer to 1 indicating a bullish signal and values closer to 0 indicating a bearish signal.
Loss Function (Cross-Entropy Loss):
The cross-entropy loss function is calculated to quantify the difference between the predicted probability and the actual outcome.
The goal is to minimize this loss, which essentially measures the model's accuracy.
// Error Function (cross-entropy loss)
loss(y, p) =>
-y * math.log(p) - (1 - y) * math.log(1 - p)
// y - depended variable
// p - multiple logistic regression
Gradient Descent:
Gradient descent is an optimization algorithm used to minimize the loss function by adjusting the weights of the logistic regression model.
The script iteratively updates the weights (b1 to b6) based on the negative gradient of the loss function with respect to each weight.
// Adjusting model weights using gradient descent
b1 -= lr * (p + loss) * x1
b2 -= lr * (p + loss) * x2
b3 -= lr * (p + loss) * x3
b4 -= lr * (p + loss) * x4
b5 -= lr * (p + loss) * x5
b6 -= lr * (p + loss) * x6
// lr - learning rate or step of learning
// p - multiple logistic regression
// x_n - variables
Learning Rate:
The learning rate (lr) determines the step size in the weight adjustment process. It prevents the algorithm from overshooting the minimum of the loss function.
Users can set the learning rate to control the speed and stability of the optimization process.
Visualization:
The script visualizes the output of the logistic regression model by coloring the SMA.
Arrows are plotted at crossover and crossunder points, indicating potential buy and sell signals.
Lables are showing logistic regression values from 1 to 0 above and below bars
Table Display:
A table is displayed on the chart, providing real-time information about the input variables, their values, and the learned coefficients.
This allows traders to monitor the model's interpretation of the technical indicators and observe how the coefficients change over time.
How to Use:
Parameter Adjustment:
Users can adjust the length of technical indicators (rsi_length, cci_length, etc.) and the Z score length based on their preference and market characteristics.
Set the initial values for the regression coefficients (b0 to b6) and the learning rate (lr) according to your trading strategy.
Signal Interpretation:
Buy signals are indicated by an upward arrow (▲), and sell signals are indicated by a downward arrow (▼).
The color-coded SMA provides a visual representation of the logistic regression output by color.
Table Information:
Monitor the table for real-time information on the input variables, their values, and the learned coefficients.
Keep an eye on the learning rate to ensure a balance between model adjustment speed and stability.
Backtesting and Validation:
Before using the script in live trading, conduct thorough backtesting to evaluate its performance under different market conditions.
Validate the model against historical data to ensure its reliability.
Trend Deviation strategy - BTC [IkkeOmar]Intro:
This is an example if anyone needs a push to get started with making strategies in pine script. This is an example on BTC, obviously it isn't a good strategy, and I wouldn't share my own good strategies because of alpha decay.
This strategy integrates several technical indicators to determine market trends and potential trade setups. These indicators include:
Directional Movement Index (DMI)
Bollinger Bands (BB)
Schaff Trend Cycle (STC)
Moving Average Convergence Divergence (MACD)
Momentum Indicator
Aroon Indicator
Supertrend Indicator
Relative Strength Index (RSI)
Exponential Moving Average (EMA)
Volume Weighted Average Price (VWAP)
It's crucial for you guys to understand the strengths and weaknesses of each indicator and identify synergies between them to improve the strategy's effectiveness.
Indicator Settings:
DMI (Directional Movement Index):
Length: This parameter determines the number of bars used in calculating the DMI. A higher length may provide smoother results but might lag behind the actual price action.
Bollinger Bands:
Length: This parameter specifies the number of bars used to calculate the moving average for the Bollinger Bands. A longer length results in a smoother average but might lag behind the price action.
Multiplier: The multiplier determines the width of the Bollinger Bands. It scales the standard deviation of the price data. A higher multiplier leads to wider bands, indicating increased volatility, while a lower multiplier results in narrower bands, suggesting decreased volatility.
Schaff Trend Cycle (STC):
Length: This parameter defines the length of the STC calculation. A longer length may result in smoother but slower-moving signals.
Fast Length: Specifies the length of the fast moving average component in the STC calculation.
Slow Length: Specifies the length of the slow moving average component in the STC calculation.
MACD (Moving Average Convergence Divergence):
Fast Length: Determines the number of bars used to calculate the fast EMA (Exponential Moving Average) in the MACD.
Slow Length: Specifies the number of bars used to calculate the slow EMA in the MACD.
Signal Length: Defines the number of bars used to calculate the signal line, which is typically an EMA of the MACD line.
Momentum Indicator:
Length: This parameter sets the number of bars over which momentum is calculated. A longer length may provide smoother momentum readings but might lag behind significant price changes.
Aroon Indicator:
Length: Specifies the number of bars over which the Aroon indicator calculates its values. A longer length may result in smoother Aroon readings but might lag behind significant market movements.
Supertrend Indicator:
Trendline Length: Determines the length of the period used in the Supertrend calculation. A longer length results in a smoother trendline but might lag behind recent price changes.
Trendline Factor: Specifies the multiplier used in calculating the trendline. It affects the sensitivity of the indicator to price changes.
RSI (Relative Strength Index):
Length: This parameter sets the number of bars over which RSI calculates its values. A longer length may result in smoother RSI readings but might lag behind significant price changes.
EMA (Exponential Moving Average):
Fast EMA: Specifies the number of bars used to calculate the fast EMA. A shorter period results in a more responsive EMA to recent price changes.
Slow EMA: Determines the number of bars used to calculate the slow EMA. A longer period results in a smoother EMA but might lag behind recent price changes.
VWAP (Volume Weighted Average Price):
Default settings are typically used for VWAP calculations, which consider the volume traded at each price level over a specific period. This indicator provides insights into the average price weighted by trading volume.
backtest range and rules:
You can specify the start date for backtesting purposes.
You can can select the desired trade direction: Long, Short, or Both.
Entry and Exit Conditions:
LONG:
DMI Cross Up: The Directional Movement Index (DMI) indicates a bullish trend when the positive directional movement (+DI) crosses above the negative directional movement (-DI).
Bollinger Bands (BB): The price is below the upper Bollinger Band, indicating a potential reversal from the upper band.
Momentum Indicator: Momentum is positive, suggesting increasing buying pressure.
MACD (Moving Average Convergence Divergence): The MACD line is above the signal line, indicating bullish momentum.
Supertrend Indicator: The Supertrend indicator signals an uptrend.
Schaff Trend Cycle (STC): The STC indicates a bullish trend.
Aroon Indicator: The Aroon indicator signals a bullish trend or crossover.
When all these conditions are met simultaneously, the strategy considers it a favorable opportunity to enter a long trade.
SHORT:
DMI Cross Down: The Directional Movement Index (DMI) indicates a bearish trend when the negative directional movement (-DI) crosses above the positive directional movement (+DI).
Bollinger Bands (BB): The price is above the lower Bollinger Band, suggesting a potential reversal from the lower band.
Momentum Indicator: Momentum is negative, indicating increasing selling pressure.
MACD (Moving Average Convergence Divergence): The MACD line is below the signal line, signaling bearish momentum.
Supertrend Indicator: The Supertrend indicator signals a downtrend.
Schaff Trend Cycle (STC): The STC indicates a bearish trend.
Aroon Indicator: The Aroon indicator signals a bearish trend or crossover.
When all these conditions align, the strategy considers it an opportune moment to enter a short trade.
Disclaimer:
THIS ISN'T AN OPTIMAL STRATEGY AT ALL! It was just an old project from when I started learning pine script!
The backtest doesn't promise the same results in the future, always do both in-sample and out-of-sample testing when backtesting a strategy. And make sure you forward test it as well before implementing it!
Furthermore this strategy uses both trend and mean-reversion systems, that is usually a no-go if you want to build robust trend systems .
Don't hesitate to comment if you have any questions or if you have some good notes for a beginner.
Aroon and ASH strategy - ETHERIUM [IkkeOmar]Intro:
This post introduces a Pine Script strategy, as an example if anyone needs a push to get started. This example is a strategy on ETH, obviously it isn't a good strategy, and I wouldn't share my own good strategies because of alpha decay. This strategy combines two technical indicators: Aroon and Absolute Strength Histogram (ASH).
Overview:
The strategy employs the Aroon indicator alongside the Absolute Strength Histogram (ASH) to determine market trends and potential trade setups. Aroon helps identify the strength and direction of a trend, while ASH provides insights into the strength of momentum. By combining these indicators, the strategy aims to capture profitable trading opportunities in Ethereum markets. Normally when developing strats using indicators, you want to find some good indicators, but you NEED to understand their strengths and weaknesses, other indicators can be incorporated to minimize the downs of another indicator. Try to look for synergy in your indicators!
Indicator settings:
Aroon Indicator:
- Two sets of parameters are used for the Aroon indicator:
- For Long Positions: Aroon periods are set to 56 (upper) and 20 (lower).
- For Short Positions: Aroon periods are set to 17 (upper) and 55 (lower).
Absolute Strength Histogram (ASH):
ASH is calculated with a length of 9 bars using the closing price as the data source.
Trading Conditions:
The strategy incorporates specific conditions to initiate and exit trades:
Start Date:
Traders can specify the start date for backtesting purposes.
Trade Direction:
Traders can select the desired trade direction: Long, Short, or Both.
Entry and Exit Conditions:
1. Long Position Entry: A long position is initiated when the Aroon indicator crosses over (crossover) the lower Aroon threshold, indicating a potential uptrend.
2. Long Position Exit: A long position is closed when the Aroon indicator crosses under (crossunder) the lower Aroon threshold.
3. Short Position Entry: A short position is initiated when the Aroon indicator crosses under (crossunder) the upper Aroon threshold, signaling a potential downtrend.
4. Short Position Exit: A short position is closed when the Aroon indicator crosses over (crossover) the upper Aroon threshold.
Disclaimer:
THIS ISN'T AN OPTIMAL STRATEGY AT ALL! It was just an old project from when I started learning pine script!
The backtest doesn't promise the same results in the future, always do both in-sample and out-of-sample testing when backtesting a strategy. And make sure you forward test it as well before implementing it!
Candle DecompositionThe Candle Decomposition indicator shows the last 2 candles in detail, with 2 levels of lower timeframes (LTF).
In this way, you can keep oversight of history, while zooming in on the last and previous candle.
This tool is meant to be used in realtime, preferentially for intraday usage.
🔶 USAGE
In this example, on the current timeframe of 15 minutes, you see the 2 latest candles, visualized through dotted lines/boxes.
The first LTF level is set at 5 minutes, the second level at 15 seconds:
(The 2 exclamation marks are just to emphasize this is the latest price which will be repainted)
The combination of 2 LTF's can be helpful in finding support/resistance levels.
These are taken in realtime, not in bar replay, so the outcome wasn't known in advance:
(blue lines were drawn manually)
After first testing resistance, the price went to the support area, bouncing back to an area of resistance and breaking it briefly.
Price turned back, and found support, after which resistance was tested once more:
Support was again tested, after which resistance was clearly broken:
A bit later (every time 1 candle further):
The following example shows 2 last candles with signs of indecision, but LTF candles show support and resistance areas:
🔶 IMPORTANT
PP = TradingView Premium / Professional Plan
BEP = TradingView Basic / Essential / Plus Plan
This publication uses second-based TF's, which is only available for PP users.
To ensure a smooth experience for BEP users, we have disabled the setting "Premium/Professional Plan" .
BEP users will get a warning when trying to use a second-based TF.
If possible, BEP users should use non-second-based TF's.
PP users have to enable the setting "Premium/Professional Plan" .
🔶 DETAILS
🔹 Timeframes
Most common timeframes can be used: 2W, W, 3D, 2D, D, 12h, 8h, 6h, 4h, 3h, 2h, 1h, 30min, 15min, 10min, 5min, 3min, 1min
When having the current chart timeframe at 1 of these TF's, you can set 1st and 2nd LTF. Choices are pré-set to ensure maximum usage of drawings:
In the image above you'll see there are gaps between candles.
The script ensures that when there are no trades, instead of attaching the next bar next to the previous, it leaves the gap visible (which is more realistic).
More in detail you can see the gaps are preserved:
(compared between white -current TF- candles, and LTF candles)
🔹 Limitations
When on a Weekly TF, and 2nd LTF is set at 4h, all drawings have enough space:
If we change the 2nd LTF to 2h, there isn't enough space for the second last candle, after which an orange coloured informational warning label will be shown:
When current chart TF is not 1 of the encoded TF's, a red warning text will be shown:
This script can be used using "Bar Replay", but very limited.
You can change the date ("Jump To..."), but "Play" is not advisable.
🔹 Code
This script uses string manipulation to convert inputs like "1 hour", "5 min", "5 sec" to usable timeframe strings like "60", "5" and "5S"
• str.contains(str , 'hour') ? str.tostring(str.tonumber(str.replace(str, ' hour', '')) * 60) : str
• str.replace(input.string( '5 sec', '' , options= ), " sec", "S")
• str.replace(str, " min", "")
Since string manipulation consumes resources, these are place in local blocks.
While inputs always will be extracted, whether it is put in an if-block or not, the string manipulation only will be executed when condition is fulfilled, in this case when we are at the right timeframe.
In following example you'll always see the '1 sec' input, on every TF, but the string manipulation will only happen when we are at a 1 minute TF:
str = ''
if timeframe.period == '1'
str := str.replace(input.string( '1 sec', '' , options= ), " sec", "S")
// output -> "5S" or "1S"
The "visible chart function" chart.right_visible_bar_time is used to reset everything when a new candle starts. This makes sure that when using "barstate.islastconfirmedhistory", the second last bar is used. Also all lines & boxes are automatically removed, starting with a fresh slate.
chT = timenow > chart.right_visible_bar_time
•••
if chT
if barstate.islastconfirmedhistory
f(4)
if barstate.islast
f(2)
If boxes/lines end up before the first bar, or after the last bar, this can be messy.
To protect ourselves against it 2 techniques are used:
math.max(0, x) is used to make sure lines & boxes don't end up before the first bar,
isOK = index < last_bar_index is used to be sure that the width of 1 candle (here index) is not wider than the total of all bars (which is the same as last_bar_index)
🔶 SETTINGS
3 columns:
Current TF: This columns shows you the chart TF where LTF settings are applicable.
1st LTF: set the timeframe of the first level LTF
2nd LTF: set the timeframe of the second level LTF
Colours can be set for 3 timeframes
Difference from Highest Price (Last N Candles)The output of this TradingView indicator is a label that appears below the latest candle on the chart. This label provides information about:
The highest high of the last N candles.
The highest close of the last N candles.
The current trading price.
The percentage difference between the highest high and the current trading price.
The percentage difference between the highest close and the current trading price.
The percentage change in price from the previous candle.
The N-day average percentage change.
This information is useful for traders to understand the relationship between the current price and recent price action, as well as to identify potential overbought or oversold conditions based on the comparison with recent highs and closes.
Here's a breakdown of what the code does:
It takes an input parameter for the number of days (or candles) to consider (input_days).
It calculates the highest high and highest close of the last N candles (highest_last_n_high and highest_last_n_close).
It calculates the difference between the close of the current candle and the close of the previous candle (diff), along with the percentage change.
It maintains an array of percentage changes of the last N days (percentage_changes), updating it with the latest percentage change.
It calculates the sum of percentage changes and the N-day average percentage change.
It calculates the difference between the highest high/highest close of the last N candles and the current trading price, along with their percentage differences.
Finally, it plots this information as a label below the candle for the latest bar.
ICT Killzones Toolkit [LuxAlgo]The ICT Killzones Toolkit is a comprehensive set of tools designed to assist traders in identifying key trading zones and patterns within the market.
The ICT Killzones Toolkit includes the following Price Action components:
ICT Killzones with Pivot Highs/Lows
Order Blocks
Breaker Blocks
Fair Value Gaps
Market Structure Shifts
By combining these components, the ICT Killzones Toolkit provides traders with a comprehensive framework for analyzing the market and identifying setups of interest. Leveraging these tools effectively can enhance traders' decision-making process and improve killzones interpretability.
🔶 USAGE
In forex/futures trading, timing is crucial. ICT Killzone are specific periods when there's a higher chance of finding setups of interest. Mastering these time intervals can offer significant advantages to traders who know how to use them effectively.
The image above highlights a potential setup of interest when using the ICT Killzones Toolkit.
As another example for utilizing the ICT Killzones Toolkit, we can see in the image above when price retests setups generated from killzones such as Order Blocks or Fair Value Gaps, a potential strategy could be to look for entries on those & take profits as the next killzone appears.
🔹 Order Blocks
Order Blocks are sections on a price chart where notable buying or selling activity has occured, often signaling interest zones for institutional traders. This toolkit's Order Blocks component pinpoints these areas within the Killzone, which may act as potential support or resistance levels.
🔹 Breaker Blocks
Breaker Blocks are zones built from mitigated order blocks, and highlight zones on the chart where price has previously stalled or reversed. These areas may act as significant barriers to price movement in the future, and the Breaker Blocks component helps traders identify them for potential trading opportunities.
🔹 Fair Value Gaps
Fair value gaps are especially favored by price action traders and arise from market inefficiencies or imbalances, typically when buying and selling are unequal. These gaps often attract price movement before resuming in the same direction. the Fair Value Gaps component of the toolkit helps traders identify and analyze them.
🔹 Market Structure Shifts
Market Structure Shifts refer to significant changes in the overall structure of the market, such as shifts in trend direction, volatility, or trading activity. These shifts can provide valuable insights into market sentiment and potential trading opportunities, and the Market Structure Shifts component helps traders identify and interpret them.
Overall, the ICT Killzone Toolkit combines these components to provide traders with a comprehensive framework for analyzing the markets and identifying high-probability trading setups.
🔶 SETTINGS
🔹 ICT Killzones
Asian, London Open, New York, and London Close: toggles the visibility of specific Killzones, allowing users to customize time periods and Killzone colors.
Killzone Lines : Top/Bottom, Mean and Extend Top/Bottom: toggles the visibility of the Killzone's pivot high and low lines, mean (average) line, and allows users to extend the pivot lines.
Killzone Labels: Toggles the visibility of the Killzone labels.
Display Killzones within Timeframes Up To: Toggles the visibility of the Killzones up to selected Timeframes.
Open Price, Separator, Label, and Color: toggles the visibility of the open price of the Killzones or for the day, week, or month. If the day, week, or month is selected, a separator will be displayed to highlight the beginning of each respective period. Additionally, users can customize the color and toggle the label as needed.
🔹 Order Blocks & Breaker Blocks
Order Blocks | Breaker Blocks: toggles the visibility of the order blocks & breaker blocks.
Swing Detection Length: lookback period used for the detection of the swing points used to create order blocks & breaker blocks.
Mitigation Price: allows users to select between closing price or wick of the candle.
Use Candle Body in Detection: allows users to use candle bodies as order block areas instead of the full candle range.
Remove Mitigated Order Blocks & Breaker Blocks: toggles the visibility of the mitigated order blocks & breaker blocks.
Extend Order Blocks & Breaker Blocks: enables processing of the order blocks & breaker blocks beyond the boundaries of the killzones.
Display Order Blocks & Breaker Blocks: enables the display of the first, last, or all occurrences of the order blocks & breaker blocks.
Order Blocks : Bullish, Bearish Color: color customization option for order blocks.
Breaker Blocks : Bullish, Bearish Color: color customization option for breaker blocks.
Show Order Blocks & Breaker Blocks Text: toggles the visibility of the order blocks & breaker blocks labels.
🔹 Market Structure Shifts
Market Structure Shifts: toggles the visibility of the market structure shifts.
Detection Length: market structure shift detection length.
Display Market Structure Shifts: enables the display of the first, last, or all occurrences of the market structure shifts.
Market Structure Shifts : Bullish, Bearish Color: color custumization option for market structure shifts.
Show Market Structure Shifts Text: toggles the visibility of the market structure shifts labels.
🔹 Fair Value Gaps
Fair Value Gaps: toggles the visibility of the fair value gaps.
Fair Value Gap Width Filter: filtering threshold wile detecting fair value gaps.
Remove Mitigated Fair Value Gaps: removes mitigated fair value gaps.
Extend Fair Value Gaps: enables processing of the fair value gaps beyond the boundaries of the killzones.
Display Fair Value Gaps: enables the display of the first, last, or all occurrences of the fair value gaps.
Bullish Imbalance Color: color customization option.
Bearish Imbalance Color: color customization option.
Show Fair Value Gaps Text: toggles the visibility of the fair value gaps labels.
🔶 RELATED SCRIPTS
Smart-Money-Concepts
Order-Blocks-Breaker-Blocks
Thanks to our community for recommending this script. For more conceptual scripts and related content, we welcome you to explore by visiting >>> LuxAlgo-Scripts .
Strategy / Connectable [Azullian]The connectable strategy serves as a foundational component in our indicator system on TradingView, designed for intuitive testing, visualization, and construction of trading strategies. In concert with the connectable signal filter , it forms a cohesive unit that allows for efficient signal processing and strategy implementation. This integration enables the strategy to receive and act on weighted signals from various connectable indicators, making it a versatile tool for both novice and experienced traders.
Let's review the separate parts of this indicator.
█ STRATEGY INPUTS
We've provided an input to connect a signal filter or indicators or chains (→) which is set to 'Close' by default.
An input has several controls:
• Input: Connect indicators or signal filter here, choose indicators with a compatible : Signal connector.
• SM - Signal Mode: Choose a trading direction compatible with the settings in your signal filter
█ POSITION INVESTMENT
Determine the percentage of your trading budget you would like to use in each position based on the strategy's profit or loss.
• LINVB - Loss Investment Base: Choose which base to use to determine the investment percentage when the strategy is in a loss.
○ Equity: Use the equity as the base for percentage calculation.
○ Initial capital: Use the initial capital as the base for percentage calculation.
• LINV% - Loss Investment Percentage: Set a percentage of the chosen investment base as the investment for a new position.
○ For example, when 10% in loss, and a initial capital of $100, and the investment base is set to equity with a percentage of 50%, your investment will be 50% of $90, $45.
• PINVB - Profit Investment Base: Choose which base to use to determine the investment percentage when the strategy is in profit.
○ Equity: Use the equity as the base for percentage calculation.
○ Initial capital: Use the initial capital as the base for percentage calculation.
• PINV% - Profit Investment Percentage: Set a percentage of the chosen investment base as the investment for a new position.
○ For example, when 10% in profit, and an initial capital of $100, and the investment base is set to equity with a percentage of 100%, your investment will be 100% of $110, $110.
• RISK% - Risk Percentage:
○ Determine how much of the calculated position investment is at risk when the stop-loss is hit.
- For example, 1% of $45 represents a maximum loss of $0.45.
○ Risk percentage works together with the stop loss and the max leverage.
• MXLVG - Maximum Leverage:
○ Investigate the trading rules for your trading pair and use the maximum allowed amount of leverage.
○ To determine the number of contracts to be bought or sold, considering the stop loss and the specified risk percentage, the maximum leverage available will constrain the amount of leverage utilized to ensure that the maximum risk threshold is not exceeded. For instance, suppose the stop loss is set at 1%, and the risk percentage is defined as 10%. Initially, the calculated leverage to be used would be 10. However, if there is a maximum leverage cap set at 5, it would constrain the calculated leverage of 10 to adhere to the maximum limit of 5.
█ EXIT STOP LOSS
Determine the Stop Loss price based on your selected configuration.
As the stop loss is an integral part of the ordered contracts calculation used in conjunction with the Risk and Max leverage, you'll always need to provide a stop loss price.
• SLB - Stop Loss Base: Choose a stop loss mode for calculating stop loss prices.
○ Risk: Determines the price using the Risk parameter (RISK%) and maximum leverage (MXLVG). In this case, SLB% will not have any impact.
○ Price Entry + Offset: Calculates the stop loss price based on a offset percentage (SLB%) from the entry price of the position.
• SLB% - Stop Loss Base Percentage: Define an offset percentage that will be applied in the price entry + offset stop loss mode.
• SLT - Stop Loss Trailing:
○ Fixed: The initial stop loss will be kept and no trailing stop loss will be applied.
○ Trail Price: Computes the trailing stop loss price based on an offset percentage (SLT%) from the closing price of the current candle.
- If a better stop loss price is calculated, it will be set as the new stop loss price.
○ Trail Incr: Adapts the trailing stop loss price based on the offset percentage (SLT%).
- Each price change in favor of your position will incrementally adapt the trailing stop loss with SLT%.
• SLT% - Stop Loss Trailing Percentage: This percentage serves as an offset or increment depending on your chosen trailing mode.
█ EXIT TAKE PROFIT
Determine the Take Profit price based on your selected configuration.
• TPB - Take Profit Base: Choose a take profit mode for calculating take profit prices.
○ Reward: Determines the take profit price using the Risk parameter (RISK%) and the calculated Stop Loss price and the set reward percentage (TPB%).
- For example: Risk 1%, Calculated Stop loss price: $90, Entry price: $100, Reward (TPB%): 2%, will result in a take profit price on $120.
○ Price Entry + Offset: Calculates the take profit price based on a offset percentage (TPB%) from the entry price of the position.
- For example: Entry price: $100, Offset (TPB%): 2%, will result in a take profit price on $102.
• TPB% - Take Profit Base Percentage: Define an offset percentage that will be applied in the price entry + offset take profit mode.
• TPT - Take Profit Trailing:
○ Fixed: The initial take profit will be kept and no trailing take profit will be applied.
○ Trail Price: Computes the trailing take profit price based on an offset percentage (TPT%) from the closing price of the current candle.
- If an applicable take profit price is calculated, it will be set as the new take profit price.
○ Trail Incr: Adapts the trailing take profit price based on the offset percentage (TPT%). Each price change against your position will incrementally adapt the trailing take profit with TPT%.
• TPT% - Take Profit Trailing Percentage: This percentage serves as an offset or increment depending on your chosen trailing mode.
█ STRATEGY CONDITIONS
Specify when the strategy is permitted to execute trades.
• DATE: Enable the Date Range filter to restrict entries to a specific date range.
○ START: Set a start date and hour to commence trading.
○ END: Set an end date and hour to conclude trading within the defined range.
■ VISUALS
• LINE: Activate a colored dashed diagonal line to visually connect the entry and exit points of positions.
• SLTP: Enable visualization of stop loss, take profit, and break-even levels.
• PNL: Enable Break-Even and Close Lines along with a colored area in between to visualize profit and loss.
• ☼: Brightness % : Adjust the opacity of the plotted trading visuals.
• P - Profit Color : Choose the color for profit-related elements.
• L - Loss Color: Choose the color for loss-related elements.
• B - Breakeven Color : Select the color for break-even points.
• EL - Long Color: Specify the color for long positions.
• ES - Short Color: Specify the color for short positions.
• TRADE LABELING: For better analysis we've labeled all entries and exits conform with the type of order your strategy has executed, some examples:
○ XL-TP-150: Exit Long - Take Profit - Position 150
○ XS-TP-154: Exit Short - Take Profit - Position 154
○ XL-SL-160: Exit Long - Stop Loss - Position 160
○ XS-SL-164: Exit Short - Stop Loss - Position 164
█ USAGE OF CONNECTABLE INDICATORS
■ Connectable chaining mechanism
Connectable indicators can be connected directly to the signal monitor, signal filter or strategy , or they can be daisy chained to each other while the last indicator in the chain connects to the signal monitor, signal filter or strategy. When using a signal filter you can chain the filter to the strategy input to make your chain complete.
• Direct chaining: Connect an indicator directly to the signal monitor, signal filter or strategy through the provided inputs (→).
• Daisy chaining: Connect indicators using the indicator input (→). The first in a daisy chain should have a flow (⌥) set to 'Indicator only'. Subsequent indicators use 'Both' to pass the previous weight. The final indicator connects to the signal monitor, signal filter, or strategy.
■ Set up the strategy with a signal filter and an RSI indicator
Let's connect the Strategy to a connectable signal filter and a connectable RSI indicator :
1. Load all relevant indicators
• Load RSI / Connectable
• Load Signal filter / Connectable
• Load Strategy / Connectable
2. Signal Filter: Connect the RSI to the Signal Filter
• Open the signal filter settings
• Choose one of the three input dropdowns (1→, 2→, 3→) and choose : RSI / Connectable: Signal Connector
• Toggle the enable box before the connected input to enable the incoming signal
3. Signal Filter: Update the filter signals settings if needed
• The default settings of the filter enable EL (Enter Long), XL (Exit Long), ES (Enter Short) and XS (Exit Short).
4. Signal Filter: Update the weight threshold settings if needed
• All connectable indicators load by default with a score of 6 for each direction (EL, XL, ES, XS)
• By default, weight threshold (TH) is set at 5. This allows each occurrence to score, as the default score in each connectable indicator is 1 point above the threshold. Adjust to your liking.
5. Strategy: Connect the strategy to the signal filter in the strategy settings
• Select the strategy input → and select the Signal filter: Signal connector
6. Strategy: Enable filter compatible directions
• Set the signal mode of the strategy to a compatible direction with the signal filter.
Now that everything is connected, you'll notice green spikes in the signal filter representing long signals, and red spikes indicating short signals. Trades will also appear on the chart, complemented by a performance overview. Your journey is just beginning: delve into different scoring mechanisms, merge diverse connectable indicators, and craft unique chains. Instantly test your results and discover the potential of your configurations. Dive deep and enjoy the process!
█ BENEFITS
• Adaptable Modular Design: Arrange indicators in diverse structures via direct or daisy chaining, allowing tailored configurations to align with your analysis approach.
• Streamlined Backtesting: Simplify the iterative process of testing and adjusting combinations, facilitating a smoother exploration of potential setups.
• Intuitive Interface: Navigate TradingView with added ease. Integrate desired indicators, adjust settings, and establish alerts without delving into complex code.
• Signal Weight Precision: Leverage granular weight allocation among signals, offering a deeper layer of customization in strategy formulation.
• Advanced Signal Filtering: Define entry and exit conditions with more clarity, granting an added layer of strategy precision.
• Clear Visual Feedback: Distinct visual signals and cues enhance the readability of charts, promoting informed decision-making.
• Standardized Defaults: Indicators are equipped with universally recognized preset settings, ensuring consistency in initial setups across different types like momentum or volatility.
• Reliability: Our indicators are meticulously developed to prevent repainting. We strictly adhere to TradingView's coding conventions, ensuring our code is both performant and clean.
█ COMPATIBLE INDICATORS
Each indicator that incorporates our open-source 'azLibConnector' library and adheres to our conventions can be effortlessly integrated and used as detailed above.
For clarity and recognition within the TradingView platform, we append the suffix ' / Connectable' to every compatible indicator.
█ COMMON MISTAKES AND CLARIFICATIONS
• Removing an indicator from a chain: Deleting a linked indicator and confirming the "remove study tree" alert will also remove all underlying indicators in the object tree. Before removing one, disconnect the adjacent indicators and move it to the object stack's bottom.
• Point systems: The azLibConnector provides 500 points for each direction (EL: Enter long, XL: Exit long, ES: Enter short, XS: Exit short) Remember this cap when devising a point structure.
• Flow misconfiguration: In daisy chains the first indicator should always have a flow (⌥) setting of 'indicator only' while other indicator should have a flow (⌥) setting of 'both'.
• Recalculate: While this strategy has undergone extensive testing, enabling recalculation options like 'After order is filled' or 'On every tick' may lead to unexpected behavior.
• Fill orders: The strategy is thoroughly tested, yet enabling fill order options such as 'Using bar magnifier', 'On bar close', or 'Using standard OHLC' might result in unexpected outcomes.
• Layout and abbreviations: To maintain a consistent structure, we use abbreviations for each input. While this may initially seem complex, you'll quickly become familiar with them. Each abbreviation is also explained in the inline tooltips.
• Optimized for crypto trading: While many principles are common across markets, this strategy is specifically optimized and tested for crypto trading.
• Inputs: Connecting a connectable indicator directly to the strategy delivers the raw signal without a weight threshold, meaning every signal will trigger a trade.
█ A NOTE OF GRATITUDE
Through years of exploring TradingView and Pine Script, we've drawn immense inspiration from the community's knowledge and innovation. Thank you for being a constant source of motivation and insight.
█ RISK DISCLAIMER
Azullian's content, tools, scripts, articles, and educational offerings are presented purely for educational and informational uses. Please be aware that past performance should not be considered a predictor of future results.
Signal Filter / Connectable [Azullian]The connectable signal filter is an intricate part of an indicator system designed to help test, visualize and build strategy configurations without coding. Like all connectable indicators , it interacts through the TradingView input source, which serves as a signal connector to link indicators to each other. All connectable indicators send signal weight to the next node in the system until it reaches either a connectable signal monitor, signal filter and/or strategy.
The connectable signal filter's function has several roles in the connectable system:
• Input hub: Connect indicators or daisy-chained indicators directly to the filter, manage connections in one place
• Modification: Modify incoming signals by applying smoothing, scaling, or modifiers
• Filtering: Set the trade direction and conditions a signal must adhere to to be passed through
• Visualization: When connected, the signal filter visualizes all incoming signal weights
Let's review the separate parts of this indicator.
█ INPUTS
We've provided 3 inputs for connecting indicators or chains (1→, 2→, 3→) which are all set to 'Close' by default.
An input has several controls:
• Enable disable: Toggle the entire input on or off
• Input: Connect indicators here, choose indicators with a compatible : Signal connector.
• G - Gain: Increase or reduce the strength of the incoming signal by a factor.
█ FILTER SIGNALS
The core of the signal filter , determine a signal direction with the signal mode and determine a threshold (TH).
• ¤ - Trade direction:
○ EL: Send Enter Long signals to the strategy
○ XL: Send Exit Long signals to the strategy
○ ES: Send Enter Short signals to the strategy
○ XS: Send Exit Short signals to the strategy
• TH - Threshold: Define how much weight is needed for a signal to be accepted and passed through to the connectable strategy .
■ VISUALS
• ☼: Brightness % : Set the opacity for the signal curves
• 🡓: ES Color : Set the color for the ES: Entry Short signal
• ⭳: XS Color : Set the color for the XS: Exit Short signal
• ⌥: Plot mode : Set the plotting mode
○ Signals IN: Show all signals
○ Signals OUT: Show only scoring signals
• 🡑: EL Color : Set the color for the EL: Enter Long signal
• ⭱: XL Color : Set the color for the XL: Exit Long signal
█ USAGE OF CONNECTABLE INDICATORS
■ Connectable chaining mechanism
Connectable indicators can be connected directly to the signal monitor, signal filter or strategy , or they can be daisy chained to each other while the last indicator in the chain connects to the signal monitor, signal filter or strategy. When using a signal filter you can chain the filter to the strategy input to make your chain complete.
• Direct chaining: Connect an indicator directly to the signal monitor, signal filter or strategy through the provided inputs (→).
• Daisy chaining: Connect indicators using the indicator input (→). The first in a daisy chain should have a flow (⌥) set to 'Indicator only'. Subsequent indicators use 'Both' to pass the previous weight. The final indicator connects to the signal monitor, signal filter, or strategy.
■ Set up the signal filter with a connectable indicator and strategy
Let's connect the MACD to a connectable signal filter and a strategy :
1. Load all relevant indicators
• Load MACD / Connectable
• Load Signal filter / Connectable
• Load Strategy / Connectable
2. Signal Filter: Connect the MACD to the Signal Filter
• Open the signal filter settings
• Choose one of the three input dropdowns (1→, 2→, 3→) and choose : MACD / Connectable: Signal Connector
• Toggle the enable box before the connected input to enable the incoming signal
3. Signal Filter: Update the filter settings if needed
• The default filter mode for the trading direction is SWING, and is compatible with the default settings in the strategy and indicators.
4. Signal Filter: Update the weight threshold settings if needed
• All connectable indicators load by default with a score of 6 for each direction (EL, XL, ES, XS)
• By default, weight threshold (TH) in the signal filter is set at 5. This allows each occurrence to score, as the default score in each / Connectable indicator is 6 and thus is 1 point above the threshold. Adjust to your liking.
5. Strategy: Connect the strategy to the signal filter in the strategy settings
• Select a strategy input → and select the Signal filter: Signal connector
6. Strategy: Enable filter compatible directions
• As the default setting of the signal filter has enabled EL (Enter Long), XL (Exit Long), ES (Enter Short) and XS (Exit short), the connectable strategy will receive all compatible directions.
Now that everything is connected, you'll notice green spikes in the signal filter representing long signals, and red spikes indicating short signals. Trades will also appear on the chart, complemented by a performance overview. Your journey is just beginning: delve into different scoring mechanisms, merge diverse connectable indicators, and craft unique chains. Instantly test your results and discover the potential of your configurations. Dive deep and enjoy the process!
█ BENEFITS
• Adaptable Modular Design: Arrange indicators in diverse structures via direct or daisy chaining, allowing tailored configurations to align with your analysis approach.
• Streamlined Backtesting: Simplify the iterative process of testing and adjusting combinations, facilitating a smoother exploration of potential setups.
• Intuitive Interface: Navigate TradingView with added ease. Integrate desired indicators, adjust settings, and establish alerts without delving into complex code.
• Signal Weight Precision: Leverage granular weight allocation among signals, offering a deeper layer of customization in strategy formulation.
• Advanced Signal Filtering: Define entry and exit conditions with more clarity, granting an added layer of strategy precision.
• Clear Visual Feedback: Distinct visual signals and cues enhance the readability of charts, promoting informed decision-making.
• Standardized Defaults: Indicators are equipped with universally recognized preset settings, ensuring consistency in initial setups across different types like momentum or volatility.
• Reliability: Our indicators are meticulously developed to prevent repainting. We strictly adhere to TradingView's coding conventions, ensuring our code is both performant and clean.
█ COMPATIBLE INDICATORS
Each indicator that incorporates our open-source 'azLibConnector' library and adheres to our conventions can be effortlessly integrated and used as detailed above.
For clarity and recognition within the TradingView platform, we append the suffix ' / Connectable' to every compatible indicator.
█ COMMON MISTAKES, CLARIFICATIONS AND TIPS
• Removing an indicator from a chain: Deleting a linked indicator and confirming the "remove study tree" alert will also remove all underlying indicators in the object tree. Before removing one, disconnect the adjacent indicators and move it to the object stack's bottom.
• Point systems: The azLibConnector provides 500 points for each direction (EL: Enter long, XL: Exit long, ES: Enter short, XS: Exit short) Remember this cap when devising a point structure.
• Flow misconfiguration: In daisy chains the first indicator should always have a flow (⌥) setting of 'indicator only' while other indicator should have a flow (⌥) setting of 'both'.
• Hide attributes: As connectable indicators send through quite some information you'll notice all the arguments are taking up some screenwidth and cause some visual clutter. You can disable arguments in Chart Settings / Status line.
• Layout and abbreviations: To maintain a consistent structure, we use abbreviations for each input. While this may initially seem complex, you'll quickly become familiar with them. Each abbreviation is also explained in the inline tooltips.
• Inputs: Connecting a connectable indicator directly to the strategy delivers the raw signal without a weight threshold, meaning every signal will trigger a trade.
█ A NOTE OF GRATITUDE
Through years of exploring TradingView and Pine Script, we've drawn immense inspiration from the community's knowledge and innovation. Thank you for being a constant source of motivation and insight.
█ RISK DISCLAIMER
Azullian's content, tools, scripts, articles, and educational offerings are presented purely for educational and informational uses. Please be aware that past performance should not be considered a predictor of future results.
Signal Monitor / Connectable [Azullian]The connectable signal monitor is a connectable tool to help test, visualize signal weights. Like all connectable indicators , it interacts through the TradingView input source, which serves as a signal connector to link indicators to each other. All connectable indicators send signal weight to the next node in the system until it reaches either a connectable signal monitor, signal filter and/or strategy.
Let's review the separate parts of this indicator.
█ INPUTS
We've provided 3 inputs for connecting indicators or chains (1→, 2→, 3→) which are all set to 'Close' by default.
An input has several controls:
• Enable disable: Toggle the entire input on or off
• Input: Connect indicators here, choose indicators with a compatible : Signal connector.
■ VISUALS
• ☼: Brightness % : Set the opacity for the signal curves
• 🡓: ES Color : Set the color for the ES: Entry Short signal
• ⭳: XS Color : Set the color for the XS: Exit Short signal
• ⌥: Plot mode : Set the plotting mode
○ Signals IN: Show all signals
○ Signals OUT: Show only scoring signals
• 🡑: EL Color : Set the color for the EL: Enter Long signal
• ⭱: XL Color : Set the color for the XL: Exit Long signal
█ USAGE OF CONNECTABLE INDICATORS
■ Connectable chaining mechanism
Connectable indicators can be connected directly to the signal monitor, signal filter or strategy , or they can be daisy chained to each other while the last indicator in the chain connects to the connectable signal monitor, signal filter or strategy . When using a signal filter or signal monitor you can chain the filter to the strategy input to make your chain complete.
• Direct chaining: Connect an indicator directly to the signal monitor, signal filter or strategy through the provided inputs (→).
• Daisy chaining: Connect indicators using the indicator input (→). The first in a daisy chain should have a flow (⌥) set to 'Indicator only'. Subsequent indicators use 'Both' to pass the previous weight. The final indicator connects to the signal monitor, signal filter, or strategy.
■ Set up the signal monitor with a connectable indicator and strategy
Let's connect the MACD to a connectable signal monitor :
1. Load all relevant indicators
• Load MACD / Connectable
• Load Signal monitor / Connectable
2. Signal Monitor: Connect the MACD to the Signal Monitor
• Open the signal monitor settings
• Choose one of the three input dropdowns (1→, 2→, 3→) and choose : MACD / Connectable: Signal Connector
• Toggle the enable box before the connected input to enable the incoming signal
Now that everything is connected, you'll notice green spikes in the signal monitor representing long signals, and red spikes indicating short signals.
█ BENEFITS
• Adaptable Modular Design: Arrange indicators in diverse structures via direct or daisy chaining, allowing tailored configurations to align with your analysis approach.
• Streamlined Backtesting: Simplify the iterative process of testing and adjusting combinations, facilitating a smoother exploration of potential setups.
• Intuitive Interface: Navigate TradingView with added ease. Integrate desired indicators, adjust settings, and establish alerts without delving into complex code.
• Signal Weight Precision: Leverage granular weight allocation among signals, offering a deeper layer of customization in strategy formulation.
• Advanced Signal Filtering: Define entry and exit conditions with more clarity, granting an added layer of strategy precision.
• Clear Visual Feedback: Distinct visual signals and cues enhance the readability of charts, promoting informed decision-making.
• Standardized Defaults: Indicators are equipped with universally recognized preset settings, ensuring consistency in initial setups across different types like momentum or volatility.
• Reliability: Our indicators are meticulously developed to prevent repainting. We strictly adhere to TradingView's coding conventions, ensuring our code is both performant and clean.
█ COMPATIBLE INDICATORS
Each indicator that incorporates our open-source 'azLibConnector' library and adheres to our conventions can be effortlessly integrated and used as detailed above.
For clarity and recognition within the TradingView platform, we append the suffix ' / Connectable' to every compatible indicator.
█ COMMON MISTAKES, CLARIFICATIONS AND TIPS
• Removing an indicator from a chain: Deleting a linked indicator and confirming the "remove study tree" alert will also remove all underlying indicators in the object tree. Before removing one, disconnect the adjacent indicators and move it to the object stack's bottom.
• Point systems: The azLibConnector provides 500 points for each direction (EL: Enter long, XL: Exit long, ES: Enter short, XS: Exit short) Remember this cap when devising a point structure.
• Flow misconfiguration: In daisy chains the first indicator should always have a flow (⌥) setting of 'indicator only' while other indicator should have a flow (⌥) setting of 'both'.
• Hide attributes: As connectable indicators send through quite some information you'll notice all the arguments are taking up some screenwidth and cause some visual clutter. You can disable arguments in Chart Settings / Status line.
• Layout and abbreviations: To maintain a consistent structure, we use abbreviations for each input. While this may initially seem complex, you'll quickly become familiar with them. Each abbreviation is also explained in the inline tooltips.
• Inputs: Connecting a connectable indicator directly to the strategy delivers the raw signal without a weight threshold, meaning every signal will trigger a trade.
█ A NOTE OF GRATITUDE
Through years of exploring TradingView and Pine Script, we've drawn immense inspiration from the community's knowledge and innovation. Thank you for being a constant source of motivation and insight.
█ RISK DISCLAIMER
Azullian's content, tools, scripts, articles, and educational offerings are presented purely for educational and informational uses. Please be aware that past performance should not be considered a predictor of future results.
KDJ / Connectable [Azullian]Enhance your analysis with our KDJ. Oscillate through buying and selling signals seamlessly, identifying potential reversals with accuracy.
This connectable KDJ indicator is part of an indicator system designed to help test, visualize and build strategy configurations without coding. Like all connectable indicators , it interacts through the TradingView input source, which serves as a signal connector to link indicators to each other. All connectable indicators send signal weight to the next node in the system until it reaches either a connectable signal monitor, signal filter and/or strategy.
█ UNIFORM SETTINGS AND A WAY OF WORK
Although connectable indicators may have specific weight scoring conditions, they all aim to follow a standardized general approach to weight scoring settings, as outlined below.
■ Connectable indicators - Settings
• 🗲 Energy: Energy applies an ATR multiplier to the plotted shapes on the chart. A higher value plots shapes farther away from the candle, enhancing visibility.
• ☼ Brightness: Brightness determines the opacity of the shape plotted on the chart, aiding visibility. Indicator weight also influences opacity.
• → Input: Use the input setting to specify a data source for the indicator. Here you can connect the indicator to other indicators.
• ⌥ Flow: Determine where you want to receive signals from:
○ Both: Weights from this indicator and the connected indicator will apply
○ Indicator only: Only weights from this indicator will apply
○ Input only: Only weights from the connected indicator will apply
• ⥅ Weight multiplier: Multiply all weights in the entire indicator by a given factor, useful for quickly testing different indicators in a granular setup.
• ⥇ Threshold: Set a threshold to indicate the minimum amount of weight it should receive to pass it through to the next indicator.
• ⥱ Limiter: Set a hard limit to the maximum amount of weight that can be fed through the indicator.
■ Connectable indicators - Weight scoring settings
▢ Weight scoring conditions
• SM – Signal mode: Enable specific conditions for weight scoring
○ All: All signals will be scored.
○ Entries only: Only entries will score.
○ Exits only: Only exits will score.
○ Entries & exits: Both entries and exits will score.
○ Zone: Continuous scoring for each candle within the zone.
• SP – Signal period: Defines a range of candles within which a signal can score.
• SC - Signal count: Specifies the number of bars to retrospectively examine and score.
○ Single: Score for a single occurrence
○ All occurrences: Score for all occurrences
○ Single + Threshold: Score for single occurrences within the signal period (SP)
○ Every + Threshold: Score for all occurrences within the signal period (SP)
▢ Weight scoring direction
• ES: Enter Short weight
• XL: Exit long weight
• EL: Enter Long weight
• XS: Exit Short weight
▢ Weight scoring values
• Weights can hold either positive or negative scores. Positive weights enhance a particular trading direction, while negative weights diminish it.
█ KDJ - INDICATOR SETTINGS
■ Main settings
• Enable/Disable Indicator: Toggle the entire indicator on or off.
• S - Source: Choose an alternative data source for the KDJ calculation.
• T - Timeframe: Select an alternative timeframe for the KDJ calculation.
• P - Period: Define the number of bars or periods used in the KDJ calculation.
• SL - Signal line: Adjust the smoothing factor for the KDJ's J line. This not only offers clearer buy/sell cues by reducing market noise but also determines the precise points for potential crossovers and crossunders.
■ Scoring functionality
• The KDJ scores long entries when the J line crosses over the signal (SL) line.
• The KDJ scores long exits when the J line crosses under the signal (SL) line after a prior crossover.
• The KDJ scores long zones the entire time the J line is above the signal (SL) line.
• The KDJ scores short entries when the J line crosses under the signal (SL) line.
• The KDJ scores short exits when the J line crosses over the signal (SL) line after a prior crossunder.
• The KDJ scores short zones the entire time the J line is below the signal (SL) line.
█ PLOTTING
• Standard: Symbols (EL, XS, ES, XL) appear relative to candles based on set conditions. Their opacity and position vary with weight.
• Conditional Settings: A larger icon appears if global conditions are met. For instance, with a Threshold(⥇) of 12, Signal Period (SP) of 3, and Scoring Condition (SC) set to "EVERY", an KDJ signaling over two times in 3 candles (scoring 6 each) triggers a larger icon.
█ USAGE OF CONNECTABLE INDICATORS
■ Connectable chaining mechanism
Connectable indicators can be connected directly to the signal monitor, signal filter or strategy , or they can be daisy chained to each other while the last indicator in the chain connects to the signal monitor, signal filter or strategy. When using a signal filter you can chain the filter to the strategy input to make your chain complete.
• Direct chaining: Connect an indicator directly to the signal monitor, signal filter or strategy through the provided inputs (→).
• Daisy chaining: Connect indicators using the indicator input (→). The first in a daisy chain should have a flow (⌥) set to 'Indicator only'. Subsequent indicators use 'Both' to pass the previous weight. The final indicator connects to the signal monitor, signal filter, or strategy.
■ Set up this indicator with a signal filter and strategy
The indicator provides visual cues based on signal conditions. However, its weight system is best utilized when paired with a connectable signal filter, signal monitor, or strategy .
Let's connect the KDJ to a connectable signal filter and a strategy :
1. Load all relevant indicators
• Load KDJ / Connectable
• Load Signal filter / Connectable
• Load Strategy / Connectable
2. Signal Filter: Connect the KDJ to the Signal Filter
• Open the signal filter settings
• Choose one of the three input dropdowns (1→, 2→, 3→) and choose : KDJ / Connectable: Signal Connector
• Toggle the enable box before the connected input to enable the incoming signal
3. Signal Filter: Update the filter signals settings if needed
• The default settings of the filter enable EL (Enter Long), XL (Exit Long), ES (Enter Short) and XS (Exit Short).
4. Signal Filter: Update the weight threshold settings if needed
• All connectable indicators load by default with a score of 6 for each direction (EL, XL, ES, XS)
• By default, weight threshold (TH) is set at 5. This allows each occurrence to score, as the default score in each connectable indicator is 1 point above the threshold. Adjust to your liking.
5. Strategy: Connect the strategy to the signal filter in the strategy settings
• Select a strategy input → and select the Signal filter: Signal connector
6. Strategy: Enable filter compatible directions
• Set the signal mode of the strategy to a compatible direction with the signal filter.
Now that everything is connected, you'll notice green spikes in the signal filter representing long signals, and red spikes indicating short signals. Trades will also appear on the chart, complemented by a performance overview. Your journey is just beginning: delve into different scoring mechanisms, merge diverse connectable indicators, and craft unique chains. Instantly test your results and discover the potential of your configurations. Dive deep and enjoy the process!
█ BENEFITS
• Adaptable Modular Design: Arrange indicators in diverse structures via direct or daisy chaining, allowing tailored configurations to align with your analysis approach.
• Streamlined Backtesting: Simplify the iterative process of testing and adjusting combinations, facilitating a smoother exploration of potential setups.
• Intuitive Interface: Navigate TradingView with added ease. Integrate desired indicators, adjust settings, and establish alerts without delving into complex code.
• Signal Weight Precision: Leverage granular weight allocation among signals, offering a deeper layer of customization in strategy formulation.
• Advanced Signal Filtering: Define entry and exit conditions with more clarity, granting an added layer of strategy precision.
• Clear Visual Feedback: Distinct visual signals and cues enhance the readability of charts, promoting informed decision-making.
• Standardized Defaults: Indicators are equipped with universally recognized preset settings, ensuring consistency in initial setups across different types like momentum or volatility.
• Reliability: Our indicators are meticulously developed to prevent repainting. We strictly adhere to TradingView's coding conventions, ensuring our code is both performant and clean.
█ COMPATIBLE INDICATORS
Each indicator that incorporates our open-source 'azLibConnector' library and adheres to our conventions can be effortlessly integrated and used as detailed above.
For clarity and recognition within the TradingView platform, we append the suffix ' / Connectable' to every compatible indicator.
█ COMMON MISTAKES, CLARIFICATIONS AND TIPS
• Removing an indicator from a chain: Deleting a linked indicator and confirming the "remove study tree" alert will also remove all underlying indicators in the object tree. Before removing one, disconnect the adjacent indicators and move it to the object stack's bottom.
• Point systems: The azLibConnector provides 500 points for each direction (EL: Enter long, XL: Exit long, ES: Enter short, XS: Exit short) Remember this cap when devising a point structure.
• Flow misconfiguration: In daisy chains the first indicator should always have a flow (⌥) setting of 'indicator only' while other indicator should have a flow (⌥) setting of 'both'.
• Hide attributes: As connectable indicators send through quite some information you'll notice all the arguments are taking up some screenwidth and cause some visual clutter. You can disable arguments in Chart Settings / Status line.
• Layout and abbreviations: To maintain a consistent structure, we use abbreviations for each input. While this may initially seem complex, you'll quickly become familiar with them. Each abbreviation is also explained in the inline tooltips.
• Inputs: Connecting a connectable indicator directly to the strategy delivers the raw signal without a weight threshold, meaning every signal will trigger a trade.
█ A NOTE OF GRATITUDE
Through years of exploring TradingView and Pine Script, we've drawn immense inspiration from the community's knowledge and innovation. Thank you for being a constant source of motivation and insight.
█ RISK DISCLAIMER
Azullian's content, tools, scripts, articles, and educational offerings are presented purely for educational and informational uses. Please be aware that past performance should not be considered a predictor of future results.
Sessions Lite [TradingFinder] New York, London, Asia, NYSE Forex🔵 Introduction
A trading session is one of the basic concepts in the financial market that refers to specific time periods. In fact, a session means hours during the day and night, during which traders in a certain part of the world conduct their transactions.
Although the "Forex" and "CFDs" market is open 24 hours a day and it is possible to trade in it, but in some hours the activity in this market decreases so much that many traders prefer not to trade and only watch the market. On the other hand, there are specific times when the market is very busy and dynamic, and many traders tend to trade during these hours of the day and night.
Trading sessions are usually divided into three main categories, which are "Asian", "European" and "North American" sessions. These trading sessions are also called the "Tokyo", "London" and "New York" sessions, respectively. But they also categorized these sessions in more detailed ways such as "Sydney session", "Shanghai session" or "NYSE session".
🔵 Tokyo trading session (Asian session)
After the weekend that happens on Saturday and Sunday, the Forex market starts with the Asian session. In this continent, most of the transactions are done in the Tokyo session, and for this reason, it is usually called the Asian session or the Tokyo session. However, other countries such as Australia, China and Singapore also do a lot of trading in this session.
The Tokyo session has a lower volume of transactions compared to the London and New York sessions, and therefore the liquidity is lower. In this session, most of the Forex currency pairs move in a price range. For this reason, different people use the ups and downs with the trading strategy in the range and get profit.
The low liquidity of the Tokyo session means that trading spreads are also higher during these hours. Besides, most of the transactions of this session are done in the early hours and at the same time as the planned news release.
In the Tokyo or Asia session, the best currency pairs to trade are the "Japanese yen", the "Australian dollar", and the "New Zealand dollar".
"Nikkei" index is also a good option for trading. If you trade in the Tokyo session, you should also be aware of the release of economic news and data from Australian, New Zealand and Japanese financial institutions.
🔵 London trading session (European session)
After the Asian session, it is time for the European session. In this period of time, transactions are very large and many European markets are involved. However, the European session is usually known as the London session.
Because of its specific time zone, London is not only known as the Forex trading center in Europe, but it is also known as the Forex trading center in the world. The London session overlaps with two other major trading sessions in the world, Asia and America. This means that most of the Forex transactions are done in this session. According to the latest statistics, 32% of Forex transactions are related to the London session, which shows that about a third of the activity performed in Forex takes place during this period.
This will increase the volume of Forex transactions and increase liquidity. An event that causes the spread of transactions to decrease. Of course, high liquidity also leads to greater volatility, which is desirable for many traders.
In the European session, the pound and euro currencies and the "DAX", "FTSE100", and "CAC40" indices are known as the best tradable assets. Also, traders of this session should pay attention to the news and data published by the "European Central Bank" and the "Bank of England". The news of countries like Germany, France and Italy are also very important.
🔵 American trading session (New York session)
When the New York session begins, several hours have passed since the end of the Tokyo session, but the European session is in the middle. In this session, they usually affect the financial activities carried out in America, but they also affect other countries such as Canada, Mexico and several South American countries.
The "US dollar" and stock indices such as "S&P", "Dow Jones" and "Nasdaq" are the most important assets that are traded in this session.
The early hours of the American session have a lot of liquidity and volatility due to the overlap with the European session, but with the end of the European session, the activity in the American session also decreases.
You can trade all major Forex currency pairs in the New York trading session. In this session, the "Federal Reserve", as the most important central bank in the world, is the institution that you should pay attention to its news and data.
The trading session indicator is an analytical tool in the financial markets that is used to display and analyze specific trading periods during a day. These indicators are generally useful for determining support and resistance levels during any trading session and for detecting different trading patterns.
For example, usually these indicators display the open and close price levels, the highest and lowest prices during a trading session. Also, you may notice various price patterns such as price channels, price phase phases and market trend changes during different trading sessions using these indicators.
🔵 cause of construction
In particular, the session light indicator version is designed and built for those traders who use many different tools on their chart at the same time. These traders can include "Volume Traders", "ICT traders", "Day Traders" and... These individuals can use "Session Lite" without disturbing the display of their other trading tools such as "Order Blocks", "Liquidity", "Zigzag", "FVG" etc.
But in general, there are several reasons for making tools like trading session indicators in financial markets, some of which include the following :
1. Analysis of specific time frames : Some traders and investors like to consider specific time frames for price analysis and review. For example, analyzing price changes during each trading session can help analyze trading patterns and identify trading opportunities.
2. Recognize different price patterns : Different price patterns may be observed during trading sessions. Trading session indicators can help to make better trading decisions by analyzing these patterns and their strengths and weaknesses.
3. Identifying Support and Resistance Levels : These tools may help to identify support and resistance levels during any trading session which can be helpful in deciding whether to enter or exit the market.
🔵 How to use
The Session Lite indicator displays 8 sessions by default. Asia session, Sydney session, Tokyo session, Shanghai session, Europe session, London session, New York session and New York Stock Exchange (NYSE) session are the sessions that are displayed.
You can activate or deactivate the display of each session by using the tick button next to the name of each session.
Two gray vertical dashes are also displayed by default, which indicate the beginning of the European session and the New York session. This feature is available for all sessions, but it is enabled by default only for these two sessions, and you can activate it for the rest of the session. You can enable or disable the display of this line by using the Start Session tick key.
Likewise, the information table is displayed by default, which includes the open or closed information of each session and the start and end times of each session. These timings are based on the UTC time zone.
Accordingly, the schedule of trading sessions is as follows :
Asia session from 23:00 to 06:00
Sydney session from 23:00 to 05:00
Tokyo session from 00:00 to 00:06
Shanghai session from 01:30 to 06:57
European session from 07:00 to 16:30
London session from 08:00 to 16:30
New York session from 13:00 to 22:00
New York Stock Exchange (NYSE) session from 14:30 to T 22:00
Important note : the beginning of the European session coincides with the opening of the Frankfurt market.
🔵 Settings
• In the settings section, there are customization capabilities according to the type of use of each user. The settings related to showing or not showing the box of each session, the start indicator of each session, setting the start and end time of the session and choosing the desired color to display each session are among the things that can be set from this section.
• At the end of the settings, you will see the "Info Table" option; By disabling this option, the "sessions" clock table displayed on the upper right side will be disabled.
Custom Hourly Highlight PeriodsThis Pine Script indicator for TradingView allows users to visually highlight up to five distinct periods within a trading day directly on their chart. It's designed to enhance chart analysis by emphasizing specific time frames that may coincide with increased market activity, trading sessions, or personal trading strategies.
Features:
Customizable Highlight Periods: Users can define up to five separate highlight periods, specifying both start and end hours for each. This flexibility supports a wide range of trading strategies and time zones.
Individual Period Activation: Each highlight period can be individually enabled or disabled, allowing users to focus on specific times of interest without cluttering the chart.
Color-Coded Visualization: Each period is highlighted with a different transparent color (blue, red, green, purple, and orange) for clear distinction between different segments of the trading day. Colors are customizable to fit personal preferences or chart themes.
User-Friendly Inputs: Simple input fields make it easy to adjust start/end times and toggle the visibility of each period, requiring no coding experience to customize.
Use Cases:
Identifying Repeating Patterns: Certain regional markets exhibit unique behaviors, with some creating sell pressure in the morning, while others generate buy pressure. This indicator allows for clear visualization of these patterns.
Market Session Highlights: Emphasize the opening and closing hours of major markets (e.g., NYSE, NASDAQ, Forex markets) to identify potential volatility or trading opportunities.
Personal Trading Hours: Mark the time frames when you typically trade or when your trading strategy performs best.
Economic Release Times: Highlight periods when important economic reports are released, which can significantly impact market movement.
Global Liquidity Index (Candles)The Global Liquidity Index (Candles) provides a comprehensive overview of major central bank balance sheets worldwide, presenting values converted to USD for consistency and comparability, following relevant forex rates. This indicator, based on the code developed by user ingeforberg , incorporates essential US accounts including the Treasury General Account (TGA) and Reverse Repurchase Agreements (RRP), subtracted from the Federal Reserve's balance sheet to offer a nuanced perspective on US liquidity. Users can tailor their analysis by selectively enabling or disabling specific central banks and special accounts according to their preferences. The index exclusively includes central banks abstaining from currency pegging and with reliable data accessible since late 2007, ensuring a robust aggregated liquidity model.
The calculation of the Global Liquidity Index involves subtracting the Treasury General Account (TGA) and Reverse Repurchase Agreements (RRP) from the Federal Reserve System (FED) and adding the balance sheets of major central banks worldwide: the European Central Bank (ECB), the People's Bank of China (PBC), the Bank of Japan (BOJ), the Bank of England (BOE), the Bank of Canada (BOC), the Reserve Bank of Australia (RBA), the Reserve Bank of India (RBI), the Swiss National Bank (SNB), the Central Bank of the Russian Federation (CBR), the Central Bank of Brazil (BCB), the Bank of Korea (BOK), the Reserve Bank of New Zealand (RBNZ), Sweden's Central Bank (Riksbank), and the Central Bank of Malaysia (BNM).
This tool proves invaluable for individuals seeking a consolidated perspective on global liquidity to interpret macroeconomic trends. Analyzing these balance sheets enables users to discern policy trajectories and assess the global economic landscape, providing insights into asset pricing and assisting investors in making well-informed capital allocation decisions. Historically, assets perceived as riskier, such as small caps and cryptocurrencies, have tended to perform favorably during periods of escalating liquidity. Thus, investors may exercise caution regarding additional risk exposure unless a sustained upward trend in global liquidity is evident.
Main differences between the original and updated indicators:
The "Global Liquidity Index (Candles)" script, compared to the original "Global Liquidity Index" script, offers a more detailed and visually rich representation of liquidity data.
"Global Liquidity Index (Candles)" employs candlestick visualization to represent liquidity data. Each candlestick encapsulates open, high, low, and close prices over a given period. This format provides granular insights into liquidity fluctuations, facilitating a more nuanced analysis.
By using candlesticks, the script offers traders detailed information about liquidity dynamics. They can analyze the patterns formed by candlesticks to discern trends, reversals, and market sentiment shifts, aiding in making informed trading decisions.
Moving Average PropertiesThis indicator calculates and visualizes the Relative Smoothness (RS) and Relative Lag (RL) or call it accuracy of a selected moving average (MA) in comparison to the SMA of length 2 (the lowest possible length for a moving average and also the one closest to the price).
Median RS (Relative Smoothness):
Interpretation: The median RS represents the median value of the Relative Smoothness calculated for the selected moving average across a specified look-back period (max bar lookback is set at 3000).
Significance: A more negative (larger) median RS suggests that the chosen moving average has exhibited smoother price behavior compared to a simple moving average over the analyzed period. A less negative value indicates a relatively choppier price movement.
Median RL (Relative Lag):
Interpretation: The median RL represents the median value of the Relative Lag calculated for the selected moving average compared to a simple moving average of length 2.
Significance: A higher median RL indicates that the chosen moving average tends to lag more compared to a simple moving average. Conversely, lower values suggest less lag in the selected moving average.
Ratio of Median RS to Median RL:
Interpretation: This ratio is calculated by dividing the median RS by the median RL.
Significance: Traders might use this ratio to assess the balance between smoothness and lag in the chosen moving average. This a measure of for every % of lag what is the smoothness achieved. This can be used a benchmark to decide what length to choose for a MA to get an equivalent value between two stocks. For example a TESLA stock on a 15 minute time frame with a length of 12 has a value (ratio of RS/RL) of -150 , where as APPLE stock of length 35 on a 15 minute chart also has a value (ratio of RS/RL) of -150.
I imply that a MA of length 12 working on TESLA stock is equivalent to MA of length 35 on a APPLE stock. (THIS IS A EXAMPLE).
My assumption is that finding the right moving average length for a stock isn't a one-size-fits-all situation. It's not just about using a fixed length; it's about adapting to the unique characteristics of each stock. I believe that what works for one stock might not work for another because they have different levels of smoothness or lag in their price movements. So, instead of applying the same length to all stocks, I suggest adjusting the length of the moving average to match the values that we know work best for achieving the desired smoothness or lag or its ratio (RS/RL). This way, we're customizing the indicator for each stock, tailoring it to their individual behaviors rather than sticking to a one-size-fits-all approach.
Users can choose from various types of moving averages (EMA, SMA, WMA, VWMA, HMA) and customize the length of the moving average. RS measures the smoothness of the MA, while RL measures its lag compared to a simple moving average. The script plots the median RS and RL values, the selected MA, and the ratio of median RS to median RL on the price chart. Traders can use this information to assess the performance of different moving averages and potentially inform their trading decisions.
Interest Bricks @shrilssInterest Bricks utilize a unique approach to visualize changes in interest over time. It calculates the difference between the current and previous values of a specified asset's closing price on a daily basis. The resulting value indicates whether there has been an increase, decrease, or no change in interest.
This indicator employs a sine wave plot to represent the trend of interest changes. Positive values of the sine wave indicate increasing interest, while negative values denote decreasing interest. The color of the plot dynamically changes based on the direction of the trend: lime for upward trends and red for downward trends.
Word PuzzleWord Puzzle is a PineScript-based clone of the popular daily puzzle game called "Wordle".
It is not identical, but the general gameplay is the same.
>How It works (The Game)
A secret word (also referred to as the "target word") is randomly selected from a database of 5 Letter words.
The player/user's goal is to guess that word within 6 attempts.
After each guess, the script provides information to the user by color coding the letters of their guess.
Green (Known Letters): These letters are in the exact spot that they occur in the target word.
Yellow (Included Letters): These letters are included in the target word; however, the user does not have them in the correct position.
Gray (Un-used Letters): These letters do not occur anywhere in the target word
>Interface
On each turn the user will input their 5 letter guess into the "Guess #" box and submit it by checking the check-box next to the word.
If the input word is invalid, the script will prompt you. Invalid words are any words not found within the script's valid word list.
After guess 3, hints may be viewed by hovering over the "Need a Hint" box on the display.
If you are unable to guess the word in the given amount of guesses, the 'Game Over' screen will display, and you will be able to view the answer in the same box as the hints.
To start a new game, clear all inputs and insert a different number into the "Puzzle Seed" input, to have the script randomly select a new word.
NOTE: Word selection based on the seed number is deterministic, the same seed number will always have the same puzzle word.
>Additional Information
The script comes equipped with 5 different themes as seen below.
Table size is also selectable.
This indicator makes use of 'tooltips'.
Hover over the boxes on the table for quick reference information or additional information on prompts.
Since the script randomly selects from the ENTIRE valid word list you are bound to come across some obscure words with strange spellings.
Because of this, I have built in a "quick way out".
To end a game without filling out all guesses, submit the answer "Give Up" to skip to the end screen where you can reveal the puzzle's answer.
Afterwards, take a second to look up the definition! Ever heard of a xylyl?!
The code is fully notated. Most of the script involves string management, but there are still some neat tricks in here as well.
Enjoy!