VolumeByTiagoFind where the big money is:
Yellow - Very strong (high probability big players investing)
Red - Strong (high probability big players secundary investiments)
Green - Volatility
White - No important Volatility
Wskaźniki i strategie
Day Separator (EST-based)Para kay Kankaku AHAHAHAHA
'Wag mo na pansinin 'tong decription. Dapat lang raw mahaba AHAHAHAHA
HABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Optimized SMA StrategyTest ai script. Trying to figure out how ask for what I want the ai script to do. This us just a test
EMA 9, 21, 200Aquí usamos EMA de 9 velas, para identificar oscilaciones del mercado a corto plazo. EMA de 21 velas sirve para confirmar tendencias; y EMA de 200 velas, destaca por su suavidad y sensibilidad a los cambios. Es ideal para predicciones a corto plazo.
Custom EMA/ATR/Keltner/Bollinger with Squeeze Setup 21-EMA and ATR-Based Analysis
21-EMA (Exponential Moving Average):
Acts as a dynamic support/resistance level.
The price's relationship with the 21-EMA is used to detect trends and potential reversals.
ATR (Average True Range):
Measures volatility.
Used to define price thresholds for buy/sell conditions (e.g., price not more than 1 ATR above 21-EMA for a buy signal).
2. Bollinger Bands and Keltner Channels for Squeeze Setup
Bollinger Bands (BB):
Calculated using a 20-period simple moving average and standard deviations.
Represents high and low volatility zones.
Keltner Channels (KC):
Based on a 20-period EMA and ATR.
Provides narrower channels for price action compared to Bollinger Bands.
Squeeze Condition:
Occurs when Bollinger Bands fall inside Keltner Channels, signaling low volatility.
These periods often precede significant price movements (breakouts).
3. Momentum Indicator (MACD Histogram)
MACD Histogram:
Measures momentum during a squeeze.
Positive histogram values suggest bullish momentum, while negative values suggest bearish momentum.
Used to predict breakout direction from a squeeze.
4. RSI (Relative Strength Index) for Overbought/Oversold Conditions
Buy Signal:
RSI below 50 indicates a potential oversold condition, supporting a buy signal.
Sell Signal:
RSI above 80 indicates overbought conditions, supporting a sell signal.
5. Buy/Sell Signal Conditions
Buy Signal:
Price is not more than 1 ATR above the 21-EMA.
RSI is below 50 (oversold).
Price touches the 21-EMA within a small tolerance.
Squeeze condition is active.
Sell Signal:
Price is 3 ATR above the 21-EMA.
RSI is above 80 (overbought).
Additional Signals:
Buy: Price is 2 standard deviations below the 21-EMA.
Sell: Price is 2 standard deviations above the 21-EMA.
6. Visual Enhancements
Candle Rangethe Candle Range refers to the difference between the high price (High) and the low price (Low) of a specific candle or bar.
Example:
For a given candle on the chart:
The high price is 120.
The low price is 100.
The candle range is 20 (120 - 100).
Uses:
Volatility Measurement: The candle range is often used to assess an asset's volatility over time. For example, averaging candle ranges can indicate the average volatility.
Indicator Development: Many indicators, such as Average True Range (ATR), rely on candle ranges to provide insights about market conditions.
Trade Filters: Candle ranges can act as filters in strategies to avoid trading during periods of low volatility.
Moving Average Ribbon SetThe Moving Average Ribbon is a powerful visualization tool for identifying trends and potential reversals in trading. By using 8 moving averages (MAs), you can enhance its sensitivity and applicability to various trading strategies.
Suggested Configuration for an 8-MA Ribbon:
Short-Term MAs: These react quickly to price changes, helping identify immediate trends.
5-period MA
10-period MA
Medium-Term MAs: These offer a balance between sensitivity and reliability.
20-period MA
30-period MA
Long-Term MAs: These filter out short-term noise, focusing on macro trends.
50-period MA
100-period MA
Extended-Term MAs: These highlight the overarching market sentiment.
150-period MA
200-period MA
Candle Range (High-Low)the Candle Range refers to the difference between the high price (High) and the low price (Low) of a specific candle or bar.
Example:
For a given candle on the chart:
The high price is 120.
The low price is 100.
The candle range is 20 (120 - 100).
Uses:
Volatility Measurement: The candle range is often used to assess an asset's volatility over time. For example, averaging candle ranges can indicate the average volatility.
Indicator Development: Many indicators, such as Average True Range (ATR), rely on candle ranges to provide insights about market conditions.
Trade Filters: Candle ranges can act as filters in strategies to avoid trading during periods of low volatility.
Candle Range (High-Low)the Candle Range refers to the difference between the high price (High) and the low price (Low) of a specific candle or bar.
Example:
For a given candle on the chart:
The high price is 120.
The low price is 100.
The candle range is 20 (120 - 100).
Uses:
Volatility Measurement: The candle range is often used to assess an asset's volatility over time. For example, averaging candle ranges can indicate the average volatility.
Indicator Development: Many indicators, such as Average True Range (ATR), rely on candle ranges to provide insights about market conditions.
Trade Filters: Candle ranges can act as filters in strategies to avoid trading during periods of low volatility.
The Final Countdown//Credit to ©SamRecio for the original indicator that this is based on, which is called, "HTF Bar Close Countdown".
Here are the key differences between the two indicators (That a user would care about):
1.) 10 timeframe slots (double the original number).
2.) Many more timeframe options ('1', '3', '5', '10', '15', '30', '45', '1H', '2H', '4H', '6H', '8H', '12H', 'D', 'W').
3.) Ability to structure timeframes however you want (Higher up top descending, vice versa, or just randomly.).
4.) Support for hour-based timeframes (1H, 2H, etc.).
5.) Displays minutes as numbers, hours with a number followed by H (ex. 1H), and anything above with a letter (D for day, W for week).
6.) Dynamic colors based on remaining time percentage (green->yellow->red) with two user-defined thresholds.
7.) Alerts for when timeframes are close to closing (yellow->red).
8.) More granular timeframe selection options.
9.) Background colors for an additional visual alert.
------Colors background the selected color for each timeframe (Default is all timeframes are blue with 80% transparency).
------This does not repaint, so the color will persist once the red condition is over.
------As soon as you leave the timeframe though, it will be erased and the new timeframe will begin tracking red conditions.
------It always starts from the current bar, so it is not applicable to historical bars unless you leave it running for an extended period of time.
------Do note that since this is not actual paint or colored pencils, the colors do not blend.
------The most recent timeframe to enter a red condition will be the background that you see unless you leave the timeframe and return.
--------------------------------------------------------------------------------------------------------------------
Now for the description and instructions....
IT'S THE FINAL COUNTDOWN!
This indicator helps shorter-timeframe traders track multiple timeframe closings simultaneously, providing visual, audio and notification alerts when bars are nearing their close. It's particularly useful for traders who want to prepare for potential price action around bar closings across different timeframes. If you're a HODL till you're broke kind of trader, you don't need this.
-------------------------------
Multi-Timeframe Tracking
-------------------------------
- Monitors up to 10 different timeframes simultaneously
- Supports various timeframes from 1 minute to weekly (1m, 3m, 5m, 10m, 15m, 30m, 45m, 1H, 2H, 4H, 6H, 8H, 12H, Daily, Weekly)
- Timeframes can be arranged in any order (ascending, descending, or custom)
-----------------
Visual Display
-----------------
- Shows a countdown timer for each selected timeframe
- Dynamic color changes based on time remaining:
Green: More than 15% of bar time remaining
Yellow: Between 15% and 5% remaining
Red: Less than 5% remaining
- Customizable background colors appear when timeframes enter their red zone
----------------
Alert System
----------------
- Built-in alerts trigger when any timeframe enters its red zone
- Each timeframe can have its alerts toggled independently
------
-------------
--------------------------
- Setup Instructions -
--------------------------
-------------
------
-------------------------
Timeframe Selection
-------------------------
- Choose up to 10 timeframes to monitor
- Each timeframe has its own toggle switch to turn it on/off
- Default configuration starts from 5m and goes up to 12H
-------------------------
Visual Customization
-------------------------
- Adjust the table size, position
- Customize frame and border colors
- Modify the yellow and red threshold percentages
--------------------------------
Background Color Settings
--------------------------------
- Enable/disable background colors for each timeframe
- Choose custom colors for each timeframe's background
- Default setting is blue (with a fixed 80% transparency)
-------------
Usage Tips
-------------
- Use the countdown table to prepare for multiple timeframe closes as big moves (especially reversals) tend to begin come after higher timeframe changes (sometimes to the second).
- Watch for color changes to anticipate important closing periods to avoid getting trapped in bad trade (please always use stop losses if trading, in general).
- Set up alerts for critical timeframes that require immediate attention (2H, 4H, etc.).
- Use background colors as an additional visual cue for timeframe closes.
- Position the table where it won't interfere with your chart analysis.
Fibobull Düzeltme Türkce Vol.2//@version=5
//@fibobull
indicator("Fibobull Düzeltme Türkce Vol.2", overlay=true)
devTooltip = "Deviation is a multiplier that affects how much the price should deviate from the previous pivot in order for the bar to become a new pivot."
depthTooltip = "The minimum number of bars that will be taken into account when calculating the indicator."
// Pivots threshold
threshold_multiplier = input.float(title="Deviation", defval=10, minval=0, tooltip=devTooltip)
depth = input.int(title="Depth", defval=3, minval=2, tooltip=depthTooltip)
reverse = input(false, "Reverse", display = display.data_window)
var extendLeft = input(false, "Extend Left | Extend Right", inline = "Extend Lines")
var extendRight = input(true, "", inline = "Extend Lines")
var extending = extend.none
if extendLeft and extendRight
extending := extend.both
if extendLeft and not extendRight
extending := extend.left
if not extendLeft and extendRight
extending := extend.right
prices = input(true, "Show Prices", display = display.data_window)
levels = input(true, "Show Levels", inline = "Levels", display = display.data_window)
labelsPosition = input.string("Left", "Labels Position", options = , display = display.data_window)
var int backgroundTransparency = input.int(85, "Background Transparency", minval = 0, maxval = 100, display = display.data_window)
// Text size input
textSize = input.string(title="Text Size", defval="normal", options= , display = display.data_window)
import TradingView/ZigZag/7 as zigzag
update() =>
var settings = zigzag.Settings.new(threshold_multiplier, depth, color(na), false, false, false, false, "Absolute", true)
var zigzag.ZigZag zigZag = zigzag.newInstance(settings)
var zigzag.Pivot lastP = na
var float startPrice = na
var float endPrice = na // End price değişkenini ekliyoruz
var float height = na
settings.devThreshold := ta.atr(10) / close * 100 * threshold_multiplier
if zigZag.update()
lastP := zigZag.lastPivot()
if not na(lastP)
var line lineLast = na
if na(lineLast)
lineLast := line.new(lastP.start, lastP.end, xloc=xloc.bar_time, color=color.gray, width=1, style=line.style_dashed)
else
line.set_first_point(lineLast, lastP.start)
line.set_second_point(lineLast, lastP.end)
startPrice := reverse ? lastP.start.price : lastP.end.price
endPrice := reverse ? lastP.end.price : lastP.start.price // End price'i burada atıyoruz
height := (startPrice > endPrice ? -1 : 1) * math.abs(startPrice - endPrice)
= update()
_draw_line(price, col) =>
var id = line.new(lastP.start.time, lastP.start.price, time, price, xloc=xloc.bar_time, color=col, width=1, extend=extending)
line.set_xy1(id, lastP.start.time, price)
line.set_xy2(id, lastP.end.time, price)
id
_draw_label(price, txt, txtColor) =>
x = labelsPosition == "Left" ? lastP.start.time : not extendRight ? lastP.end.time : time
labelStyle = labelsPosition == "Left" ? label.style_label_right : label.style_label_left
align = labelsPosition == "Left" ? text.align_right : text.align_left
var id = label.new(x=x, y=price, xloc=xloc.bar_time, text=txt, textcolor=txtColor, style=labelStyle, textalign=align, color=#00000000, size=textSize)
label.set_xy(id, x, price)
label.set_text(id, txt)
label.set_textcolor(id, txtColor)
_label_txt(level, price) =>
(levels ? level : "") + (prices ? " (" + str.tostring(price, format.mintick) + ")" : "")
_crossing_level(series float sr, series float r) =>
(r > sr and r < sr ) or (r < sr and r > sr )
processLevel(bool show, float value, string label, color colorL, line lineIdOther) =>
r = startPrice + height * value
crossed = _crossing_level(close, r)
if show and not na(lastP)
lineId = _draw_line(r, colorL)
_draw_label(r, _label_txt(label, r), colorL)
if crossed
alert("Autofib: " + syminfo.ticker + " crossing level " + str.tostring(label))
if not na(lineIdOther)
linefill.new(lineId, lineIdOther, color = color.new(colorL, backgroundTransparency))
lineId
else
lineIdOther
// Define the text values and colors for each level
show_tepe = input(true, "Show Tepe", display = display.data_window)
color_tepe = input(color.new(color.gray, 50), "Tepe Color", display = display.data_window)
show_tepeye_yakin = input(true, "Show Tepeye Yakın", display = display.data_window)
color_tepeye_yakin = input(color.new(color.green, 50), "Tepeye Yakın Color", display = display.data_window)
show_hala_duzeltiyor = input(true, "Show Düzeltiyor", display = display.data_window)
color_hala_duzeltiyor = input(color.new(color.red, 50), "Düzeltiyor Color", display = display.data_window)
show_alim_yerleri = input(true, "Show Alım Yerleri", display = display.data_window)
color_alim_yerleri = input(color.new(color.blue, 50), "Alım Yerleri Color", display = display.data_window)
show_alabilirsin = input(true, "Show Alabilirsin", display = display.data_window)
color_alabilirsin = input(color.new(color.orange, 50), "Alabilirsin Color", display = display.data_window)
show_almaya_devam = input(true, "Show Almaya Devam", display = display.data_window)
color_almaya_devam = input(color.new(color.purple, 50), "Almaya Devam Color", display = display.data_window)
show_maliyet_dusur = input(true, "Show Maliyet Düşür", display = display.data_window)
color_maliyet_dusur = input(color.new(color.yellow, 50), "Maliyet Düşür Color", display = display.data_window)
show_maliyet_dusur_stop_ol = input(true, "Show Maliyet Düşür - Altında Stop OL", display = display.data_window)
color_maliyet_dusur_stop_ol = input(color.new(color.red, 50), "Maliyet Düşür - Altında Stop OL Color", display = display.data_window)
// Determine the text labels based on the direction
labelTepe = startPrice > endPrice ? "Tepe" : "Dip"
labelTepeyeYakin = startPrice > endPrice ? "Tepeye Yakın" : "Dibe Yakın"
labelHalaDuzeltiyor = startPrice > endPrice ? "Düzeltiyor" : "Düşüşü Düzeltiyor"
labelAlimYerleri = startPrice > endPrice ? "Alış Yerleri" : "Satış Yerleri"
labelAlabilirsin = startPrice > endPrice ? "Alabilirsin" : "Satabilirsin"
labelAlmayaDevam = startPrice > endPrice ? "Almaya Devam" : "Satmaya Devam"
labelMaliyetDusur = startPrice > endPrice ? "Maliyet Düşür" : "Stop Hazırlan"
labelMaliyetDusurStopOl = startPrice > endPrice ? "Maliyet Düşür-Altında Stop OL" : "Son Seviye Üstünde Stop OL"
// Process each text level
lineIdTepe = processLevel(show_tepe, 0.0, labelTepe, color_tepe, line(na))
lineIdTepeyeYakin = processLevel(show_tepeye_yakin, 0.236, labelTepeyeYakin, color_tepeye_yakin, lineIdTepe)
lineIdHalaDuzeltiyor = processLevel(show_hala_duzeltiyor, 0.382, labelHalaDuzeltiyor, color_hala_duzeltiyor, lineIdTepeyeYakin)
lineIdAlimYerleri = processLevel(show_alim_yerleri, 0.5, labelAlimYerleri, color_alim_yerleri, lineIdHalaDuzeltiyor)
lineIdAlabilirsin = processLevel(show_alabilirsin, 0.618, labelAlabilirsin, color_alabilirsin, lineIdAlimYerleri)
lineIdAlmayaDevam = processLevel(show_almaya_devam, 0.65, labelAlmayaDevam, color_almaya_devam, lineIdAlabilirsin)
lineIdMaliyetDusur = processLevel(show_maliyet_dusur, 0.786, labelMaliyetDusur, color_maliyet_dusur, lineIdAlmayaDevam)
lineIdMaliyetDusurStopOl = processLevel(show_maliyet_dusur_stop_ol, 1.0, labelMaliyetDusurStopOl, color_maliyet_dusur_stop_ol, lineIdMaliyetDusur)
SMA 10/20 Trend Info Table - QullamaggieThe Qullamaggie Index Trend Filter is a momentum-based technical indicator designed to identify strong bullish or bearish trends in the market by analyzing the relationship and movement of two simple moving averages (SMAs): the 10-period SMA and the 20-period SMA. It simplifies trend analysis and provides clear visual cues for traders to align their trades with the prevailing market direction.
Range Fractal Filter Buy and Sell 5min By BossFXTraderRange Filter with Buy and Sell
Fractal confirmation with Confluence
Risk Reward is 1:3 best result.
Confluence with another indicator will work.
Fibonacci Trend - Aynet1. Inputs
lookbackPeriod: Defines the number of bars to consider for calculating swing highs and lows. Default is 20.
fibLevel1 to fibLevel5: Fibonacci retracement levels to calculate price levels (23.6%, 38.2%, 50%, 61.8%, 78.6%).
useTime: Enables or disables time-based Fibonacci projections.
riskPercent: Defines the percentage of risk for trading purposes (currently not used in calculations).
2. Functions
isSwingHigh(index): Identifies a swing high at the given index, where the high of that candle is higher than both its previous and subsequent candles.
isSwingLow(index): Identifies a swing low at the given index, where the low of that candle is lower than both its previous and subsequent candles.
3. Variables
swingHigh and swingLow: Store the most recent swing high and swing low prices.
swingHighTime and swingLowTime: Store the timestamps of the swing high and swing low.
fib1 to fib5: Fibonacci levels based on the difference between swingHigh and swingLow.
4. Swing Point Detection
The script checks if the last bar is a swing high or swing low using the isSwingHigh() and isSwingLow() functions.
If a swing high is detected:
The high price is stored in swingHigh.
The timestamp of the swing high is stored in swingHighTime.
If a swing low is detected:
The low price is stored in swingLow.
The timestamp of the swing low is stored in swingLowTime.
5. Fibonacci Levels Calculation
If both swingHigh and swingLow are defined, the script calculates the Fibonacci retracement levels (fib1 to fib5) based on the price difference (priceDiff = swingHigh - swingLow).
6. Plotting Fibonacci Levels
Fibonacci levels (fib1 to fib5) are plotted as horizontal lines using the line.new() function.
Labels (e.g., "23.6%") are added near the lines to indicate the level.
Lines and labels are color-coded:
23.6% → Blue
38.2% → Green
50.0% → Yellow
61.8% → Orange
78.6% → Red
7. Filling Between Fibonacci Levels
The plot() function creates lines for each Fibonacci level.
The fill() function is used to fill the space between two levels with semi-transparent colors:
Blue → Between fib1 and fib2
Green → Between fib2 and fib3
Yellow → Between fib3 and fib4
Orange → Between fib4 and fib5
8. Time-Based Fibonacci Projections
If useTime is enabled:
The time difference (timeDiff) between the swing high and swing low is calculated.
Fibonacci time projections are added based on multiples of 23.6%.
If the current time reaches a projected time, a label (e.g., "T1", "T2") is displayed near the high price.
9. Trading Logic
Two placeholder variables are defined for trading logic:
longCondition: Tracks whether a condition for a long trade is met (currently not implemented).
shortCondition: Tracks whether a condition for a short trade is met (currently not implemented).
These variables can be extended to define entry/exit signals based on Fibonacci levels.
How It Works
Detect Swing Points: It identifies recent swing high and swing low points on the chart.
Calculate Fibonacci Levels: Based on the swing points, it computes retracement levels.
Visualize Levels: Plots the levels on the chart with labels and fills between them.
Time Projections: Optionally calculates time-based projections for future price movements.
Trading Opportunities: The framework provides tools for detecting potential reversal or breakout zones using Fibonacci levels.
Median MACD - MattesThe Median Based MACD is a new-generation indicator created from old statistical Concepts. It combines a Median Calculation with a MACD to create a smoother signal with less noise and increased robustness.
In this case, the original calculation source of the MACD is replaced with a Median which can be calculated over user set X time.
- Why its good:
This "Phoenix" of sorts brings old concepts together to create a strong, new indicator which can frontrun & see trends from miles up front.
- How it can be used:
While this indicator can be used to follow trends, it can also be used to detect where a trend has weakened and is unlikely to continue. Please keep in mind that its unlikely but the chance is never 0.
In my personal opinion, i think that this indicator should NOT be used as a standalone indicator but rather as a compliment to analysis.
Enjoy!
P/L CalculatorDescription of the P/L Calculator Indicator
The P/L Calculator is a dynamic TradingView indicator designed to provide traders with real-time insights into profit and loss metrics for their trades. It visualizes key levels such as entry price, profit target, and stop-loss, while also calculating percentage differences and net profit or loss, factoring in fees.
Features:
Customizable Input Parameters:
Entry Price: Define the starting price of the trade.
Profit and Stop-Loss Levels (%): Set percentage thresholds for targets and risk levels.
USDT Amount: Specify the trade size for precise calculations.
Trade Type: Choose between "Long" or "Short" positions.
Visual Representation:
Entry Price, Profit Target, and Stop-Loss levels are plotted as horizontal lines on the chart.
Line styles, colors, and thicknesses are fully customizable for better visibility.
Real-Time Metrics:
Percentage difference between the live price and the entry price is calculated dynamically.
Profit/Loss (P/L) and fees are computed in real time to display net profit or loss.
Alerts:
Alerts are triggered when:
The live price hits the profit target.
The live price crosses the stop-loss level.
The price reaches the specified entry level.
A user-defined percentage difference is reached.
Labels and Annotations:
Displays percentage difference, P/L, and fee information in a clear label near the live price.
Custom Fee Integration:
Allows input of trading fees (%), enabling accurate net profit or loss calculations.
Price Scale Visualization:
Displays the percentage difference on the price scale for enhanced context.
Use Case:
The P/L Calculator is ideal for traders who want to monitor their trades' performance and make informed decisions without manually calculating metrics. Its visual cues and alerts ensure you stay updated on critical levels and price movements.
This indicator supports a wide range of trading styles, including swing trading, scalping, and position trading, making it a versatile tool for anyone in the market.
PremiumDiscountLibraryLibrary "PremiumDiscountLibrary"
isInZone(currentTime, price, trend, tz)
Vérifie si le prix est en zone premium ou discount
Parameters:
currentTime (int) : L'heure actuelle (timestamp)
price (float) : Le prix actuel
trend (string) : La tendance ("bullish" ou "bearish")
tz (string) : Le fuseau horaire pour calculer les sessions (par défaut : "GMT+1")
Returns: true si le prix est dans la zone correcte, sinon false
Bollinger Bands color candlesThis Pine Script indicator applies Bollinger Bands to the price chart and visually highlights candles based on their proximity to the upper and lower bands. The script plots colored candles as follows:
Bullish Close Above Upper Band: Candles are colored green when the closing price is above the upper Bollinger Band, indicating strong bullish momentum.
Bearish Close Below Lower Band: Candles are colored red when the closing price is below the lower Bollinger Band, signaling strong bearish momentum.
Neutral Candles: Candles that close within the bands remain their default color.
This visual aid helps traders quickly identify potential breakout or breakdown points based on Bollinger Band dynamics.
Autonomous 5-Minute RobotKey Components of the Strategy:
Trend Detection:
A 50-period simple moving average (SMA) is used to define the market trend. If the current close is above the SMA, the market is considered to be in an uptrend (bullish), and if it's below, it's considered a downtrend (bearish).
The strategy also looks at the trend over the last 30 minutes (6 candles in a 5-minute chart). The strategy compares the previous close with the current close to detect an uptrend or downtrend.
Volume Analysis:
The strategy calculates buyVolume and sellVolume based on price movement within each candle.
The condition for entering a long position is when the market is in an uptrend, and the buy volume is greater than the sell volume.
The condition for entering a short position is when the market is in a downtrend, and the sell volume is greater than the buy volume.
Trade Execution:
The strategy enters a long position when the trend is up and the buy volume is higher than the sell volume.
The strategy enters a short position when the trend is down and the sell volume is higher than the buy volume.
Positions are closed based on stop-loss and take-profit conditions.
Stop-loss is set at 3% below the entry price.
Take-profit is set at 29% above the entry price.
Exit Conditions:
Long trades will be closed if the price falls 3% below the entry price or rises 29% above the entry price.
Short trades will be closed if the price rises 3% above the entry price or falls 29% below the entry price.
Visuals:
The SMA (50-period) is plotted on the chart to show the trend.
Buy and sell signals are marked with labels on the chart for easy identification.
With this being said this algo is still being worked on to be autonomous
Analyze the Market Direction: Determine whether the market is in an uptrend or downtrend over the past 30 minutes (using the last 6 candles in a 5-minute chart).
Use Trend Indicators and Volume: Implement trend-following indicators like moving averages or the SMA/EMA crossover and consider volume to decide when to enter or exit a trade.
Enter and Exit Trades: The robot will enter long positions when the trend is up and short positions when the trend is down. Additionally, it will close positions based on volume signals and price action (e.g., volume spikes, price reversals).
Volume Delta Filtered Overlay v1.1 by RamtraderbookVolume Delta Filtered Overlay v1.1 by Ramtraderbook
This indicator visually displays the volume delta directly on the price chart using colored circles. Its main goal is to highlight significant changes in the volume delta, categorizing them by direction and magnitude.
How It Works
1. Volume Delta Calculation
- Measures the difference between buying and selling volume on a lower time frame.
2. Threshold Filter
- Only displays data if the delta exceeds a minimum threshold set by the user.
3. Colors by Direction
- Bullish color: If the delta is positive (more buying).
- Bearish color: If the delta is negative (more selling).
4. Circle Placement
- Circles are placed above the candle for a positive delta and below the candle for a negative delta.
Customizable Inputs
- Delta Threshold: Defines the minimum delta value that will be plotted.
- Customizable Colors: Allows you to set different colors for positive and negative delta circles.
- **Lower Time Frame**: Scans data on a lower time frame for greater accuracy.
Important Note on Data
TradingView does not handle market depth data such as order book information. The volume delta calculation is an approximation based on the asset’s volume and price behavior. This means it does not precisely reflect the actual flow of buy or sell orders in the market, but rather an estimate derived from available data.
Conclusion
The **Volume Delta Filtered Overlay v1.1 by Ramtraderbook** is a visual tool that helps quickly identify significant buy or sell volume movements, making it ideal for strategies that rely on order flow analysis. However, it is recommended to combine it with other tools for a more comprehensive analysis.
Volume Delta Filtered v1.1 by RamtraderbookIndicator Explanation: Volume Delta_RTB (Filtered)
General Description
The Volume Delta_RTB (Filtered) indicator is designed to analyze the volume delta of a financial asset and highlight only significant changes based on a configured threshold. This indicator is useful for detecting moments when buying volume exceeds selling volume (or vice versa), providing a clear view of market pressure.
What is Volume Delta?
Volume delta measures the difference between buying and selling volume over a given time period. A positive delta indicates that buying prevails over selling, while a negative delta indicates the opposite.
Indicator Inputs
The indicator has several customizable parameters to suit the user’s needs:
1. Volume Delta Threshold
- Allows you to set a minimum volume delta value.
- Only indicator values that exceed this absolute delta threshold will be displayed.
- Default value: 100,000.
2. Use of a Lower Time Frame
- Option to analyze data from a lower time frame than the main chart.
Operating Logic
1. Selection of the Lower Time Frame
- The indicator scans data from a lower time frame to accurately calculate the volume delta.
- By default, it automatically selects an appropriate lower time frame, though it can be set manually.
2. Calculation of Volume Delta
- Using the `ta.requestVolumeDelta` function, the indicator calculates:
- Volume delta at the start of the period (`openVolume`).
- Maximum delta (`maxVolume`).
- Minimum delta (`minVolume`).
- Last recorded delta (`lastVolume`).
3. Filtering Values
- If the absolute value of `lastVolume` (the last volume delta) is below the configured threshold (`deltaThreshold`), the data will not be displayed on the chart.
- This allows the indicator to highlight only significant movements, avoiding unnecessary noise.
4. Visualization
- Volume delta is represented by candles to facilitate interpretation:
- Yellow candles for positive delta (buying prevails).
- Pink candles for negative delta (selling prevails).
- A horizontal line at `0` serves as a reference.
- Colors can be configured as needed.
5. Data Validation
- If the data provider does not provide volume information for the asset, the indicator will display an error message.
Indicator Advantages
- Efficient Filtering: Focus on the most relevant movements in terms of volume, ignoring small or insignificant values.
- Adaptable: Offers customization options for both the delta threshold and the time frame.
- Clear Visualization: Colored candles make it easier to spot dominant buying or selling trends.
NOTE:
- Estimated Delta Data: Since TradingView does not have access to market depth data or an exact breakdown of buying and selling volume, the delta calculations are approximations based on price and volume behavior.
- Data Provider Dependency: Some assets or instruments may not have volume information available, limiting the indicator’s use.
Forex Hammer and Hanging Man StrategyThe strategy is based on two key candlestick chart patterns: Hammer and Hanging Man. These chart patterns are widely used in technical analysis to identify potential reversal points in the market. Their relevance in the Forex market, known for its high liquidity and volatile price movements, is particularly pronounced. Both patterns provide insights into market sentiment and trader psychology, which are critical in currency trading, where short-term volatility plays a significant role.
1. Hammer:
• Typically occurs after a downtrend.
• Signals a potential trend reversal to the upside.
• A Hammer has:
• A small body (close and open are close to each other).
• A long lower shadow, at least twice as long as the body.
• No or a very short upper shadow.
2. Hanging Man:
• Typically occurs after an uptrend.
• Signals a potential reversal to the downside.
• A Hanging Man has:
• A small body, similar to the Hammer.
• A long lower shadow, at least twice as long as the body.
• A small or no upper shadow.
These patterns are a manifestation of market psychology, specifically the tug-of-war between buyers and sellers. The Hammer reflects a situation where sellers tried to push the price down but were overpowered by buyers, while the Hanging Man shows that buyers failed to maintain the upward movement, and sellers could take control.
Relevance of Chart Patterns in Forex
In the Forex market, chart patterns are vital tools because they offer insights into price action and market sentiment. Since Forex trading often involves large volumes of trades, chart patterns like the Hammer and Hanging Man are important for recognizing potential shifts in market momentum. These patterns are a part of technical analysis, which aims to forecast future price movements based on historical data, relying on the psychology of market participants.
Scientific Literature on the Relevance of Candlestick Patterns
1. Behavioral Finance and Candlestick Patterns:
Research on behavioral finance supports the idea that candlestick patterns, such as the Hammer and Hanging Man, are relevant because they reflect shifts in trader psychology and sentiment. According to Lo, Mamaysky, and Wang (2000), patterns like these could be seen as representations of collective investor behavior, influenced by overreaction, optimism, or pessimism, and can often signal reversals in market trends.
2. Statistical Validation of Chart Patterns:
Studies by Brock, Lakonishok, and LeBaron (1992) explored the profitability of technical analysis strategies, including candlestick patterns, and found evidence that certain patterns, such as the Hammer, can have predictive value in financial markets. While their study primarily focused on stock markets, their findings are generally applicable to the Forex market as well.
3. Market Efficiency and Candlestick Patterns:
The efficient market hypothesis (EMH) posits that all available information is reflected in asset prices, but some studies suggest that markets may not always be perfectly efficient, allowing for profitable exploitation of certain chart patterns. For instance, Jegadeesh and Titman (1993) found that momentum strategies, which often rely on price patterns and trends, could generate significant returns, suggesting that patterns like the Hammer or Hanging Man may provide a slight edge, particularly in short-term Forex trading.
Testing the Strategy in Forex Using the Provided Script
The provided script allows traders to test and evaluate the Hammer and Hanging Man patterns in Forex trading by entering positions when these patterns appear and holding the position for a specified number of periods. This strategy can be tested to assess its performance across different currency pairs and timeframes.
1. Testing on Different Timeframes:
• The effectiveness of candlestick patterns can vary across different timeframes, as market dynamics change with the level of detail in each timeframe. Shorter timeframes may provide more frequent signals, but with higher noise, while longer timeframes may produce more reliable signals, but with fewer opportunities. This multi-timeframe analysis could be an area to explore to enhance the strategy’s robustness.
2. Exit Strategies:
• The script incorporates an exit strategy where positions are closed after holding them for a specified number of periods. This is useful for testing how long the reversal patterns typically take to play out and when the optimal exit occurs for maximum profitability. It can also help to adjust the exit logic based on real-time market behavior.
Conclusion
The Hammer and Hanging Man patterns are widely recognized in technical analysis as potential reversal signals, and their application in Forex trading is valuable due to the market’s high volatility and liquidity. This strategy leverages these candlestick patterns to enter and exit trades based on shifts in market sentiment and psychology. Testing and optimization, as offered by the script, can help refine the strategy and improve its effectiveness.
For further refinement, it could be valuable to consider combining candlestick patterns with other technical indicators or using multi-timeframe analysis to confirm patterns and increase the probability of successful trades.
References:
• Lo, A. W., Mamaysky, H., & Wang, J. (2000). Foundations of Technical Analysis: Computational Algorithms, Statistical Inference, and Empirical Implementation. The Journal of Finance, 55(4), 1705-1770.
• Brock, W., Lakonishok, J., & LeBaron, B. (1992). Simple Technical Trading Rules and the Stochastic Properties of Stock Returns. The Journal of Finance, 47(5), 1731-1764.
• Jegadeesh, N., & Titman, S. (1993). Returns to Buying Winners and Selling Losers: Implications for Stock Market Efficiency. The Journal of Finance, 48(1), 65-91.
This provides a theoretical basis for the use of candlestick patterns in trading, supported by academic literature and research on market psychology and efficiency.