EMA + Lower Timeframe EMA (correct display in Replay Mode)This indicator shows
one EMA for the current timeframe
one EMA for a lower timeframe
Unlike the built-in Tradingview EMA indicator, this indicator shows the correct values for the lower timeframe EMA during Replay Mode.
Скользящие средние
[MAD] Acceleration based dampened SMA projectionsThis indicator utilizes concepts of arrays inside arrays to calculate and display projections of multiple Smoothed Moving Average (SMA) lines via polylines.
This is partly an experiment as an educational post, on how to work with multidimensional arrays by using User-Defined Types
------------------
Input Controls for User Interaction:
The indicator provides several input controls, allowing users to adjust parameters like the SMA window, acceleration window, and dampening factors.
This flexibility lets users customize the behavior and appearance of the indicator to fit their analysis needs.
sma length:
Defines the length of the simple moving average (SMA).
acceleration window:
Sets the window size for calculating the acceleration of the SMA.
Input Series:
Selects the input source for calculating the SMA (typically the closing price).
Offset:
Determines the offset for the input source, affecting the positioning of the SMA. Here it´s possible to add external indicators like bollinger bands,.. in that case as double sma this sma should be very short.
(Thanks Fikira for that idea)
Startfactor dampening:
Initial dampening factor for the polynomial curve projections, influencing their starting curvature.
Growfactor dampening:
Growth rate of the dampening factor, affecting how the curvature of the projections changes over time.
Prediction length:
Sets the length of the projected polylines, extending beyond the current bar.
cleanup history:
Boolean input to control whether to clear the previous polyline projections before drawing new ones.
Key technologies used in this indicator include:
User-Defined Types (UDT) :
This indicator uses UDT to create a custom type named type_polypaths.
This type is designed to store information for each polyline, including an array of points (array), a color for the polyline, and a dampening factor.
UDTs in Pine Script enable the creation of complex data structures, which are essential for organizing and manipulating data efficiently.
type type_polypaths
array polyline_points = na
color polyline_color = na
float dampening_factor= na
Arrays and Nested Arrays:
The script heavily utilizes arrays.
For example, it uses a color array (colorpreset) to store different colors for the polyline.
Moreover, an array of type_polypaths (polypaths) is used, which is an array consisting of user-defined types. Each element of this array contains another array (polyline_points), demonstrating nested array usage.
This structure is essential for handling multiple polylines, each with its set of points and attributes.
var type_polypaths polypaths = array.new()
Polyline Creation and Manipulation:
The core visual aspect of the indicator is the creation of polylines.
Polyline points are calculated based on a dampened polynomial curve, which is influenced by the SMA's slope and acceleration.
Filling initial dampening data
array_size = 9
middle_index = math.floor(array_size / 2)
for i = 0 to array_size - 1
damp_factor = f_calculate_damp_factor(i, middle_index, Startfactor, Growfactor)
polyline_color = colorpreset.get(i)
polypaths.push(type_polypaths.new(array.new(0, na), polyline_color, damp_factor))
The script dynamically generates these polyline points and stores them in the polyline_points array of each type_polypaths instance based on those prefilled dampening factors
if barstate.islast or cleanup == false
for damp_factor_index = 0 to polypaths.size() - 1
GET_RW = polypaths.get(damp_factor_index)
GET_RW.polyline_points.clear()
for i = 0 to predictionlength
y = f_dampened_poly_curve(bar_index + i , src_input , sma_slope , sma_acceleration , GET_RW.dampening_factor)
p = chart.point.from_index(bar_index + i - src_off, y)
GET_RW.polyline_points.push(p)
polypaths.set(damp_factor_index, GET_RW)
Polyline Drawout
The polyline is then drawn on the chart using the polyline.new() function, which uses these points and additional attributes like color and width.
for pl_s = 0 to polypaths.size() - 1
GET_RO = polypaths.get(pl_s)
polyline.new(points = GET_RO.polyline_points, line_width = 1, line_color = GET_RO.polyline_color, xloc = xloc.bar_index)
If the cleanup input is enabled, existing polylines are deleted before new ones are drawn, maintaining clarity and accuracy in the visualization.
if cleanup
for pl_delete in polyline.all
pl_delete.delete()
------------------
The mathematics
in the (ABDP) indicator primarily focuses on projecting the behavior of a Smoothed Moving Average (SMA) based on its current trend and acceleration.
SMA Calculation:
The indicator computes a simple moving average (SMA) over a specified window (sma_window). This SMA serves as the baseline for further calculations.
Slope and Acceleration Analysis:
It calculates the slope of the SMA by subtracting the current SMA value from its previous value. Additionally, it computes the SMA's acceleration by evaluating the sum of differences between consecutive SMA values over an acceleration window (acceleration_window). This acceleration represents the rate of change of the SMA's slope.
sma_slope = src_input - src_input
sma_acceleration = sma_acceleration_sum_calc(src_input, acceleration_window) / acceleration_window
sma_acceleration_sum_calc(src, window) =>
sum = 0.0
for i = 0 to window - 1
if not na(src )
sum := sum + src - 2 * src + src
sum
Dampening Factors:
Custom dampening factors for each polyline, which are based on the user-defined starting and growth factors (Startfactor, Growfactor).
These factors adjust the curvature of the projected polylines, simulating various future scenarios of SMA movement.
f_calculate_damp_factor(index, middle, start_factor, growth_factor) =>
start_factor + (index - middle) * growth_factor
Polynomial Curve Projection:
Using the SMA value, its slope, acceleration, and dampening factors, the script calculates points for polynomial curves. These curves represent potential future paths of the SMA, factoring in its current direction and rate of change.
f_dampened_poly_curve(index, initial_value, initial_slope, acceleration, damp_factor) =>
delta = index - bar_index
initial_value + initial_slope * delta + 0.5 * damp_factor * acceleration * delta * delta
damp_factor = f_calculate_damp_factor(i, middle_index, Startfactor, Growfactor)
Have fun trading :-)
SMIIO + VolumeThis indicator generates long and short signals.
The operation of the indicator is as follows;
First, true strength index is calculated with closing prices. We call this the "ergodic" curve.
Then the average of the ergodic (ema) is calculated to obtain the "signal" curve.
To calculate the "oscillator", the signal is subtracted from ergodic (oscillator = ergodic - signal).
The last variable to be used in the calculation is the average volume, calculated with sma.
Calculation for long signal;
- If the ergodic curve cross up the zero line (ergodic > 0 AND ergodic < 0) and,
- If the current oscillator is greater than the previous oscillator (oscillator > oscillator ) and,
- If the current ergonic is greater than the previous signal (ergonic > signal) and,
- If the current volume is greater than the average volume (volume > averageVolume) and,
- If the current candle closing price is greater than the opening price (close > open)
If all the above conditions are fullfilled, the long input signal is issued with "Buy" label.
Calculation for short signal;
- If the ergodic curve cross down the zero line (ergodic < 0 AND ergodic > 0) and,
- If the current oscillator is smaller than the previous oscillator (oscillator < oscillator ) and,
- If the current ergonic is smaller than the previous signal (ergonic < signal) and,
- If the current volume is greater than the average volume (volume > averageVolume) and,
- If the current candle closing price is smaller than the opening price (close < open)
If all the above conditions are fullfilled, the short input signal is issued with "Sell" label.
Osmosis [ChartPrime]Osmosis is a multi indicator, multi period heatmap. Lookback periods can be mysterious as it can tend to seem very arbitrary. This tool allows users to see how price/volume reacts to short to long periods by visualizing all of the periods at the same time. This is useful because small periods are only good for short term movements while long periods are useful for long term movements. This more detailed view of market trends is analogues of multi time frame analysis. The lookback periods are arranged from bottom up, where the bottom of the indicator is the shortest period while the top is the longest period.
One major feature of this indicator is its ability to signal potential trend reversals. For example, a shift in the direction at the lower end of the heatmap can indicate a weakening of the current trend, suggesting a possible reversal. On the other hand, when the heatmap is fully saturated at all levels, it may indicate a strong trend that could be nearing a reversal point.
Another important and unique aspect of the Osmosis indicator is its automatic highlighting feature. This feature emphasizes regions within the heatmap that score exceptionally high or low, drawing attention to significant market movements or potential anomalies.
All of the indicators are normalized using min/max scaling driven by the highest highs and lows. The period of this scaling is adjustable by changing the "Lookback" parameter under settings. Delta length changes the lookback for "MA Delta" and "Volume Delta". A longer period corresponds to a smoother output. Fast Mode scales back the range of the indicator, literally halving the increment.
Here is a short description of what each input does:
Alternate Source: A choice to use a different data source for the indicator.
Source: An option to turn on or off the alternate data source.
Style: A selection menu to choose the visual style of the indicator.
Lookback: Adjusts how far back in time the indicator looks for its calculations.
Delta Length: Changes the length of time over which changes are measured.
Fast Mode: A setting that adjusts the range of the indicator for quicker analysis.
Enable Smoothing: A choice to smooth out the data for a cleaner look.
Smooth: Activates the smoothing feature.
Max Region: Highlights the highest value regions in the heatmap.
Max Threshold: Sets the threshold for what counts as a 'max' region.
Minimum Max Width: Determines the smallest size for a 'max' region to be highlighted.
Max Region Color: Chooses the color for the maximum value regions.
Max Top Line Alpha: Adjusts the transparency of the top line in max regions.
Max Bottom Line Alpha: Adjusts the transparency of the bottom line in max regions.
Line Width: Sets the thickness of the lines in the max regions.
Region Start Indication: Specifies where the max region starts.
Fill Max: Decides if the max regions should be filled with color and sets the transparency level for the color fill in max regions.
Minimum Region: Highlights the lowest value regions in the heatmap.
Minimum Threshold: Sets the threshold for what counts as a 'min' region.
Minimum Minimum Width: Determines the smallest size for a 'min' region to be highlighted.
Minimum Region Color: Chooses the color for the minimum value regions.
Minimum Top Line Alpha: Adjusts the transparency of the top line in min regions.
Minimum Bottom Line Alpha: Adjusts the transparency of the bottom line in min regions.
Minimum Line Width: Sets the thickness of the lines in the min regions.
Minimum Region Start Indication: Specifies where the min region starts.
Fill Minimum: Decides if the min regions should be filled with color and sets the transparency level for the color fill in min regions.
Color Presets: Provides pre-set color schemes.
Invert Color Scale: Flips the color scale.
Gradient Colors: Customizes individual colors for the gradient scale.
Available styles include:
'MACD Histogram'
'Normalized MACD'
'Slow MACD'
'MACD Percent Rank'
'MA Delta' (Delta Length set to 2)
'BB Width'
'BB Width Percentile'
'Stochastic'
'RSI'
'True Range OSC'
'Normalized Volume'
'Volume Delta'
'True Range'
'Rate of Change' (Smoothing set to 1)
'OBV' (Smoothing set to 1)
'MFI' (Smoothing set to 1)
'Trend Angle' (Smoothing set to 2 and fast mode off)
EXPONOVA @thejamiulNSE:NIFTY "EXPONOVA @thejamiul," is designed to provide traders with a visual tool to analyze market trends and potential entry or exit points. Here's an overview of its features and functionality:
1. Dual Exponential Moving Averages (EMAs):
The indicator utilizes two EMAs with different lengths - one set at 20 periods and the other at 55 periods. These EMAs are calculated based on the closing prices of the assets.
2. Color Gradient Feature:
A unique aspect of this indicator is its use of a color gradient to visually represent the relationship between the price and the longer EMA (55 periods). The gradient consists of a series of colors ranging from shades of red to green.
3. Dynamic Color Adaptation:
The indicator dynamically changes the color of the area between the two EMAs. This color change is based on the position of the closing price relative to the longer EMA (55 periods). The color shifts through the gradient based on the number of bars since the price last crossed the longer EMA.
4. Close Price and EMA Interaction:
The script includes functions to determine whether the closing price is above or below the longer EMA. This interaction is a crucial part of how the color gradient is applied.
5. Visualisation of Market Trends:
By plotting these EMAs and the color-filled area between them, the indicator provides a visual representation of market trends. The changing colors can help traders in identifying trend strength, potential reversals, or consolidation phases.
6. Overlay on Price Chart:
The indicator is designed to overlay directly on the price chart, making it easier for traders to correlate the EMAs and the color gradient with price movements.
7. Explicit Mention of Originality:
One of the distinctive features of 'EXPONOVA @thejamiul' is its innovative use of a color gradient to visually represent the price's relationship with the longer EMA. This approach, combined with our specific choice of EMAs and the dynamic color adaptation technique, sets this script apart from standard EMA-based indicators.
8. Acknowledgement of Potential Shortcomings or Limitations:
While 'EXPONOVA @thejamiul' provides a dynamic visual aid for trend analysis, users should note that like all indicators, it is subject to market volatility and should be used in conjunction with other analysis methods. This script is best suited for , and users may need to adjust settings for optimal performance in different market scenarios.
9. Summary:
"EXPONOVA @thejamiul" is a visually intuitive and dynamic trading tool that combines dual EMAs with a unique color gradient feature to aid traders in making informed decisions based on the relationship between price trends and moving averages.
Moving Average Dispersion Index w/ Z-Score (Adjusted MADI-Z)Overview
The Adjusted MADI-Z indicator is a custom indicator that looks to decipher trends and consolidations based on the clustering and dispersion of Moving Averages. It calculates a z-score based on the dispersion of various exponentially weighted moving averages to identify trends and consolidation. The z-score is then adjusted using a logistic function to map it between 0-100.
How can it be used?
- Identify trends and consolidation - Values above 80 indicate a strong trend while values below 20 show consolidation
- Gauge trend strength - Higher positive values suggest a stronger uptrend while lower negative values indicate a stronger downtrend
- Generate trading signals - Crossovers of key levels can act as entry/exit triggers
- Smooth noise in price action - The adjusted z-score filters out market noise
Default Values
- ma5_len = 5
- ma10_len = 10
- ma50_len = 50
- ma200_len = 200
- lookback_period = 100
Strategies
The Adjusted MADI-Z can be used for trend-following strategies across various timeframes. Specific strategies include:
- Trend trading - Enter long on crossover above 80, exit on crossover below 80. Reverse for short trades.
- Range trading - Enter short on crossover below 20, exit on crossover above 20. Reverse for long trades.
- Identifying pullbacks - Temporary moves below 80 during uptrends and above 20 during downtrends can act as retracement entry points.
Rationale
By adjusting the z-score output of the standard MADI using a logistic function, the indicator becomes bounded and easier to interpret for trading purposes. The customized moving average lengths also allow tuning the indicator to particular assets and timeframes.
Interpretation
- Above 80 - Strong uptrend
- 70 to 80 - Moderate uptrend
- 50 to 70 - Weak uptrend
- 30 to 50 - Range-bound consolidation
- 20 to 30 - Weak downtrend
- Below 20 - Strong downtrend
Values below 15 or above 85 represent extremes outside two standard deviations.
5 ema strategyThis Strategy is based of Subhashish Pani's (power of stocks) 5 EMA Strategy.strategy used for sell in 5 minutes and for buy in 15 minutes ..
Rules for this strategy ..
Sell signal -
1) if price is above 5 Ema and not touching Ema use as alert candle..
2) if price break low of alert candle strategy open trade ..
3) if price move more upside low of alert candle keep change into next candle ..
4) input we can select number of trade per day .as rule should take only 4 signal should execute
5) stop loss is fixed highest high of last 2 candle and take profit is input multiply of stop loss
buy signal-
1) if price is below 5 Ema and not touching Ema use as alert candle..
2) if price break high of alert candle strategy open trade ..
3) if price move more downside high of alert candle keep change into next candle ..
4) input we can select number of trade per day .as rule should take only 4 signal should execute
5) stop loss is fixed lowest low of last 2 candle and take profit is input multiply of stop loss
notes -input can be selected which side should take signal either buy or sell side ...number of trade can be adjusted ..
Disclaimer -Traders can use this script as a starting point for further customization or as a reference for developing their own trading strategies. It's important to note that past performance is not indicative of future results, and thorough testing and validation are recommended before deploying any trading strategy.
Donch +This is an indicator I made for trading Forex to help me see the bigger picture. It is meant for the 30min TF and it includes the following:
- 20 Day High | Low
- 5 Day High | Low
- 4 Hour High | L
- 4 Hour Bars
- Daily Simple Moving Averages
- Weekly Trend Line (connects last week's open to this week's open)
- Daily Trend Line (connects yesterday's open to today's open)
- Horizontal Lines at 0.25% increments (these can be useful for S/R... currency rarely moves more than 1% in a day).
- A table with information about what markets are open and technicals on the pair I am looking at.
- A slight white background fill to highlight the first hour of the US session. Knowing what session you are in is very important in day trading (in my opinion). This lets me go back and see how the US has been trading.
To keep the chart from being "too busy" (it's plenty busy lol), I use a step line and focus on 30min closes. I reference the white lines above and below closes for 4hr highs/lows and don't bother with looking at the high/low of every 30 min bar.
For the table, you will see bright green by the country for the first hour of trading in that session. It will turn to a regular green after the first hour. It will turn yellow the final hour of that session. It will turn red if that market is closed.
You can select from the settings 'inputs' tab to enable/disable any parts of this you don't find useful, for the table you'd go over to the 'style' tab and unselect it there. For example, I don't use the labels regularly. If I were to get confused about what a moving average was or something, I'd enable the labels and clarify.
Currency doesn't like to break out and likes to be stable. Keeping this in mind, you can see how the 20 day high / low and the 5 day high / low act as support and resistance (unless there is a news event to break out on.
I have alerts for the following:
- Price update every hour
- Crossing a trend line
- Crossing a moving average
- Crossing a 0.25% increment
- Making a new 4 hour, 5 day, or 20 day high/low
To enable the alerts, you would click add alert, select the indicator, and click save. To work properly, you'd want to be on the 30min TF before doing this. You will get a lot of alerts (personally I like this because I like to see how currency moves throughout the day). You will get one notification per 30 minutes but not more than that for the particular alert.
Envelope and Moving Average**Description:**
- This script creates an indicator that combines an envelope and a simple moving average (MA).
- The envelope is constructed using a specified length, percentage deviation, and source price (close by default).
- The moving average is calculated based on a specified length and source price.
**Inputs:**
1. Envelope:
- Length: Number of periods used for the envelope calculation (default is 20).
- Percentage Deviation: Percentage above and below the envelope basis (default is 10%).
- Source: The price used for the envelope calculation (default is close).
- Exponential MA: Option to use exponential moving average for the envelope basis (default is false).
2. Moving Average:
- Length: Number of periods used for the moving average calculation (default is 20).
- Source: The price used for the moving average calculation (default is close).
**Plotting:**
- The script plots the envelope basis, upper envelope line, and lower envelope line.
- The area between the upper and lower envelope lines is filled with a semi-transparent color for better visualization.
- The moving average is plotted on the chart with a specified color and line width.
**How to Use in a Strategy:**
1. **Envelope Crossovers:**
- Go Long (Buy): When the close price crosses above the upper envelope line.
- Go Short (Sell): When the close price crosses below the lower envelope line.
2. **Moving Average Crossovers:**
- Go Long (Buy): When the close price crosses above the moving average.
- Go Short (Sell): When the close price crosses below the moving average.
3. **Confirmation:**
- Consider additional confirmation signals or filters to improve the robustness of your strategy.
- For example, you might require a certain amount of price momentum or use other technical indicators in conjunction with envelope and moving average signals.
4. **Optimization:**
- Experiment with different parameter values (e.g., envelope length, percentage deviation, moving average length) to optimize the strategy for specific market conditions.
5. **Risk Management:**
- Implement proper risk management techniques, such as setting stop-loss orders and position sizing, to control risk.
Remember to thoroughly backtest any strategy before deploying it in a live trading environment. Additionally, consider the current market conditions and adapt your strategy accordingly.
F.B_Stochastic Trend HarmonizerThe "F.B_Stochastic Trend Harmonizer" has been developed to provide insights into market trends. It combines stochastic oscillations with moving averages. Stochastic oscillators are used to measure market fluctuations, while moving averages serve to smooth these fluctuations and identify trends. By linking these elements, the indicator aims to offer an enhanced representation of market dynamics and potential trend reversals.
You can choose various types of moving averages such as SMA, EMA, or WMA and control the sensitivity of the lines by adjusting the smoothing factors. The fast line displays harmonized stochastic values, while the slow line is smoothed by a moving average.
The "Fast Line 2" marks individual candles for better visibility. It is recommended to combine this indicator with other analysis tools to make trading decisions.
If the "Fast Line" is greater than the "Slow Line MA," it indicates an uptrend. Conversely, if the "Fast Line" is smaller than the "Slow Line MA," it signals a downtrend.
ORB Algo | Flux Charts💎 GENERAL OVERVIEW
Introducing our new ORB Algo indicator! ORB stands for "Opening Range Breakout" which is a common trading strategy. The indicator can analyze the market trend in the current session and give "Buy / Sell", "Take Profit" and "Stop Loss" signals. For more information about the analyzing process of the indicator, you can read "How Does It Work ?" section of the description.
Features of the new ORB Algo indicator :
Buy & Sell Signals
Up To 3 Take Profit Signals
Stop-Loss Signals
Alerts for Buy / Sell, Take-Profit and Stop-Loss
Customizable Algoritm
Session Dashboard
Backtesting Dashboard
📌 HOW DOES IT WORK ?
This indicator works best in 1-minute timeframe. The idea is that the trend of the current session can be forecasted by analyzing the market for a while after the session starts. However, each market has it's own dynamics and the algorithm will need fine-tuning to get the best performance possible. So, we've implemented a "Backtesting Dashboard" that shows the past performance of the algorithm in the current ticker with your current settings. Always keep in mind that past performance does not guarantee future results.
Here are the steps of the algorithm explained briefly :
1. The algorithm follows and analyzes the first 30 minutes (can be adjusted) of the session.
2. Then, algorithm checks for breakouts of the opening range's high or low.
3. If a breakout happens in a bullish or a bearish direction, the algorithm will now check for retests of the breakout. Depending on the sensitivity setting, there must be 0 / 1 / 2 / 3 failed retests for the breakout to be considered as reliable.
4. If the breakout is reliable, the algorithm will give an entry signal.
5. After the position entry, algorithm will now wait for Take-Profit or Stop-Loss zones and signal if any of them occur.
If you wonder how does the indicator find Take-Profit & Stop-Loss zones, you can check the "Settings" section of the description.
🚩UNIQUENESS
While there are indicators that show the opening range of the session, they come short with features like indicating breakouts, entries, and Take-Profit & Stop-Loss zones. We are also aware of that different stock markets have different dynamics, and tuning the algorithm for different markets is really important for better results, so we decided to make the algorithm fully customizable. Besides all that, our indicator contains a detailed backtesting dashboard, so you can see past performance of the algorithm in the current ticker. While past performance does not yield any guarantee for future results, we believe that a backtesting dashboard is necessary for tuning the algorithm. Another strength of this indicator is that there are multiple options for detection of Take-Profit and Stop-Loss zones, which the trader can select one of their liking.
⚙️SETTINGS
Keep in mind that best chart timeframe for this indicator to work is the 1-minute timeframe.
TP = Take-Profit
SL = Stop-Loss
EMA = Exponential Moving Average
OR = Opening Range
ATR = Average True Range
1. Algorithm
ORB Timeframe -> This setting determines the timeframe that the algorithm will analyze the market after a new session begins before giving any signals. It's important to experiment with this setting and find the best option that suits the current ticker for the best performance. More volatile stocks will often require this setting to be larger, while more stabilized stocks may have this setting shorter.
Sensitivity -> This setting determines how much failed retests are needed to take a position entry. Higher senstivity means that less retests are needed to consider the breakout as reliable. If you think that the current ticker makes strong movements in a bullish & bearish direction after a breakout, you should set this setting higher. If you think the opposite, meaning that the ticker does not decide the trend right after a breakout, this setting show be lower.
(High = 0 Retests, Medium = 1 Retest, Low = 2 Retests, Lowest = 3 Retests)
Breakout Condition -> The condition for the algorithm to detect breakouts.
Close = Bar needs to close higher than the OR High Line in a bullish breakout, or lower than the OR Low Line in a bearish breakout. EMA = The EMA of the bar must be higher / lower than OR Lines instead of the close price.
TP Method -> The method for the algorithm to use when determining TP zones.
Dynamic = This TP method essentially tries to find the bar that price starts declining the current trend and going to the other direction, and puts a TP zone there. To achieve this, it uses an EMA line, and when the close price of a bar crosses the EMA line, It's a TP spot.
ATR = In this TP method, instead of a dynamic approach the TP zones are pre-determined using the ATR of the entry bar. This option is generally for traders who just want to know their TP spots beforehand while trading. Selecting this option will also show TP zones at the ORB Dashboard.
"Dynamic" option generally performs better, while the "ATR" method is safer to use.
EMA Length -> This setting determines the length of the EMA line used in "Dynamic TP method" and "EMA Breakout Condition". This is completely up to the trader's choice, though the default option should generally perform well. You might want to experiment with this setting and find the optimal length for the current ticker.
Stop-Loss -> Algorithm will place the Stop-Loss zone using setting.
Safer = The SL zone will be placed closer to the OR High for a bullish entry, and closer to the OR Low for a bearish entry.
Balanced = The SL zone will be placed in the center of OR High & OR Low
Risky = The SL zone will be placed closer to the OR Low for a bullish entry, and closer to the OR High for a bearish entry.
Adaptive SL -> This option only takes effect if the first TP zone is hit.
Enabled = After the 1st TP zone is hit, the SL zone will be moved to the entry price, essentially making the position risk-free.
Disabled = The SL zone will never change.
2. ORB Dashboard
ORB Dashboard shows the information about the current session.
3. ORB Backtesting
ORB Backtesting Dashboard allows you to see past performance of the algorithm in the current ticker with current settings.
Total amount of days that can be backtested depends on your TV subscription.
Backtesting Exit Ratios -> You can select how much of percent your entry will be closed at any TP zone while backtesting. For example, %90, %5, %5 means that %90 of the position will be closed at the first TP zone, %5 of it will be closed at the 2nd TP zone, and %5 of it will be closed at the last TP zone.
{Gunzo} Trend Sniper (Multiple MAs with coefficient)Updated GUNZO's Trend Sniper script by adding in different MA types to choose from. This can help reduce false signals and sharpen the trend reversal points.
Here's a summary of the key changes:
1. Multiple Moving Average Types: The original script was focused solely on the Weighted Moving Average (WMA) with a coefficient. The updated script introduces flexibility by allowing users to choose from a variety of Moving Average types, including WMA, VWMA (Volume Weighted Moving Average), EMA (Exponential Moving Average), SMA (Simple Moving Average), HullMA (Hull Moving Average), TEMA (Triple Exponential Moving Average), DEMA (Double Exponential Moving Average), T3, and RMA (Running Moving Average).
2. Coefficient Integration: In the original script, the coefficient was specifically designed for the WMA calculation. The updated script extends this concept to all the selected Moving Average types. This coefficient is applied differently depending on the type of MA, often affecting the length of the MA calculation.
3. Dynamic Length Calculation: For MAs that traditionally use an integer length (like SMA, EMA, etc.), the updated script calculates this length dynamically by multiplying the user-defined length by the coefficient and then rounding it to the nearest integer. This ensures compatibility with Pine Script's requirements for these functions.
All credits to GUNZO
original script:
RSI and MA Trending [Sebbs]A simple indicator based on RSI strength and a custom SMA trendline.
RSI
RSI Strength is determined by a baseline.
The baseline is the 200 bar RSI
The current RSI value is compared to the Baseline and determines the current trend.
This Use of the RSI is unique because the strength indication point is not a static number (eg: 50) and the long term strength will trend up in a Bullish market.
This causes the reversal point of the strength to become much closer to the top of the waves end point.
SMA
The default SMA is a 20 bar length but is adjustable to suit any timeframe or chart.
The SMA determines the trend direction.
SIGNALS
When both are showing strength it will give a buy signal.
When both are showing weakness it will show a sell signal.
STRATEGY
I personally use 15 Minute chart and 20 bar SMA.
This method can have a close stop as it uses strength as an entry condition.
If the strength drops exit the trade.
For example, a 15 minute entry I would set a single candle stop as if that candle is taken back, the trade is no good.
The best entries are when a trendline breaks and strength changes direction.
FILTERS
Additional filters are provided such as other SMAs and Heikin Ashi bars for entry requirements.
DIVERGENCES
The Overlay also shows Divergence lines which use my own unique calculations.
The pivot low/high function provided by Pine Script requires a set number of bars to pass prior to locating a swing low/high.
This can mean large moves have occurred prior to a swing low having passed if the lookback range was set to five bars (5).
5 bars on a 2 hour chart is a long time and large moves may be missed.
As I don't use these functions, there is no requirement for a set number of bars to have passed prior to swing low/high positions to be identified.
This means it doesn't rely on a set number of bars to pass prior to finding a new pivot point.
* Code loops are a function which will check conditions in a range until a defined condition is met.
In this case a pivot low is a bar with no lower bars within 3 bars either side of the current checked bar.
Additional:
Lines will redraw and delete previous divergences to remove clutter on the indicator.
A table cells for alternate timeframe Stochastic RSI values so you don't need to swap between charts constantly.
RSI TABLE
A table is available for monitoring the RSI values of the current chart and a Higher Timeframe.
This helps keep track of which direction your should be looking for trades in.
This can be hidden in the indicator options.
Note
This indicator can not be open source due to a usage of a Private Library.
Instant RSI (IRSI)
Instant RSI is tailored for users seeking an effective RSI indicator for charts with limited historical data, such as new symbols or very high time frame charts. Its distinctiveness lies in employing a Chebyshev filter, an innovative approach that allows the RSI to initiate calculations with just two data points. The Chebyshev filter, traditionally used in signal processing, helps in smoothing data while minimizing lag, a critical aspect in fast-moving financial markets.
Key Features:
Chebyshev Filter Integration: The Chebyshev filter is fine-tuned to mimic a 14-period RMA's behavior, enhancing the RSI's responsiveness and accuracy with minimal data.
Customizable RSI and MA Settings: Users can modify the RSI's source, length, ripple effect, and style. An optional moving average overlay, also based on Chebyshev filtering, tuned to mimic an EMA set to 14.
Divergence Detection: I have also included the ability to adjust the divergence settings to allow for more flexibility over the built in RSI.
The script operates by applying the Chebyshev filter to the price movement's up and down components, forming the basis of the RSI calculation. When the moving average feature is activated, it further processes the RSI value through the Chebyshev filter for additional smoothing. This dual application of the Chebyshev filter is central to the script's design, offering a unique solution for situations where traditional RSI calculations might be less reliable due to data scarcity.
The divergence detection feature enhances the script's utility by signaling potential trend reversals, critical for strategic decision-making in trading. These features are visually represented on the chart, ensuring that users can easily interpret and react to the indicators.
In general this indicator should produce the exact same output as the built in RSI. This indicator is specifically designed to be used in conditions where the built in RSI will not work due to limited data.
In summary, the "Instant RSI" script is a practical option for those dealing with limited data scenarios, offering a unique blend of Chebyshev filter application for more responsive market analysis.
Custom Time Frame (CTF)This indicator allows users to create their own arbitrary time frames for chart analysis. It features a moving average, providing an additional layer of analysis, and offers flexibility through various open settings.
In terms of user settings and usage, the indicator provides several options. Users can choose their interval style, opting for either tick-based or time-based intervals. This flexibility allows for a more granular approach to data analysis, catering to different trading strategies and preferences. The number of ticks or the amount of time for each candle can be adjusted, enabling traders to set the granularity of the data to their liking. Color settings are also customizable, with options for setting colors for bullish and bearish indicators, adding a visual dimension to the analysis.
The average line parameters are an important aspect of this indicator. Users can adjust the length, ripple, type, color, and line width of the average line. The ripple setting, in particular, impacts the smoothness of the filter. With type II setting, the smoothing is increased, making it suitable for traders who prefer a more smoothed out moving average. Conversely, the type I setting decreases the smoothing, which might be preferred by those who want a more responsive indicator.
The use of the Chebyshev filter is a significant feature of this indicator. This filter is chosen for its high-performance smoothing capabilities with minimal data requirements. This ensures that the moving average appears quickly and accurately, which is crucial in real-time chart analysis. An important point to note is that when the moving average is enabled, it decreases the maximum number of candles that can be displayed on the chart. However, this is offset by the enhanced analytical precision provided by the moving average.
In summary, this indicator is especially beneficial for traders without access to premium accounts. It offers the capability to create low or custom time frame charts. The flexibility in settings, coupled with the inclusion of a Chebyshev filter for the moving average, makes it a versatile and valuable tool for detailed market analysis. It caters to a wide range of trading styles and strategies, making it a useful addition to any trader's toolkit.
CMI - Complex Momentum IndexDescription:
The Complex Momentum Index (CMI) is a comprehensive technical analysis tool designed to provide a multifaceted view of an asset's momentum and trend strength. It combines several key indicators: Relative Strength Index (RSI), Chaikin Money Flow (CMF), and Simple Moving Averages (SMAs) differences, along with the asset's price percentage difference from its SMA. Each component is weighted and normalized, contributing to the overall CMI value, which is then smoothed with a moving average (either SMA or EMA) to provide clear signals.
Guide on How to Use:
Indicator Settings:
RSI Length: Adjust the period over which RSI is calculated.
Source: Choose the price type (e.g., close, open) used for RSI calculation.
CMF Length: Set the period for the CMF calculation.
SMA Lengths: Define two periods for calculating the moving averages and their percentage difference.
Timeframes for SMAs: Select the timeframes for calculating SMA differences and price percentage differences.
Weights: Assign importance to each component (RSI, CMF, SMA differences, and Price:SMA difference) through weights.
CMI MA Settings: Choose the type (SMA or EMA) and length of the moving average applied to the CMI.
CMI Target Matching Settings: Define a target value for CMI and a threshold for highlighting when CMI is near this target.
Understanding the Plots:
CMI: The main line, representing the composite index of momentum indicators.
CMI MA: The moving average of CMI, providing a smoothed trend line.
CMI % Difference from MA: Highlights the divergence between CMI and its moving average, which can signal momentum shifts.
CMF (scaled): A scaled version of the Chaikin Money Flow, indicating buying or selling pressure.
RSI: The Relative Strength Index, showing whether the asset is overbought or oversold.
SMA Difference %: The percentage difference between two SMAs, indicating the trend strength.
Price % Diff from SMA: The asset's price percentage difference from its SMA, showing its position relative to a typical value.
Using CMI for Trading Decisions:
Trend Identification: A rising CMI and CMI MA indicates strengthening upward momentum, while falling lines suggest increasing downward momentum.
Divergence: Look for divergences between the CMI and price. If the price is making new highs/lows but the CMI isn't, it might signal a potential reversal.
CMI Target Match: The background highlights when the CMI matches a specified target within a threshold, which can be used to identify potential entry or exit points.
CMI % Difference from MA: Large deviations from the moving average might indicate overextended prices, suggesting a potential pullback or bounce.
Tips:
Customize the weights and lengths based on the asset and your trading style. Different settings might work better for different market conditions.
Always confirm signals with additional analysis. No indicator works perfectly in all situations.
Consider the overall market context and news that might affect the asset's price.
Practice risk management and use stop-loss orders to protect your investments.
Decrease the weight of the RSI & MA's to put more emphasis on money flow while keeping that data in the plot.
Uncheck everything but CMI in the style page for visual clarity (can't do this in code)
Zero-lag Volatility-Breakout EMA Trend StrategyThis is a simple volatility-breakout strategy which uses the difference in two different zero-lag* EMAs (explained below on what exactly I mean by this) to track the upwards or downwards strength of an instrument. When the difference breaks above a Bollinger Band of a configurable standard deviation multiple, the strategy enters based off the direction of the base EMA used (i.e. if the difference breaks above and the current EMA is rising, a long entry is produced. If the difference breaks above and the current EMA is falling, a short entry is produced).
The two EMA-type metrics used to calculate the volatility difference are calculated by the following formula:
top_ema = math.max(src, ta.ema(src, length))
bottom_ema = math.min(src, ta.ema(src, length))
ema_difference = (top_ema - bottom_ema) - 1
This produces a difference which responds immediately to large price movements, instead of lagging if it used strictly the EMA itself.
SETTINGS
Source : The source of the strategy - close, hlc3, another indicator plot, etc.
EMA Difference Length : The length of both the EMA difference statistics and the base EMA used to calculate the entry side.
Standard Deviation Multiple : The Bollinger Bands multiple used when the difference is breaking out.
Use Binary Strategy : The strategy has two configurations: Binary and Rapid-Exit. 'Binary' means that it will not close a long position until a short position is generated, and vice-versa. 'Rapid-Exit' will close a long or short position once the difference reaches the middle Bollinger Band MA. This means that turning on 'Binary' will expose you to more market risk, but potentially greater market return. Turning off 'Binary' will exit quickly and reduce drawdown.
The strategy results below use 10% equity and 0.1% fees per trade.
ka66: Enhanced MACDThis is a more configurable MACD:
Allows various moving averages (EMA, SMA, Hull, WMA) instead of just EMA.
Better color coding for MACD line, rising vs. falling
Optional Normalised Scale; my pet peeve with standard MACD, that we can't really easily compare it across instruments. Taking a page from the ATR Percent indicator, we allow for normalising the MACD and Signal lines relative to Close: MACD / Close x 100. Ditto for the Signal line. This is really useful for reversal type scenarios, and to avoid ranging markets.
Threshold horizontal line markers to further support the use of the Normalised Scale. Simply configure this via the Style Settings.
CARNAC Magic DCAThe "CARNAC Magic DCA" indicator is designed for investors looking for the best opportunities for Dollar-Cost Averaging (DCA).
How it works:
The Carnac Dynamic DCA Threshold calculates a dynamic threshold for DCA entries using Exponential Moving Average (EMA), Average True Range (ATR), and the maximum distance from the EMA over a full lookback period, aiding in identifying optimal buy opportunities. It also only signals a DCA buying opportunity after a bearish candle, which helps lower the average DCA price.
Configurable Inputs:
EMA Start Length: Sets the initial length for the series of EMAs, affecting their sensitivity to price changes.
ATR Length: Determines the period for the ATR calculation, influencing the dynamic DCA threshold's responsiveness to market volatility.
ATR Multiplier: Modifies the impact of the ATR on the DCA threshold, allowing for finer control over the threshold's sensitivity to volatility.
Start Calculation From: Enables setting a specific start date for calculations, tailoring the analysis to a particular trading period.
DCA Buy Signal Alert: Generates an alert when the price is below both the dynamic DCA threshold and the opening price, indicating a potential buy signal based on DCA strategy.
Ten EMAs: Carnac Magic DCA includes a ten EMA plot, which decrease in length from the user-defined starting length, offering a multi-layered trend analysis.
EMA Color Coding: The sequential arrangement of EMAs is visually represented through color coding, facilitating quick trend recognition.
Average Buy Price Analysis: Calculates and displays the average buy price and its percentage difference from the average closing price since the user-defined start date, helping assess the strategy’s effectiveness compared to traditional DCA methods (purchasing at the close of every candle).
Visual Indicators and Labels: Includes visual alerts for buy signals and informative labels showing average buy prices and related statistics.
PlayBit EMAPlayBit EMA Indicator
Introducing the PlayBit EMA, a highly esteemed technical analysis tool within the PlayBit Community and a personal favorite of Bitcoin Playboy. This indicator has cemented its place as a staple among traders for its simplicity and effectiveness.
Key Features:
PB EMA: Utilizes two Exponential Moving Averages (EMAs) to identify support and resistance zones and help identify potential reversal points.
Dynamic Fill Color:
The fill color will change based on if the closing price is above, below, or in between.
This indicator is not only a reflection of market dynamics but also an essential tool for traders looking to make informed decisions based on the relationship between price action and moving averages. Whether you're a seasoned trader or just starting out, the PlayBit EMA is an invaluable addition to your trading arsenal.
CARNAC Elasticity IndicatorThe CARNAC Elasticity Indicator (EI) is a technical analysis tool designed for traders and investors using TradingView. It calculates the percentage deviation of the current price from an Exponential Moving Average (EMA) and helps traders identify potential overbought and oversold conditions in a financial instrument.
Key Features:
EMA Length: Users can customize the length of the Exponential Moving Average (EMA) used in the calculations by adjusting the "EMA Length" parameter in the indicator settings.
Percentage Deviation: The indicator calculates the percentage deviation of the current price from the EMA. Positive values indicate prices above the EMA, while negative values indicate prices below the EMA.
Maximum Deviations: The indicator tracks the maximum positive (above EMA) and negative (below EMA) percentage deviations over time, allowing traders to monitor extreme price movements.
Bands: Upper and lower bands are displayed on the indicator chart at 100 and -100, respectively. Additionally, dashed middle bands at 50 and -50 provide reference points for moderate deviations.
Dynamic Color Coding: The indicator uses dynamic color coding to highlight the current percentage deviation. It turns red for values above 50 (indicating potential overbought conditions), green for values below -50 (indicating potential oversold conditions), and purple for values in between.
How to Use:
Overbought Conditions: Watch for the percentage deviation to cross above 50, indicating potential overbought conditions. This might be a signal to consider selling or taking profits.
Oversold Conditions: Look for the percentage deviation to cross below -50, signaling potential oversold conditions. This could be an opportunity to consider buying or entering a long position.
Historical Extremes: Keep an eye on the upper and lower bands (100 and -100) to identify historical extremes in percentage deviation.
The CARNAC Elasticity Indicator can be a valuable tool for traders seeking to identify potential trend reversals and assess the strength of price movements. However, it should be used in conjunction with other technical analysis tools and risk management strategies for comprehensive trading decisions.
Sigmoidal Candle Count Risk (SCCR)Sigmoidal Candle Count Risk (SCCR)
This indicator is designed to identify potential reversal levels based on the number of consecutive candles moving in the same direction. Its core premise is based on the sequence of consecutive candles moving in uniform. The assumption is that an increasing sequence of consecutive candles heightens the likelihood of a reversal.
Functionality:
It uses the sigmoid function to translate the difference between bullish (upward) and bearish (downward) candle counts into a risk value ranging from 0 (low risk, bullish sentiment) to 1 (high risk, bearish sentiment)
1/(1+math.exp(-((usum+dsum)/2)))
Additionally, it uses a symmetrically weighted moving average for smoothing.
ta.swma()
Market Average TrendThis indicator aims to be complimentary to SPDR Tracker , but I've adjusted the name as I've been able to utilize the "INDEX" data provider to support essentially every US market.
This is a breadth market internal indicator that allows quick review of strength given the 5, 20, 50, 100, 150 and 200 simple moving averages. Each can be toggled to build whatever combinations are desired, I recommend reviewing classic combinations such as 5 & 20 as well as 50 & 200.
It's entirely possible that I've missed some markets that "INDEX" provides data for, if you find any feel free to drop a comment and I'll add support for them in an update.
Markets currently supported:
S&P 100
S&P 500
S&P ENERGIES
S&P INFO TECH
S&P MATERIALS
S&P UTILITIES
S&P FINANCIALS
S&P REAL ESTATE
S&P CON STAPLES
S&P HEALTH CARE
S&P INDUSTRIALS
S&P TELECOM SRVS
S&P CONSUMER DISC
S&P GROWTH
NAS 100
NAS COMP
DOW INDUSTRIAL
DOW COMP
DOW UTILITIES
DOW TRANSPORTATION
RUSSELL 1000
RUSSELL 2000
RUSSELL 3000
You can utilize this to watch stocks for dip buys or potential trend continuation entries, short entries, swing exits or numerous other portfolio management strategies.
If using it with stocks, it's advisable to ensure the stock often follows the index, otherwise obviously it's great to use with major indexes and determine holdings sentiment.
Important!
The "INDEX" data provider only supplies updates to all of the various data feeds at the end of day, I've noticed quite some delays even after market close and not taken time to review their actual update schedule (if even published). Therefore, it's strongly recommended to mostly ignore the last value in the series until it's the day after.
Only works on daily timeframes and above, please don't comment that it's not working if on other timeframes lower than daily :)
Feedback and suggestions are always welcome, enjoy!