AstroTrading_Hisse_Şişmi_Mi?_[BugraComez]1. Calculation of Key Components
EMA Calculation:
The indicator calculates a 5-period EMA of the close prices. This moving average (stored in EMAVAL) smooths out the price action, giving a short-term trend baseline.
ATR Calculation:
It also computes a 5-period ATR (stored in ATRVAL), which measures the average range (volatility) of the price over the same period. The ATR provides insight into how much the price typically moves in a given period.
2. Creating Dynamic Bands
Upper Band (PlotUp):
This is calculated as the EMA plus two times the ATR. The formula is:
PlotUp = EMA + 2 × ATR
This line acts as an upper boundary that adjusts with both the trend (EMA) and the market’s volatility (ATR).
Lower Band (PlotDown):
Similarly, the lower band is defined as the EMA minus two times the ATR:
PlotDown = EMA − 2 × ATR
This creates a lower boundary that also moves with the price and its volatility.
3. Visual Output
Plotting the Bands:
The upper band is plotted as a green line.
The lower band is plotted as a yellow line.
Both lines are drawn with a line width of 2, providing clear visual guidance on the chart.
4. Trading Implications
Dynamic Range Indication:
The bands created by adding and subtracting 2×ATR from the EMA represent areas where the price might be considered overextended or “overheated” relative to its recent trend and volatility.
Possible Interpretations:
If the price is consistently above the upper band, it may suggest that the stock is in an overbought condition.
Conversely, if the price remains below the lower band, it might indicate an oversold condition.
Usage:
Traders can use these bands as reference levels for potential reversals or for setting stop-loss and take-profit orders.
Summary
The "AstroTrading_Hisse_Şişmi_Mi?_ " indicator is a volatility-based tool that combines a 5-period EMA with a 5-period ATR to produce dynamic upper and lower bands. By plotting these bands on the chart, it helps traders visualize when a stock's price might be excessively high or low relative to its recent trend and volatility. This can be a useful component in a broader trading strategy for identifying overextended conditions.
This explanation provides a clear understanding of the indicator’s components, how they’re calculated, and how the resulting bands can be interpreted for trading decisions.
Candlestick analysis
AstroTrading_HighwayRat[BugraComez]1. Input & Setup
Length Parameter:
The script uses an input called “Length” (default 14) that governs the period for all moving averages and channel calculations.
Study Declaration:
The study is set with overlay=true so that all plots and labels are drawn directly on the price chart.
2. Calculating the “Real Power” Indicator
Real Power Calculation:
The script calculates a value called realPower by dividing the running moving average (RMA) of the current close by the RMA of the previous close over the specified length.
This ratio gives a sense of the momentum or “power” behind the price move from one bar to the next.
Long and Short Power:
longPower is computed as the simple moving average (SMA) of the realPower over the full length period.
shortPower is calculated as the SMA of the realPower over half of that length.
These two smoothed values are used to compare short-term versus longer-term momentum.
3. Donchian Channel Middle
Donchian Calculation:
The indicator computes the middle line of the Donchian channel over the same period by averaging the highest high and the lowest low over the defined length.
This middle band acts as a dynamic reference level.
4. Signal Generation
Buy Signal (Bullish):
A buy condition is triggered when the short-term momentum (shortPower) exceeds the long-term momentum (longPower) and the current close is above the Donchian middle.
This combination suggests that buyers have taken control and the price is trading above a key channel midpoint.
Sell Signal (Bearish):
Conversely, a sell condition occurs when shortPower is lower than longPower and the current close is below the Donchian middle.
This indicates that sellers are dominant and the price is trading beneath the channel’s midpoint.
Preventing Repeated Signals:
The script tracks the previous bar’s signal state (using buyConditionPrev and sellConditionPrev) so that a new label is only drawn when the condition transitions from false to true.
5. Visual Output
Signal Labels:
When a buy signal occurs (and wasn’t present in the prior bar), a green label reading “AL” (meaning “Buy”) is drawn at the current bar’s low.
For a sell signal, a red label reading “SAT” (meaning “Sell”) is drawn at the current bar’s high.
Donchian Middle Line:
The indicator also plots the Donchian middle line in orange, providing a visual reference for the dynamic channel.
Summary
The “AstroTrading_HighwayRat” indicator combines a custom momentum measure—derived from the ratio of moving averages of the close—with the Donchian channel’s midline to generate trading signals. A bullish signal (buy) is given when short-term momentum is strong and price is above the channel’s midpoint, while a bearish signal (sell) is generated when momentum is weak and the price falls below that midpoint. This dual-condition approach helps traders identify potential trend reversals or continuations based on momentum divergence relative to a dynamic support/resistance level.
This detailed explanation is intended to help traders understand how the indicator processes price data, calculates key levels, and generates actionable signals on the chart.
AstroTrading_TriBetaCandle Definitions
First Candle (Bar 2):
firstLow and firstHigh capture the low and high of the candle two bars ago.
Second Candle (Bar 1):
secondClose, secondHigh, and secondLow refer to the close, high, and low of the candle one bar ago.
Third Candle (Current Bar):
thirdLow and thirdHigh represent the low and high of the current candle.
Setup Conditions
The indicator evaluates two distinct scenarios—one for a potential short setup and another for a long setup:
Short Setup (Bearish Reversal):
Condition 1:
The second candle’s close is greater than the high of the candle before it (i.e. the first candle’s high).
This suggests that the second candle broke above the prior candle’s range.
Condition 2:
The current (third) candle’s low is below the first candle’s low.
This indicates that after the upward move of the second candle, the price reverses sharply downward.
Trigger:
When both conditions are met, a short signal is generated. A red label with a downward arrow (“⬇️⬇️SHORT Kovala⬇️⬇️”) is plotted above the current bar at its low level.
Long Setup (Bullish Reversal):
Condition 1:
The second candle’s close is lower than the low of the candle before it (i.e. the first candle’s low).
This means the second candle closed lower than the previous candle’s low.
Condition 2:
The current (third) candle’s high exceeds the first candle’s high.
This suggests that following the downward move, the price reverses upward significantly.
Trigger:
When these conditions are satisfied, a long signal is generated. A green label with an upward arrow (“⬆️⬆️LONG Kovala⬆️⬆️”) is plotted below the current bar at its high level.
Visual Marking
plotshape Function:
The script uses plotshape() to display the signal labels on the chart:
For a short trigger, the label is shown above the bar (at the candle’s low) in red.
For a long trigger, the label is shown below the bar (at the candle’s high) in green.
Summary
The indicator is intended to capture a reversal pattern in which:
For a short setup, an aggressive upward move (second candle closing above the previous high) is quickly reversed by a drop below the earlier low.
For a long setup, a downward move (second candle closing below the previous low) is followed by a rebound above the previous high.
Traders can use these signals as potential triggers to enter short or long positions, based on the idea that a failed continuation of the prevailing move may lead to a reversal.
This explanation provides a clear, step-by-step breakdown of the “AstroTrading_TriBeta” indicator's logic and visual output, adhering to TradingView's standards for clarity and detail.
AstroTrading_TrendKanalı1. Input and Initialization
Bar Lookback Settings:
The script defines how many bars to use for calculating pivot points on either side of a potential pivot (using left_bars and right_bars).
The lookback input specifies how many bars in the past the script will search for the pattern.
Pivot Arrays:
Four arrays are initialized to store pivot low and pivot high values along with their corresponding bar indices. These arrays are populated as the script processes each bar.
2. Pivot Point Calculation
Detecting Pivots:
Using ta.pivotlow(left_bars, right_bars) and ta.pivothigh(left_bars, right_bars), the script identifies local lows and highs.
When a pivot is found (i.e. not na), it pushes the adjusted bar index and the pivot value into the respective arrays.
3. Filtering Pivot Points
Restricting to a Lookback Window:
Once the last bar is reached (barstate.islast), the script defines a start and end bar based on the user’s lookback value.
It then filters the collected pivot lows and highs so that only those within the specified historical window are kept for further analysis.
4. Pattern Recognition and Fibonacci Calculation
The script attempts to find one of two patterns in the filtered data:
A. Bullish Formation (Dip–Peak–Dip Pattern):
Sequence Identification:
Dip1: A pivot low is chosen as the first point.
Peak: The script then looks for a pivot high that occurs after Dip1.
Dip2: Next, it seeks a later pivot low (after the peak).
Fibonacci Levels:
Once Dip1, Peak, and Dip2 are identified, the difference between the Peak and Dip1 is computed.
An array of Fibonacci multipliers is created (with values 0.0, 0.382, 0.707, 0.786, and 1.618). These correspond to different potential levels such as STOP, Entry, and various Target levels.
For each multiplier, the price level is calculated using:
priceLevel = dip2 + diff × multiplier
For each calculated level, a horizontal line is drawn (extending from slightly after the dip2 bar to the end of the lookback window) and a label is added indicating the level name and its numeric value.
B. Bearish Formation (Peak–Dip–Peak Pattern):
Sequence Identification:
Peak1: A pivot high is chosen as the first point.
Dip: A subsequent pivot low is identified after Peak1.
Peak2: Finally, a later pivot high (after the dip) is found.
Fibonacci Levels:
The difference between Peak1 and the Dip is calculated.
The same set of Fibonacci multipliers is used, but the price level is now determined by:
priceLevel = peak2 – diff × multiplier
As before, the script draws lines for these levels and places labels indicating their role (STOP, Entry, Target 1, Target 2, or Target 3).
Fallback:
If no valid bullish or bearish pattern is found within the defined lookback range, the script displays a label on the chart informing the user that no valid formation was detected.
5. Visual Output
Plotting Levels:
The indicator draws horizontal lines at the calculated Fibonacci extension levels.
Each line is extended to the right so that traders can see these levels clearly across future bars.
Labels accompanying the lines show both the level’s name (e.g., “Giriş”, “1. Hedef”) and its price value formatted to three decimal places.
Summary
The “AstroTrading_SpecialLevels” indicator automates the process of finding special price levels based on pivot point formations and Fibonacci extensions. By scanning a historical lookback period for either a bullish (dip–peak–dip) or bearish (peak–dip–peak) pattern, it calculates key levels that may act as support, resistance, or potential reversal areas. The results are then visually represented on the chart using horizontal lines and labels. This tool can be used as a standalone reference or in conjunction with other technical analysis methods to help traders time their entries and exits.
This explanation adheres to TradingView’s publication guidelines by clearly breaking down the indicator’s structure, logic, and visual components in an objective and detailed manner.
AstroTrading_SpecialLevelsOverview
This Pine Script™ (version 5) indicator is designed to detect and mark key price levels using pivot points and Fibonacci extensions. It looks back over a user-defined number of bars to identify significant pivot highs and lows, then searches for specific patterns—either a bullish “dip–peak–dip” or a bearish “peak–dip–peak” formation. Once such a pattern is found, the script calculates Fibonacci-based levels (including STOP, Entry, and multiple target levels) and displays them on the chart with horizontal lines and labels.
Key Components
Input Parameters and Setup:
Bars Settings:
left_bars and right_bars define the number of bars to look left and right when calculating pivots.
lookback determines how many bars back (from the current bar) to search for potential pattern points.
Arrays for Pivot Points:
Two sets of arrays are created to store pivot lows and pivot highs along with their corresponding bar indices.
Pivot Point Calculation:
The script calculates pivot lows using ta.pivotlow(left_bars, right_bars) and pivot highs using ta.pivothigh(left_bars, right_bars).
When a valid pivot is detected (i.e. not na), its bar index (adjusted by right_bars) and value are pushed into the respective arrays.
Filtering by Lookback Period:
The code defines a start (bar_index - lookback) and end bar (bar_index - 1) to limit the search for pattern points.
It filters both pivot low and high arrays so that only points within this historical range are considered.
Pattern Detection – Bullish Formation (Dip–Peak–Dip):
The script searches for a sequence where:
Dip1: A pivot low is found.
Peak: A subsequent pivot high occurs after Dip1.
Dip2: A later pivot low occurs after the Peak.
Once these points are identified, it calculates the difference between the peak and the first dip.
It then creates arrays of Fibonacci multipliers ( ), corresponding level labels ("STOP", "Entry", "1. Target", "2. Target", "3. Target"), and associated colors.
For each multiplier, the price level is computed using the formula:
priceLevel = dip2 + (peak – dip1) × multiplier
Horizontal lines are drawn at these price levels (extending to the right), and labels are placed to show both the level name and its numeric value.
Pattern Detection – Bearish Formation (Peak–Dip–Peak):
If no bullish sequence is found, the script then looks for the opposite pattern:
Peak1: A pivot high.
Dip: A subsequent pivot low after Peak1.
Peak2: A later pivot high after the Dip.
The difference is computed as:
diff = peak1 – dip
Using the same Fibonacci multipliers and labels, the price level is now calculated as:
priceLevel = peak2 – diff × multiplier
Lines and labels are drawn similarly to indicate STOP, Entry, and multiple target levels.
Fallback:
If neither bullish nor bearish patterns are found within the lookback period, the script creates a label on the chart to inform the user that no valid sequence was detected.
Trading Implications
By identifying these patterns and plotting Fibonacci extension levels, the indicator provides traders with potential areas for:
Stops: Price levels where a reversal might occur.
Entry Points: Levels at which to consider initiating a trade.
Targets: One or more levels for taking profits.
Traders can use these levels in conjunction with other technical analysis tools to help time entries and exits more effectively.
This explanation is written to meet TradingView’s guidelines by clearly detailing each part of the script and its purpose without unnecessary commentary.
AstroTrading_DragonStartOverview
The “AstroTrading_DragonStart” indicator is designed to help traders identify specific candlestick patterns that may signal changes in market momentum. It does this by:
Detecting Doji Candles and Drawing Horizontal Lines:
When a doji is identified (i.e. when the candle’s body is very small relative to its overall range), the script draws a horizontal line from the midpoint of the doji’s body, extending a specified number of bars to the right. This may serve as a reference level for potential support/resistance.
Identifying “Bobin” Patterns (Reversal Zigzag):
The indicator looks for a four-candle zigzag pattern (in both bullish and bearish directions) by comparing successive closes. It then measures the relative sizes of the candle bodies over these four bars. If the ratio of the largest to the smallest body is below a user-defined “Bobin Sensibility” threshold, it draws a box (the “bobin box”) around the area defined by the highest close and the lowest open of these candles. This box is intended to highlight a region where price may “wind up” or reverse.
Detailed Components
1. Doji Detection and Horizontal Line Drawing
Doji Identification:
The function drawHorizontalLineFromDoji computes the absolute difference between the open and close of the current candle. A candle is considered a doji if its body size is less than 10% of its entire range (high - low).
Line Drawing:
Once a doji is detected, the script saves its bar index and calculates the midpoint of its body. It then uses line.new to draw a horizontal line starting from this midpoint and extending to the right for a user-defined number of bars (the “Line Length”).
pinescript
Kopyala
drawHorizontalLineFromDoji(LineLong, lineColor, lineWidth) =>
dojiSize = math.abs(open - close)
isDoji = dojiSize < (high - low) * 0.1
var int lastDojiIndex = na
var float lastDojiBodyMid = na
if isDoji
lastDojiIndex := bar_index
lastDojiBodyMid := (open + close) / 2
line.new(x1=lastDojiIndex, y1=lastDojiBodyMid, x2=lastDojiIndex + LineLong, y2=lastDojiBodyMid, width=lineWidth, color=lineColor)
User Customization:
Inputs allow users to adjust the line’s length, color, and width, as well as how many historical bars to display.
2. Drawing a Rectangle Based on a Condition
Price Range Calculation:
The script calculates the lowest low and the highest high over the last 5 candles. It then defines a condition using the relationship between current and past highs and lows. Although the rectangle’s boundaries (left, right, top, and bottom) are computed when the condition is met, this part is intended to highlight an area where price structure shows specific characteristics (possibly a consolidation or reversal zone).
3. Bobin Pattern Detection
Pattern Conditions (bobin4a and bobin4b):
The indicator defines two conditions to detect a four-candle zigzag pattern:
bobin4a: A sequence where the closes alternate with the pattern: down, up, down, up.
bobin4b: The inverse pattern: up, down, up, down.
Body Size Analysis:
For the last four candles (the current candle and the previous three), the script computes the absolute difference between the close and the open. It then calculates:
The maximum body size (buyuk4)
The minimum body size (kucuk4)
A ratio (oran4) defined as the maximum divided by the minimum.
Defining the Bobin Box:
The script also finds:
kapanis4ENB: The highest close among the four candles.
acilis4ENK: The lowest open among the four candles.
If either bobin4a or bobin4b is true and the ratio (oran4) is less than or equal to the user-defined “Bobin Sensibility” threshold, a box is drawn. This box spans from 4 bars before the current bar (i.e. covering the four-candle pattern) to a width defined by “Bobin Box Width”. The box’s top is set at the highest close, and its bottom at the lowest open.
pinescript
Kopyala
if (bobin4a or bobin4b) and oran4 <= i
bobinkutu := box.new(left=bar_index - 4, top=kapanis4ENB, right=bar_index + BW, border_color=color.red, bottom=acilis4ENK, border_width=1, bgcolor=color.new(color.red, 80))
Interpretation:
The drawn bobin box helps traders visually identify a region where price has shown a low variation (as measured by the ratio), potentially indicating a pause in momentum or an impending reversal.
Summary
The “AstroTrading_DragonStart” indicator is a composite tool that combines doji detection and a bobin (zigzag) pattern recognition technique. Its main features include:
Doji-Based Horizontal Lines:
When a doji candle is detected (defined by a very small body relative to its range), a horizontal line is drawn from the candle’s midpoint. This can be used to mark potential pivot levels.
Bobin Pattern and Box:
The indicator searches for specific four-candle reversal patterns (either a down–up–down–up sequence or vice versa) and compares the body sizes of these candles. When the variation (ratio) is below a chosen sensitivity threshold, it draws a red box covering the range between the highest close and lowest open of these candles. This box visually highlights an area where price may experience a significant reaction.
Customization:
Users can adjust inputs such as the line length, colors, box width, and sensitivity parameters to suit different markets or timeframes.
This detailed explanation follows TradingView’s script publication rules by clearly describing each component’s purpose and logic without extraneous language. The indicator is designed for traders who use candlestick patterns as part of their technical analysis, and it provides both visual cues and structured data to support decision-making.
This explanation should help users understand how the “AstroTrading_DragonStart” indicator works and how its various components can be applied to identify potential reversal or consolidation zones in the market.
AstroTrading_GezegenselDestek-Direnç-Dip-Tepe[BugraComez]Overview
The “AstroTrading_GezegenselDestek-Direnç-Dip-Tepe” indicator is designed for astro-trading. It uses the external library (imported from BarefootJoey/AstroLib/1) to calculate the positions of celestial bodies (planets, the Sun, and the Moon) at a given time. Based on user-selected options, it plots a series of horizontal lines—both “normal” and “mirror”—which represent multiples of the planet’s position when scaled and offset. In addition, it creates a table overlay that shows key information (including the planet’s name and its computed aspect with a specified precision) and uses background colors to indicate retrograde motion.
Key Components
1. User Inputs and Table Settings
Table Position & Font Size:
The script starts by allowing the user to choose where the information table should be placed (e.g., Top Right) and what font size to use (Tiny, Small, Normal, Large, or Auto). These inputs ensure the indicator’s display fits the user’s chart layout preferences.
Additional Inputs:
Inputs include a “Base Multiplier” (vertical offset), a scaling factor (to convert degrees into a monetary or numerical equivalent), and a transparency level for the plotted lines.
Furthermore, the user can select two celestial bodies (for example, “☿ Mercury” for both planet1 and planet2, with an option for “None” for the second) that will be used in the calculations.
2. Astronomical Calculations via AstroLib
Geocentric vs. Heliocentric:
The indicator offers a toggle to choose between geocentric (Earth-centered) and heliocentric (Sun-centered) calculations. Additionally, the user provides geographic coordinates (latitude and longitude) and time zone adjustments.
Time and Date Settings:
The script computes the Julian Day Number (JDN) for the current time (and the next day) based on user input. These values, along with a defined time zone offset, are passed into the AstroLib functions.
Planetary Position Calculation:
Depending on the selected options, the script calls functions such as AL.getsun, AL.getmoon, or AL.getplanet (with the appropriate planet index) to retrieve the current degree value of the chosen celestial body.
It then assigns a specific color to each planet (for example, yellow for the Sun, silver for the Moon, gray for Mercury, green for Venus, blue for Earth, red for Mars, etc.), which is used in the plots.
3. Plotting Planetary Lines
Normal and Mirror Lines:
For each selected planet, the script plots multiple horizontal lines. The formula used involves:
Multiplying the planet’s degree value by the user-defined scaler.
Adding multiples of 360° (also scaled) plus an optional base offset.
This results in a series of lines labeled as “Normal 0”, “Mirror 0”, “Normal 1”, “Mirror 1”, and so on. These lines form a grid-like structure on the chart that traders may interpret as potential support or resistance levels.
Plot Style:
The plots use a circle style (plot.style_circles) with a set transparency level (controlled by the input lontransp) and display only a specified number of historical bars to help maintain chart performance.
4. Retrograde Background Coloring
Dynamic Backgrounds:
Two helper functions, retro_bg1(deg) and retro_bg2(deg), determine the background color based on whether the current planetary value is higher than its previous value. This comparison serves as an indicator of retrograde motion.
The script applies these background colors using the bgcolor() function, though they are set to display.none (so they may be used only as a reference or for optional debugging).
5. Information Table
Table Creation and Data Display:
A separate table is created at the user-specified position to display concise information about the selected planets.
Columns: The table has columns for the indicator’s name, and for key values such as the computed angle (with the precision level shown in the tooltip) for each planet.
Tooltips: The tooltip for each planet cell is generated by calling a function from AstroLib (e.g. AL.aspectsignprecisionV2ext), which returns the planetary aspect rounded to the specified precision (with an “orb” value).
Formatting:
The table uses custom font sizes (as defined by the user input) and colors that match the corresponding planetary color scheme, providing an intuitive reference for traders.
Trading Strategy Implications
This indicator is intended for traders who incorporate astro-trading techniques into their analysis. By plotting multiple horizontal lines derived from planetary positions, the indicator suggests potential support, resistance, dip, and peak levels based on celestial influences. These levels can be used as:
Reference Zones:
The multiple “normal” and “mirror” lines help identify price zones where the market might react, potentially acting as dynamic support or resistance.
Market Timing:
With the inclusion of geocentric or heliocentric calculations, traders who follow astro-trading methodologies can compare these levels with traditional technical indicators to confirm trade entries or exits.
Quick Insights:
The information table provides a snapshot of the current planetary positions (and their aspects), which can be a supplementary factor in a trader’s overall analysis.
Compliance with TradingView Guidelines
This explanation is structured to meet TradingView’s script publication rules by:
Clearly describing each component and its purpose.
Providing a logical breakdown of the script’s functionality without promoting any specific broker or trading system.
Using objective language and detailed comments that allow other traders to understand and potentially modify the script for their own purposes.
This detailed explanation should help users understand how the “AstroTrading_GezegenselDestek-Direnç-Dip-Tepe ” indicator works, what each section of the code does, and how it may be used as part of an astro-trading strategy.
AstroTrading_DragonCombine1. Table Setup and User Inputs
Table Position and Font Size:
The script begins by asking the user to select a table position (e.g. Top Right) and a font size (Small, Medium, Large, Huge) via input options.
pinescript
Kopyala
positionInput = input.string("Sağ Üst Köşe", title="Tablo Konumu", options= )
fontSizeInput = input.string("Orta", title="Yazı Punto Büyüklüğü", options= )
Table Creation:
A table is created using table.new with 6 rows and 4 columns. The location of the table is determined by the selected input. This table will later display the name, entry, target, and stop levels for each of the five strategies.
2. Variable Declarations
The script defines several persistent variables to store levels for each indicator. These include:
Entry, target, and stop levels for each of the five sub-indicators (labeled as _1, _2, _3, _4, and _5).
Examples include targetLevel_1, fibLow_1, lastEntry_1, lastTarget_1, etc.
3. Indicator 1 – AstroTrading_AlphaBalance
Logic:
This part examines the previous candle’s high and low to compute its range. It then defines two conditions:
conditionUp_1: When the current close exceeds the previous high by at least 50% of the previous range.
conditionDown_1: When the current close falls below the previous low by 50% of the previous range.
Action:
Depending on whether the move is upward or downward, the script sets:
For an upward move:
fibLow_1 is set to the current low.
The entry level is taken as the current high.
The target is computed by taking the high and subtracting –0.786 times the range (this negative multiplier inverts the move).
The stop is set at the previous low.
For a downward move, similar logic applies with reversed roles.
Purpose:
This module generates a primary signal (AlphaBalance) based on extreme candle movements relative to the prior candle’s range.
4. Indicator 2 – AstroTrading_CandleElongation
Higher Timeframe Data:
The script uses the request.security function to obtain high, low, close, and open values from a user-specified timeframe.
Fibonacci Extension Calculation:
A function fiboExtension calculates two Fibonacci extension levels (approximately 0.786 and 1.618 multipliers) based on three price points.
Signal Conditions:
It checks if the previous candle (two bars ago) meets certain criteria relative to its open, and if the current candle’s close confirms an elongation move.
Output:
If conditions are met, the script sets:
candleEntry_2 to the lower Fibonacci level,
candleTarget_2 to the higher Fibonacci extension,
candleStop_2 to the current low (for a bullish setup) or high (for bearish).
Purpose:
This sub-indicator looks to capture significant candle elongation moves by using Fibonacci extension levels to define entry, target, and stop.
5. Indicator 3 – AstroTrading_FlaGama
Similar to a Flag Formation:
Like the previous “FlaGama” indicator, it checks if the current close is more than 50% beyond the previous candle’s high (conditionUp_3) or below the previous low (conditionDown_3).
Bar Coloring:
If either condition is met, the bar is colored orange to signal an extreme move.
Signal Generation:
Depending on the move’s direction:
Bullish Setup:
Calculates a Fibonacci level at 78.6% from the current low to high.
Sets the entry at this Fibonacci level.
The target is computed by adding the difference between the current high and the Fibonacci level to the current high.
The stop is set at the current low.
Bearish Setup:
Mirrors the Fibonacci calculation to derive a level for short entry.
The target is set below the current low, and the stop is at the current high.
Purpose:
The FlaGama section provides confirmation signals when extreme moves occur, helping traders decide on potential reversals.
6. Indicator 4 – AstroTrading_HermDown
EMA Crossover:
An EMA (111-period) is calculated. A crossover of the EMA above the close triggers a “kesilme” (cutoff) event.
First Candle Identification:
Once a crossover is detected, the next candle’s close is monitored. If that candle’s close remains below the cutoff level, it is considered the “first candle” of the HermDown setup.
Fibonacci Retracement:
It then calculates the highest high over the last 30 bars and derives a target level (fibNeg0618_4) at about 48.6% retracement from that high.
Signal Levels:
The entry is the cutoff close, the target is the calculated Fibonacci level, and the stop is the low of the cutoff candle.
Purpose:
This module aims to capture bearish reversals (HermDown) when the price drops sharply below an EMA, using Fibonacci retracement as a guide.
7. Indicator 5 – AstroTrading_HermUp
EMA Crossunder:
Similarly, an EMA (111-period) is used. A crossunder (EMA crossing below the close) signals a potential bullish reversal.
First Candle Confirmation:
The next candle’s close is checked to confirm the move.
Fibonacci Level:
A Fibonacci extension (approximately 61.8% of the distance from the cutoff close to the high) is computed to serve as the target.
Signal Levels:
The entry is set at the cutoff close, the target is the Fibonacci level, and the stop is set at the low.
Purpose:
This section captures bullish reversal signals (HermUp) when the price moves above an EMA.
8. Displaying Levels in a Table
Aggregating Data:
The script gathers the entry, target, and stop levels from all five sub-indicators.
Table Layout:
The table displays five rows (one for each indicator) with four columns:
Indicator name (e.g., “AlphaBalance”, “CandleElongation”, “FlaGama”, “HermDown”, “HermUp”)
Entry level
Target level
Stop level
Color Coding:
Entry cells have a blue background.
Target cells are colored green if above the current close or red if below.
Stop cells are given a gray background.
Purpose:
This consolidated view allows traders to quickly assess all key levels from different strategies on the chart.
Summary
The “AstroTrading_DragonCombine” indicator is a multi-faceted tool that merges five distinct trading setups into one comprehensive display. Each sub-indicator utilizes a unique method—ranging from extreme candle moves and Fibonacci extensions to EMA crossovers—to determine entry, target, and stop levels. These levels are then neatly summarized in a table overlay on the chart. By combining these approaches, traders can gain a broader perspective on market conditions and potential reversal points, enhancing their decision-making process while adhering to sound risk management principles.
This explanation is written to meet TradingView’s script publication standards, providing a clear, objective, and detailed overview of the indicator’s functionality and logic.
Lit Entry Helper - Entry ConfirmationLit Entry Helper Equals this. take any entry confirmation before Buy or Sell
AstroTrading_FlaGamaOverview
This Pine Script™ indicator (version 5) is designed to detect a specific “flag formation” pattern based on aggressive price movements relative to the previous candle’s range. When the current candle’s closing price deviates significantly—by at least 50% of the previous candle’s range—above its high or below its low, the script marks the bar in orange. It then attempts to identify a confirmation pattern when a subsequent (second) orange candle appears, and based on the relationship between the closes of the two orange candles, it dynamically plots Fibonacci-based levels along with entry, stop, and target signals for potential long or short trades.
Key Components and Logic
Previous Candle Data Calculation:
prevHigh and prevLow:
The script captures the high and low of the previous bar (high and low ).
prevRange:
The range of the previous candle is computed as the difference between prevHigh and prevLow. This range is later used to calculate the threshold for a significant move.
Defining Significant Price Movements (Orange Bars):
conditionUp:
This condition checks if the current candle’s close is greater than the previous candle’s high plus 50% of the previous range. When true, it indicates a strong bullish move (a “green” scenario, but the indicator colors the bar orange to highlight the extreme move).
conditionDown:
Similarly, this condition checks if the current candle’s close is lower than the previous candle’s low minus 50% of the previous range. When true, it signals a strong bearish move.
barcolor:
If either condition is met, the script colors the bar orange. This visual cue allows traders to easily identify candles that have moved beyond the typical range of the prior session.
Tracking “Orange” Candles:
The script uses persistent (var) variables to store data from the first detected orange candle:
prevOrangeClose, prevOrangeLow, prevOrangeHigh: These hold the closing, low, and high values of the first extreme (orange) candle.
secondOrangeExists: A Boolean flag that is set to true once an orange candle is recorded.
Confirmation and Fibonacci Level Calculation:
When a new (second) orange candle is detected (i.e., when the current candle meets the condition and the flag secondOrangeExists is true), the script differentiates between two scenarios:
Bullish Confirmation (Long Setup):
Condition: The current candle’s close is higher than the first orange candle’s close.
Fibonacci Calculation:
The script calculates a Fibonacci retracement level at 78.6% (0.786) of the range between the current high and low. This level is considered as a potential long entry level.
Visual Elements:
A green dotted line is drawn at the Fibonacci level.
A long target line is plotted above the current high by the distance between the current high and the first orange candle’s low.
Labels are added to indicate the “LONG TARGET,” “LONG STOP” (placed at the first orange candle’s low), and “LONG Entry Level” (the Fibonacci level).
Bearish Confirmation (Short Setup):
Condition: The current candle’s close is lower than the first orange candle’s close.
Fibonacci Calculation:
In this case, the Fibonacci level is calculated in a mirrored manner (using –0.786), suggesting a short entry level.
Visual Elements:
A red dotted line is drawn at the calculated Fibonacci level.
A short target line is plotted below the current low by the distance between the first orange candle’s high and the current low.
Labels are added for “SHORT TARGET,” “SHORT STOP” (placed at the first orange candle’s high), and “SHORT Entry Level.”
Resetting the Indicator State:
If a candle does not meet the extreme move criteria (i.e., not orange), the flag secondOrangeExists is reset. This ensures that the indicator only considers consecutive extreme moves for generating trade signals.
Trading Strategy Implications
This indicator is designed to capture extreme moves that may lead to sharp reversals (either a short squeeze in a bullish scenario or a long squeeze in a bearish one). By:
Highlighting Price Extremes:
The orange bar color quickly alerts traders to significant deviations from the previous candle’s range.
Confirming with Consecutive Moves:
The use of a second extreme candle as a confirmation helps filter out false signals.
Employing Fibonacci Levels:
The dynamic Fibonacci level serves as a logical entry point, while the first extreme candle’s high or low acts as a stop-loss reference. A target level is also plotted based on the measured move.
Traders can integrate this setup into a broader risk management and technical analysis framework to time entries and exits more effectively.
Compliance with TradingView Script Publishing Rules
This explanation adheres to TradingView’s guidelines by clearly stating the functionality, describing each component and its purpose, and ensuring that the explanation is objective, detailed, and does not include promotional language. The script itself is annotated with comments (in both English and Turkish) and uses standard Pine Script™ functions (e.g., indicator(), line.new(), label.new(), etc.) to maintain clarity and reproducibility.
This detailed explanation should help traders understand how the “AstroTrading_FlaGama” indicator works, how it generates signals, and how it might be integrated into a comprehensive trading strategy.
Fx Abdus Salam Candle Timer AlertFx Abdus Salam Candle Timer Alert
Overview
The Fx Abdus Salam Candle Timer Alert is a powerful and customizable time-based alert system that notifies traders before a candle closes. Whether you're a scalper, day trader, or swing trader, this tool helps you stay updated on crucial market movements.
Key Features
✅ Custom Hourly Alerts – Set alerts every X hours (e.g., every 1, 2, or 4 hours).
✅ Custom Minute Alerts – Receive alerts every Y minutes (e.g., every 15, 30, or 45 minutes).
✅ Works on Any Timeframe – Compatible with all chart intervals and markets.
✅ Stay Ahead of Market Moves – Get notified before a candle closes to make informed trading decisions.
How It Works
1️⃣ Set your preferred hourly and minute intervals in the input settings.
2️⃣ The indicator tracks the current time and triggers an alert when conditions are met.
3️⃣ Use TradingView’s built-in alert system to receive notifications via popup, email, or mobile app.
Who Can Benefit?
🔹 Scalpers & Day Traders – Get alerts before candles close for quick decision-making.
🔹 Swing Traders – Stay updated on higher timeframe candle closures.
🔹 Forex, Crypto, & Stock Traders – Works across all markets and assets.
How to Set Alerts in TradingView
1️⃣ Click "Add Alert" in TradingView.
2️⃣ Select "Fx Abdus Salam Candle Timer Alert" as the condition.
3️⃣ Customize your notification settings (popup, email, SMS, etc.).
4️⃣ Click "Create" and never miss an important candle close again!
📢 Stay Ahead of the Market! Add Fx Abdus Salam Candle Timer Alert to your TradingView chart and take control of your trading! 🚀
AstroTrading_MarketTracker📈 AstroTrading MarketTracker
Multi-Asset Market Structure & Liquidity Zone Screener
Author: Bugra Comez | Version: 1.0 | Category: Market Structure Analysis
🔍 Indicator Overview
This professional-grade tool tracks market structure breaks (BOS/CHoCH), equilibrium zones (EQH/EQL), and liquidity patterns across 5 customizable assets/timeframes. It combines:
Real-time multi-ticker dashboard
ATR-validated pivot points
Break of Structure (BOS) detection
Change of Character (CHoCH) identification
Equilibrium Zones for mean-reversion trading
⚙️ Core Parameters
1. General Settings
maxBoxesCount (500): Max drawn objects on chart (optimizes performance).
maxDistanceToLastBar (750 bars): Limits historical calculation depth.
ATR Length (14): Sensitivity for pivot validation.
2. Structure Detection
BOS Enable: Toggle Break of Structure signals.
CHoCH Enable: Toggle Change of Character signals.
CHoCH+ Enable: Enhanced CHoCH detection.
EQH/EQL Enable: Equilibrium zone tracking.
3. Ticker Configuration
Presets: Preloaded crypto/forex/stocks/futures templates.
Custom Mode:
5 customizable symbols (e.g., BINANCE:BTCUSDT)
Independent timeframes per asset (e.g., 1D, 4H)
Activation toggles for each row
📊 Algorithm Logic
Step 1: Pivot Identification
Uses ATR-filtered pivots to avoid false swings:
pine
Copy
pivotHighNormal = ta.pivothigh(high, 14, 14)
pivotLowNormal = ta.pivotlow(low, 14, 14)
Validates pivots against 233-period SMA for significance.
Step 2: Market Structure Detection
Break of Structure (BOS):
Bullish: Price closes above last significant pivot high
Bearish: Price closes below last significant pivot low
pine
Copy
BOS = ((crossWay == "Bull" and currentStructure == 1) or (crossWay == "Bear" and currentStructure == -1))
Change of Character (CHoCH):
Detects failed breaks indicating trend exhaustion:
pine
Copy
CHoCH = ((crossWay == "Bull" and currentStructure == -1) or (crossWay == "Bear" and currentStructure == 1))
Enhanced CHoCH+:
Requires sequential pivot validation (e.g., higher low after bearish CHoCH).
Step 3: Equilibrium Zones
EQH (Equal Highs): Clusters of 2+ pivot highs within ATR*0.2 range.
EQL (Equal Lows): Clusters of 2+ pivot lows within ATR*0.2 range.
Plotted as dashed lines with labels:
pine
Copy
EQPline := createLine(lastHigh.x, pivotLabel.x, lastHigh.y, pivotLabel.y, color.green, line.style_dashed)
🛠️ Dashboard Features
Multi-Ticker Screener
Symbol: Asset name (e.g., BTC/USDT)
Timeframe: Chart interval analyzed
BOS/CHoCH Status:
Time since last occurrence (e.g., "3 Hours Ago")
Color-coded urgency (green=recent, red=stale)
Structure Strength:
Dashboard Example
🧠 Trading Interpretation
Signal Bullish Scenario Bearish Scenario
BOS Trend continuation Trend continuation
CHoCH Potential bear reversal Potential bull reversal
EQH Resistance cluster Profit-taking zone
EQL Accumulation zone Support cluster
Optimal Use Cases:
Multi-Timeframe Confirmation: Daily BOS + 4H CHoCH alignment
Liquidity Hunting: EQH/EQL zones as stop-run targets
Market Correlation: Compare BTC dominance vs. altcoin structures
⚠️ Critical Warnings
Latency Warning: Higher timeframes update slower - don't use for scalping!
Asset Correlation: Custom tickers must have logical relationships (e.g., BTC + ETH, not BTC + AAPL).
Overload Prevention: >5 active tickers may cause performance issues.
Broker Differences: Futures vs. spot market data discrepancies.
🌟 Advanced Features
Smart Object Management: Auto-removes untouched structures after 200 bars.
Customizable Styles:
pine
Copy
screenerColor = input.color(#1B1F2B, 'Background')
bullishColor = input.color(#089981, 'Bullish')
Multi-Resolution Support: Mix timeframes (e.g., BTC 1D + ETH 4H).
Deep Backtesting: Compatible with TradingView's strategy tester.
📜 Code Architecture
Modular Design: Separates data processing (handleMarketStructures()), visualization (handleDashboard()), and calculations.
Efficient Memory: Uses arrays/objects instead of global variables:
pine
Copy
type marketStructureInfo
labelPlot structureLabel
linePlot structureLine
Dynamic Security Calls:
pine
Copy
= request.security(ticker1, ticker1TF, allMarketStructures)
✅ Compliance & Publishing
TradingView Rules:
✅ Open-source (MPL 2.0 license header included)
✅ No exaggerated claims ("100% accurate" prohibited)
✅ No paid feature promotion
Screenshot Requirements:
Include 3 annotated examples (different asset classes)
Show dashboard + chart integration
Optimization Checklist:
Test with 10+ chart tabs open
Verify cross-platform mobile/desktop performance
Confirm alert functionality
🔗 Recommended Resources
Video Tutorial (recommended but optional)
Github Repo (for code transparency)
Telegram Group (community support)
Let me know if you need help with visual examples or deeper technical explanations! 🚀
AstroTrading_Likidasyon Barları[BugraComez]📈 AstroTrading Liquidation Bars
Identify High-Volume Candles with Long Wicks for Potential Market Reversals
Author: Bugra Comez | Version: 1.0 | Category: Volume Analysis
🔍 Indicator Overview
This indicator detects liquidation bars – candles with abnormally high volume and elongated wicks – which often signal panic buying/selling, stop hunts, or trend exhaustion. It highlights these bars with a red background and an explosion emoji (💥) above them, enabling traders to spot potential reversals or liquidity zones.
⚙️ Parameters
Customize the sensitivity of the signals using these inputs:
Volume Threshold (threshold):
Description: Multiplier applied to the 233-period volume moving average. A value of 2 means the current volume must be twice the average to trigger a signal.
Usage: Higher values reduce false signals but may miss weaker liquidity events.
Wick Ratio (wick_ratio):
Description: Minimum ratio of wick length to body size. For example, 0.5 means the wick (upper or lower) must be at least 50% of the candle’s body to qualify.
Usage: Lower values detect more candles but increase noise.
📊 How It Works
Algorithm Steps:
Volume Analysis:
Calculates the 233-period SMA (Simple Moving Average) of volume.
Flags a candle as "high volume" if current volume > SMA(233) * threshold.
Wick Analysis:
Measures the upper wick (high - max(open, close)) and lower wick (min(open, close) - low).
Compares the larger wick to the candle’s body (abs(open - close)).
Triggers a signal if either wick exceeds body size * wick_ratio.
Signal Confirmation:
A liquidation bar is confirmed only if BOTH high volume and long wick conditions are met.
🧠 Interpretation & Trading Logic
Red Bars: Indicate liquidation zones where aggressive buying/selling occurred, often trapping retail traders.
Contextual Use:
Trend Reversals: Liquidation bars near support/resistance may signal exhaustion.
Stop Hunts: Common in ranging markets where liquidity is clustered around key levels.
Breakout/False Breakouts: High-volume wicks can mark failed breakouts or accumulation/distribution.
🛠️ Use Cases
Day Trading:
Combine with price action (e.g., engulfing patterns) to scalp reversals.
Swing Trading:
Identify liquidation zones as potential entry points for counter-trend trades.
Risk Management:
Place stop-losses beyond the wick extremes to avoid being stopped out prematurely.
⚠️ Critical Warnings
Not a Standalone Strategy: Always confirm with additional indicators (e.g., RSI, MACD, or market structure).
False Signals: High volatility or news events may trigger unreliable signals.
Backtest: Test historical performance on multiple assets and timeframes.
Risk Disclosure: "Past performance ≠ future results. Trade at your own risk."
🌟 Key Features
Multi-Market Compatibility: Works on stocks, forex, crypto, and futures.
Real-Time Alerts: Compatible with TradingView’s alert system for live notifications.
Customizable Aesthetics: Adjust colors, transparency, and emoji symbols via the script settings.
Open Source: Full Pine Script v5 code is transparent and modifiable.
📜 Code Documentation
Logic: Based on volume anomaly detection and candlestick anatomy.
Open Source: Code is unencrypted – users can verify or modify the logic.
Repository: GitHub Link (replace with your repo link).
Feedback: Report bugs or suggestions via TradingView comments or Email.
📸 Example Charts
(Attach 2-3 annotated screenshots when publishing on TradingView)
Example 1: Liquidation bars at a key resistance level in BTC/USDT (15m chart).
Example 2: False breakout marked by a liquidation bar in EUR/USD (1h chart).
🔗 Additional Resources
Video Tutorial: YouTube Link (optional).
Telegram Group: Join for real-time signals here.
Social Media: Follow updates on Twitter or LinkedIn.
✅ Compliance Notes
TradingView Guidelines:
Open-source code ✔️
No misleading claims ✔️
No financial advice ✔️
Licensing: Free for public use. Commercial redistribution requires permission.
Publish Checklist:
Add screenshots to the "Visuals" section.
Replace placeholder links (GitHub, social media).
Set script visibility to "Public".
Review TradingView’s Script Publishing Rules.
Let me know if you need further refinements! 🚀
MH Strategy – Hull Moving Average-Based Trading StrategyThe MH Strategy is a TradingView strategy that leverages the Hull Moving Average (HullMA) to generate precise buy and sell signals. This strategy is designed to identify trend reversals and momentum shifts using a combination of weighted moving averages and HullMA-based calculations.
Key Features:
✅ Hull Moving Average-Based Signals – Uses a modified HullMA calculation to detect trend changes.
✅ Dynamic Support & Resistance – The strategy plots adaptive levels that act as dynamic entry and exit points.
✅ Trend-Based Entries & Exits – Generates long (buy) signals when the price moves above the calculated Hull retraction level and short (sell) signals when the price moves below it.
✅ Automated Trade Execution – Integrates with TradingView’s strategy function to open and close trades automatically based on signal conditions.
✅ Customizable Parameters – Allows users to adjust the HullMA period and price data source to optimize performance across different markets and timeframes.
How It Works:
HullMA Calculation: The strategy calculates a smoothed Hull Moving Average (HullMA) using a two-step weighted moving average method.
Trend Confirmation: The difference between the HullMA values helps determine trend direction and retraction levels.
Entry Conditions:
A buy signal is generated when the price is above the retraction level, and the previous price confirms the trend.
A sell signal is triggered when the price is below the retraction level with trend confirmation.
Exit Conditions:
The strategy closes long trades when the price drops below a threshold.
It closes short trades when the price rises above a set level.
Ideal Use Cases:
🔹 Swing & trend traders looking for momentum-based entries and exits.
🔹 Traders aiming for reduced lag compared to traditional moving averages.
🔹 Markets with strong price trends, such as forex, stocks, and crypto.
Try the MH Strategy and enhance your trading decisions with a refined HullMA-based trend detection system! 🚀
SMC ALGO NSS//@version=5
indicator(title="RSI Divergence Indicator with 200-Day MA", format=format.price, timeframe="", timeframe_gaps=true)
len = input.int(title="RSI Period", minval=1, defval=14)
src = input(title="RSI Source", defval=close)
lbR = input(title="Pivot Lookback Right", defval=5, display = display.data_window)
lbL = input(title="Pivot Lookback Left", defval=5, display = display.data_window)
rangeUpper = input(title="Max of Lookback Range", defval=60, display = display.data_window)
rangeLower = input(title="Min of Lookback Range", defval=5, display = display.data_window)
plotBull = input(title="Plot Bullish", defval=true, display = display.data_window)
plotHiddenBull = input(title="Plot Hidden Bullish", defval=false, display = display.data_window)
plotBear = input(title="Plot Bearish", defval=true, display = display.data_window)
plotHiddenBear = input(title="Plot Hidden Bearish", defval=false, display = display.data_window)
bearColor = color.red
bullColor = color.green
hiddenBullColor = color.new(color.green, 80)
hiddenBearColor = color.new(color.red, 80)
textColor = color.white
noneColor = color.new(color.white, 100)
osc = ta.rsi(src, len)
// 200-Day Moving Average
maLength = 200
sma200 = ta.sma(close, maLength)
// Plotting the RSI
plot(osc, title="RSI", linewidth=2, color=#2962FF)
hline(50, title="Middle Line", color=#787B86, linestyle=hline.style_dotted)
obLevel = hline(70, title="Overbought", color=#787B86, linestyle=hline.style_dotted)
osLevel = hline(30, title="Oversold", color=#787B86, linestyle=hline.style_dotted)
fill(obLevel, osLevel, title="Background", color=color.rgb(33, 150, 243, 90))
// Plotting the 200-Day Moving Average on price chart
plot(sma200, title="200-Day Moving Average", color=color.orange, linewidth=2, style=plot.style_line)
// Functions for detecting pivots and divergences
plFound = na(ta.pivotlow(osc, lbL, lbR)) ? false : true
phFound = na(ta.pivothigh(osc, lbL, lbR)) ? false : true
_inRange(cond) =>
bars = ta.barssince(cond == true)
rangeLower <= bars and bars <= rangeUpper
// Regular Bullish Divergence
oscHL = osc > ta.valuewhen(plFound, osc , 1) and _inRange(plFound )
priceLL = low < ta.valuewhen(plFound, low , 1)
bullCondAlert = priceLL and oscHL and plFound
bullCond = plotBull and bullCondAlert
plot(
plFound ? osc : na,
offset=-lbR,
title="Regular Bullish",
linewidth=2,
color=(bullCond ? bullColor : noneColor),
display = display.pane
)
plotshape(
bullCond ? osc : na,
offset=-lbR,
title="Regular Bullish Label",
text=" Bull ",
style=shape.labelup,
location=location.absolute,
color=bullColor,
textcolor=textColor
)
// Hidden Bullish Divergence
oscLL = osc < ta.valuewhen(plFound, osc , 1) and _inRange(plFound )
priceHL = low > ta.valuewhen(plFound, low , 1)
hiddenBullCondAlert = priceHL and oscLL and plFound
hiddenBullCond = plotHiddenBull and hiddenBullCondAlert
plot(
plFound ? osc : na,
offset=-lbR,
title="Hidden Bullish",
linewidth=2,
color=(hiddenBullCond ? hiddenBullColor : noneColor),
display = display.pane
)
plotshape(
hiddenBullCond ? osc : na,
offset=-lbR,
title="Hidden Bullish Label",
text=" H Bull ",
style=shape.labelup,
location=location.absolute,
color=bullColor,
textcolor=textColor
)
// Regular Bearish Divergence
oscLH = osc < ta.valuewhen(phFound, osc , 1) and _inRange(phFound )
priceHH = high > ta.valuewhen(phFound, high , 1)
bearCondAlert = priceHH and oscLH and phFound
bearCond = plotBear and bearCondAlert
plot(
phFound ? osc : na,
offset=-lbR,
title="Regular Bearish",
linewidth=2,
color=(bearCond ? bearColor : noneColor),
display = display.pane
)
plotshape(
bearCond ? osc : na,
offset=-lbR,
title="Regular Bearish Label",
text=" Bear ",
style=shape.labeldown,
location=location.absolute,
color=bearColor,
textcolor=textColor
)
// Hidden Bearish Divergence
oscHH = osc > ta.valuewhen(phFound, osc , 1) and _inRange(phFound )
priceLH = high < ta.valuewhen(phFound, high , 1)
hiddenBearCondAlert = priceLH and oscHH and phFound
hiddenBearCond = plotHiddenBear and hiddenBearCondAlert
plot(
phFound ? osc : na,
offset=-lbR,
title="Hidden Bearish",
linewidth=2,
color=(hiddenBearCond ? hiddenBearColor : noneColor),
display = display.pane
)
plotshape(
hiddenBearCond ? osc : na,
offset=-lbR,
title="Hidden Bearish Label",
text=" H Bear ",
style=shape.labeldown,
location=location.absolute,
color=bearColor,
textcolor=textColor
)
// Alert conditions
alertcondition(bullCondAlert, title='Regular Bullish Divergence', message="Found a new Regular Bullish Divergence, `Pivot Lookback Right` number of bars to the left of the current bar")
alertcondition(hiddenBullCondAlert, title='Hidden Bullish Divergence', message='Found a new Hidden Bullish Divergence, `Pivot Lookback Right` number of bars to the left of the current bar')
alertcondition(bearCondAlert, title='Regular Bearish Divergence', message='Found a new Regular Bearish Divergence, `Pivot Lookback Right` number of bars to the left of the current bar')
alertcondition(hiddenBearCondAlert, title='Hidden Bearish Divergence', message='Found a new Hidden Bearish Divergence, `Pivot Lookback Right` number of bars to the left of the current bar')
WaveTrend with Crosses Al Sat Sinyali - Samet CEYLANAl sat sinyali üreten bir script. alım ve satım noktalarının tahmininde kullanılabilir.
Scalping Buy/Sell with Alerts & SL/TP📌 Overview
This is a scalping trading script for TradingView that:
✅ Identifies Buy & Sell signals using two Exponential Moving Averages (EMA).
✅ Calculates Stop-Loss (SL) and Take-Profit (TP) levels dynamically.
✅ Uses lines (line.new()) instead of plot() to display SL/TP.
✅ Includes alerts for Buy/Sell signals
Dhokiya's Research Analyst - Chetan Dhokiya0.09 Version Strategy Indicator by Dhokiya's Research Analyst
Mobile - 7575065656
Website - dhokiyas.com/
Email - care@dhokiyas.com
RSI Divergence with Trendline wavywade3Settings
RSI Length: Number of bars for RSI calculation. (Default: 14)
RSI Source: Price source for RSI (close, open, high, low).
Overbought / Oversold Levels: For visual reference only (70/30 by default).
Take Profit %: Percentage gain at which the strategy will close the position. (Default: 5%)
Stop Loss %: (Optional) Percentage drop at which the strategy will stop out. (Default: 0%, i.e., disabled.)
Best Practices
Choose an Appropriate Timeframe
Depending on your trading style (day trading vs. swing trading), divergences might appear more or less frequently. You may get more whipsaws on lower timeframes, so always backtest on multiple timeframes before going live.
Adjust Pivots
The number of bars used to confirm a pivot (in the script it’s set around 2–5 bars) can significantly affect the sensitivity. You can tweak those settings if you want fewer or more frequent divergences.
Combine with Other Tools
Divergences can be powerful signals, but they’re not foolproof. This script works best if combined with other confluences such as support/resistance lines, volume analysis, or higher-timeframe trends.
Paper Trade & Backtest
Always test any new strategy in a demo environment or with TradingView’s backtesting to see its historical performance, then forward-test in live market conditions with minimal risk.
Risk Management
Since markets can move quickly, consider using the optional stop-loss parameter or external stop management. The hidden divergence exit can help reduce drawdowns, but no exit strategy is perfect.
In Summary
If you’re looking to trade RSI divergences automatically, this strategy simplifies the process by drawing and extending RSI trendlines, confirming entries on their break, and exiting trades at a fixed profit target or upon detecting a hidden divergence in the opposite direction. Customize the RSI settings, take-profit percentage, and (optionally) a stop loss to fit your preferences. Always remember to backtest thoroughly and employ sound risk management.