Indicators and strategies
Ethereum MVRV Z-Score OverlayThis indicator overlays a buy and sell threshold onto a ETHUSD chart. These thresholds are calculated using the MVRV Z-Score and the provided threshold values for the MVRV Z-Score.
Bitcoin MVRV Z-Score OverlayThis indicator overlays a buy and sell threshold onto a BTCUSD chart. These thresholds are calculated using the MVRV Z-Score and the provided threshold values for the MVRV Z-Score.
ATAMOKU - Ichimoku-Based Independent Scoring System
Name Origin of ATAMOKU:
The name ATAMOKU combines "Ata" (which means "I existed" in Japanese and "ancestor or father" in Turkish, which is also my name) and "Moku," meaning "cloud" in Japanese. This name reflects a unique scoring system based on Ichimoku principles, designed to help traders analyze trends and identify entry and exit points more accurately.
Scoring System Overview:
ATAMOKU leverages key Ichimoku values, including the Conversion Line, Base Line, and Leading Spans A and B. By applying mathematical functions and formulas, these values are used to generate a comprehensive score that indicates market strength and trend direction. This scoring system works independently of the price position relative to the Ichimoku cloud, allowing traders to identify potential entry and exit points in any time frame.
Signal and Smoothing Lines:
The script includes signal and smoothed lines that display signals continuously and can be customized with different smoothing techniques such as SMA, EMA, and WMA. These lines visually highlight entry and exit points, adapting to the trader's individual strategy.
Settings and Customization:
ATAMOKU offers several customization options to suit various trading preferences:
Scoring Method:
The scoring system uses hierarchical comparisons of Ichimoku values, with configurable weights for each comparison.
Smoothing Techniques:
Users can choose from several smoothing methods (SMA, EMA, WMA) to adjust signal sensitivity, allowing traders to fine-tune the display according to their preferred trading style.
Period Adjustments:
Options for adjusting the period of the scoring and smoothing calculations are provided to accommodate different time frames and trading strategies.
Display and Visualization:
ATAMOKU presents the data using a histogram and line chart format, enabling traders to observe trends and potential entry and exit points quickly and clearly.
Key Features:
Flexibility Across Time Frames, usable on any time frame without restriction.
Independent Cloud Position Scoring, Generates signals and identifies entry and exit points independently of the price position relative to the cloud.
Multi-Dimensional Analysis, Analyzes various Ichimoku data points and uses mathematical functions to offer traders a comprehensive market view.
Support and Contact:
For further information, customization questions, or support, please feel free to reach out via Private Message on TradingView. If you have a Premium account, additional contact details can also be included in the Signature field below.
Cloud [BRTLab]🔍 Overview
BRTLab Cloud is a powerful indicator designed to provide traders with a precise view of market trends and potential reversal points by combining an adapted Cloud similar to Ichimoku with custom mathematical logic. This indicator not only highlights trend direction and support/resistance zones but also integrates a Trend Reversal Signal (based on BRTLab Wave Hunter logic) to identify possible turning points, as well as a custom RSI to help spot entry opportunities within the cloud. It’s an effective tool for assessing both current trends and potential reversal points, while factoring in market uncertainty.
🔑 Key Features & Parameters
The BRTLab Cloud indicator operates similarly to the Ichimoku Cloud, but with an adapted trend-detection logic to provide more accurate signals. The primary methodology of the script is to determine the market trend using the Cloud, and then identify potential entry points based on signals derived from reversal points, overbought and oversold conditions using a custom RSI oscillator.
To enhance the versatility of the indicator, several filtering components are integrated, allowing users to tailor the signals to their specific trading styles:
Uncertainty Zones: The script features a unique uncertainty filter, which is visually represented by bars colored in orange on the chart. These zones highlight periods when the trend direction indicated by the Cloud might be changing, alerting the user to potential risks and advising caution before entering trades.
Cloud Width Filtering: A cloud width filter helps eliminate signals during weak trends, ensuring that only well-formed trends are considered for trading, which reduces the likelihood of acting on unreliable signals.
Trend Reversal Signal: The Trend Reversal Signal serves as a predictor for potential trend changes. It provides a signal marked with the symbol "↺" on the chart, indicating that a trend change is likely, and that the Cloud may soon shift direction. After this signal appears, continuing to trade with the current trend may be risky due to the potential reversal.
Key adjustable parameters include:
Cloud Timeframe: This setting allows the user to choose the timeframe for displaying the Cloud, either on the current timeframe or higher timeframes. Higher timeframes provide more stable and reliable trend directions, making this setting essential for adapting the indicator to different strategies.
Minimum Cloud Width (%): This parameter sets the minimum cloud width in percentage to filter out weak signals. By excluding signals on narrow clouds, the trader ensures that only significant trends are considered.
Signal Sensitivity: This adjusts the strength of the buy and sell signals generated by the custom RSI oscillator. A higher sensitivity value leads to stronger signals, which are ideal for traders seeking more decisive entry points.
Uncertainty Sensitivity: This setting helps define the "zone of uncertainty" on the chart, signaling potential reversals or areas where the trend may shift. A lower value makes the indicator more sensitive to uncertainty, potentially reducing the number of entries in risky conditions and filtering out unreliable signals.
Potential Take-Profit: This optional feature allows the user to display potential exit points based on the indicator's trend analysis. It provides an additional layer of guidance for setting targets and managing exits.
Among these settings, Cloud Timeframe, Signal Sensitivity, and Uncertainty Sensitivity offer the most flexibility, allowing users to adjust the script to match their preferred trading style:
The parameters Cloud Timeframe, Signal Sensitivity, and Uncertainty Sensitivity offer flexibility, with Cloud Timeframe providing stable trend direction from higher timeframes and Signal Sensitivity adjusting entry signal strength. The Uncertainty Sensitivity parameter filters high-risk areas, reducing potential entries by identifying trend ambiguity on the chart.
⚙️ Signals & Logic
The BRTLab Cloud indicator generates buy and sell signals based on a combination of cloud settings, custom RSI values, and uncertainty filters. The signal logic is designed to identify clear and reliable entry points, ensuring the trader can act with confidence. Here's how the signals work:
Long Signals (Buy): When the cloud is colored blue (indicating an uptrend), the custom RSI indicates a potential reversal within the cloud, and the uncertainty filter does not signal a risk zone, the indicator generates a buy signal. Additionally, the cloud width must meet the minimum percentage set in the "Minimum Cloud Width (%)" setting, which helps to exclude weak signals from narrow clouds, ensuring only strong trends are considered.
Short Signals (Sell): When the cloud is colored red (indicating a downtrend), the custom RSI signals a potential reversal inside the cloud, and the uncertainty filter does not indicate a risk zone, the indicator generates a sell signal. Similarly, the cloud width must match the minimum setting in "Minimum Cloud Width (%)", which filters out weak signals from narrow clouds.
Uncertainty Filter: The uncertainty filter plays a key role in ensuring that signals are reliable. If the uncertainty filter detects a risk zone (highlighted by orange-colored bars on the chart), the signal is considered less reliable, and traders are advised to be cautious. This feature significantly reduces the chances of acting on false signals.
Visualization: When a buy or sell signal is triggered, the indicator provides clear visual cues such as arrows or symbols on the chart to help the trader easily identify the signal. These visual cues are accompanied by the respective cloud color (blue for uptrend, red for downtrend), making it easy for traders to interpret the market direction at a glance.
🌟 Why it's Unique
The BRTLab Cloud indicator is based on a cloud system similar to the Ichimoku Cloud, but with several unique enhancements that significantly improve trend analysis and reversal detection:
Combination of Ichimoku Cloud and Trend Reversal Detection: The indicator incorporates a modified mathematical logic for more accurate detection of trend reversal points. This enhanced logic makes it more effective at spotting reversals compared to traditional methods. Additionally, the indicator provides a clear display of trends from higher timeframes without repainting, allowing traders to rely on more stable and reliable trend data, which is particularly useful for multi-timeframe analysis.
Unique Cloud Width Filtering: The "Minimum Cloud Width (%)" setting ensures that only strong trends trigger buy or sell signals, filtering out weak signals from narrow clouds. A wider cloud indicates a more established and reliable trend, providing further confidence in the trade direction.
Custom RSI Signal Sensitivity: The custom RSI has been optimized for more accurate entry and exit points across different trend phases. The "Signal Sensitivity" setting allows traders to adjust the indicator based on current market conditions, making it adaptable to both volatile and stable market environments. This helps to identify trend reversals with greater precision.
Enhanced Visualization: The indicator offers flexible visualization options, including gradient cloud styles and extremum zones, which aid in confirming key levels. These features enhance the trader’s ability to interpret market conditions and make informed decisions about entry and exit points.
🔶 Application of the Indicator
Example Usage:
Trading with BRTLab Cloud involves taking trend signals within the cloud. Long and short signals occur when the price reaches significant levels in the cloud, filtered by "Signal Sensitivity," "Uncertainty Sensitivity," and "Minimum Cloud Width (%)" settings. These features allow traders to determine optimal entry and exit points by signaling potential reversals while factoring in market uncertainty.
✅ Conclusion
BRTLab Cloud is a versatile and advanced tool for trend and reversal analysis, blending Ichimoku-style cloud methodology, Trend Reversal Signals (based on BRTLab Wave Hunter logic), and a custom RSI to deliver accurate entry and exit points. This indicator suits both short- and long-term trading strategies, providing precise signals that help minimize risk, particularly in uncertain market conditions.
⚠️ Risk Disclaimer
Trading involves significant risk, and most day traders experience losses. All content, tools, scripts, articles, and educational materials provided by BRTLab are solely for informational and educational purposes. Past performance does not guarantee future results.
Systematic Investment Tracker with Enhanced Features DCATürkçe Açıklama:
Bu TradingView Pine Script kodu, belirlenen tarih aralığında iki farklı yatırım stratejisi uygulayarak yatırım performansını analiz etmeyi sağlar. Kullanıcı, "Sürekli Alım" ve "Düştükçe Alım" stratejileri arasında bir karşılaştırma yapabilir. Her stratejide, toplam harcama, elde edilen miktar, ortalama maliyet ve kâr yüzdesi hesaplanır. Kod ayrıca dinamik alım miktarını ayarlama ve grafiksel işaretleyiciler ekleme özelliklerine sahiptir. Performans karşılaştırması için grafik üzerinde bilgi etiketi ve bir tablo sunulur. İki dil arasında geçiş yapma (Türkçe/İngilizce) seçeneği de mevcuttur.
English Description:
This TradingView Pine Script code enables users to analyze investment performance by applying two different investment strategies within a specified date range. Users can compare between "Systematic Purchase" and "Purchase on Decline" strategies. For each strategy, total expenditure, quantity acquired, average cost, and profit percentage are calculated. The script includes options for dynamic purchase adjustment and graphical markers. A performance comparison is presented through an info label and a table on the chart. Additionally, there is an option to switch between English and Turkish languages.
Pivot Points (Standard, Woodie, Camarilla, Fibonacci)Pivot Points is a technical indicator that is used to determine the levels at which price may face support or resistance. The Pivot Points indicator consists of a pivot point (PP) level and several support (S) and resistance (R) levels.
Calculation
PP, resistance and support values are calculated in different ways, depending on the type of the indicator, specified by the Type field in indicator inputs. To calculate PP and support/resistance levels, the values OPENcurr, OPENprev, HIGHprev, LOWprev, CLOSEprev are used, which are the values of the current open and previous open, high, low and close, respectively, on the indicator resolution. The indicator resolution is set by the input of the Pivots Timeframe. If the Pivots Timeframe is set to AUTO (the default value), then the increased resolution is determined by the following algorithm:
for intraday resolutions up to and including 15 min, DAY (1D) is used
for intraday resolutions more than 15 min, WEEK (1W) is used
for daily resolutions MONTH is used (1M)
for weekly and monthly resolutions, 12-MONTH (12M) is used
Highlight 3 PM Candle//@version=5
indicator("Highlight 3 PM Candle", overlay=true)
// Function to determine if the current candle is the 3 PM candle
is3pm(candleTime) =>
hour(candleTime) == 15 and minute(candleTime) == 0
// Check if the current candle is the 3 PM candle
highlight = is3pm(time)
// Highlight the 3 PM candle with a background color
bgcolor(highlight ? color.new(color.red, 80) : na)
Simplest Strategy Crossover with Labels Buy/Sell to $1000This Pine Script code, titled Custom Moving Average Crossover with Labels, is a trading indicator developed for the TradingView platform. It enables traders to visualize potential buy and sell signals based on the crossover of two moving averages, offering customizable settings for enhanced flexibility. Here’s a breakdown of its key features:
Key Features
User-Defined Moving Averages:
The script includes two moving averages: a fast and a slow one. Users can adjust the periods of each average (default values are 10 for the fast MA and 100 for the slow MA), allowing them to adapt the indicator to various market conditions and trading styles.
Time-Restricted Signal Validity:
The indicator includes settings for active trading hours, defined in UTC time. Users specify a start and end hour, making it possible to limit buy and sell signals to certain times of the day. This is especially useful for traders who wish to avoid signals outside their preferred trading hours or during periods of high volatility.
Crossover-Based Buy and Sell Signals:
Buy Signal: A "Buy" label is triggered and displayed when the fast moving average crosses above the slow moving average within the user-defined trading hours, signifying a potential upward trend.
Sell Signal: A "Sell" label is generated when the fast moving average crosses below the slow moving average, indicating a possible downtrend. Labels are displayed on the chart, color-coded for easy identification: green for buys and red for sells.
Profit Target Labels (+100 Points):
After each buy or sell entry, the indicator tracks price movements. When the price increases by 100 points from a buy entry or decreases by 100 points from a sell entry, a +100 label appears to signify a 100-point movement.
These labels serve as checkpoints to help traders assess performance and decide on further actions, such as taking profits or adjusting stop losses.
Visual Customization:
The moving averages are color-coded (blue for fast MA, red for slow MA) for easy distinction, and label text appears in white to enhance visibility against various chart backgrounds.
Benefits for Traders
Efficient Trade Identification: The moving average crossover combined with time-based restrictions allows traders to capture key market trends within chosen hours.
Clear Profit Checkpoints: The +100 point label alerts traders to significant price movement, useful for those looking for set profit targets.
Flexibility: Customizable inputs give users control over the indicator’s behavior, making it suitable for both day trading and swing trading.
This indicator is designed for traders looking to enhance their technical analysis with reliable, user-defined buy/sell signals, helping to increase confidence and improve trade timing based on objective data.
Use AI to create trend trading.This strategy is a trend trading strategy. This strategy used data from AI 2020-2023 as training data.
Based on Binance, it gives you about 6500% return from 2017 to now. But I put this strategy in a margin strategy of 5x. If you calculate the return by 5x, it brings about 783,000,000%.
If you assume there is no fee, you can earn about 8,443,000,000%.
Updated Volume SuperTrend AI (Expo)// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) creativecommons.org
// © Zeiierman
//@version=5
indicator("Volume SuperTrend AI (Expo)", overlay=true)
// ~~ ToolTips {
t1="Number of nearest neighbors in KNN algorithm (k): Increase to consider more neighbors, providing a more balanced view but possibly smoothing out local patterns. Decrease for fewer neighbors to make the algorithm more responsive to recent changes. Number of data points to consider (n): Increase for more historical data, providing a broader context but possibly diluting recent trends. Decrease for less historical data to focus more on recent behavior."
t2="Length of weighted moving average for price (KNN_PriceLen): Higher values create a smoother price line, influencing the KNN algorithm to be more stable but less sensitive to short-term price movements. Lower values enhance responsiveness in KNN predictions to recent price changes but may lead to more noise. Length of weighted moving average for SuperTrend (KNN_STLen): Higher values lead to a smoother SuperTrend line, affecting the KNN algorithm to emphasize long-term trends. Lower values make KNN predictions more sensitive to recent SuperTrend changes but may result in more volatility."
t3="Length of the SuperTrend (len): Increase for a smoother trend line, ideal for identifying long-term trends but possibly ignoring short-term fluctuations. Decrease for more responsiveness to recent changes but risk of more false signals. Multiplier for ATR in SuperTrend calculation (factor): Increase for wider bands, capturing larger price movements but possibly missing subtle changes. Decrease for narrower bands, more sensitive to small shifts but risk of more noise."
t4="Type of moving average for SuperTrend calculation (maSrc): Choose based on desired characteristics. SMA is simple and clear, EMA emphasizes recent prices, WMA gives more weight to recent data, RMA is less sensitive to recent changes, and VWMA considers volume."
t5="Color for bullish trend (upCol): Select to visually identify upward trends. Color for bearish trend (dnCol): Select to visually identify downward trends. Color for neutral trend (neCol): Select to visually identify neutral trends."
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Input settings for K and N values
k = input.int(3, title = "Neighbors", minval=1, maxval=100,inline="AI", group="AI Settings")
n_ = input.int(10, title ="Data", minval=1, maxval=100,inline="AI", group="AI Settings", tooltip=t1)
n = math.max(k,n_)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Input settings for prediction values
KNN_PriceLen = input.int(20, title="Price Trend", minval=2, maxval=500, step=10,inline="AITrend", group="AI Trend")
KNN_STLen = input.int(100, title="Prediction Trend", minval=2, maxval=500, step=10, inline="AITrend", group="AI Trend", tooltip=t2)
aisignals = input.bool(true,title="AI Trend Signals",inline="signal", group="AI Trend")
Bullish_col = input.color(color.lime,"",inline="signal", group="AI Trend")
Bearish_col = input.color(color.red,"",inline="signal", group="AI Trend")
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Define SuperTrend parameters
len = input.int(10, "Length", minval=1,inline="SuperTrend", group="Super Trend Settings")
factor = input.float(3.0,step=.1,inline="SuperTrend", group="Super Trend Settings", tooltip=t3)
maSrc = input.string("WMA","Moving Average Source", ,inline="", group="Super Trend Settings", tooltip=t4)
upCol = input.color(color.lime,"Bullish Color",inline="col", group="Super Trend Coloring")
dnCol = input.color(color.red,"Bearish Color",inline="col", group="Super Trend Coloring")
neCol = input.color(color.blue,"Neutral Color",inline="col", group="Super Trend Coloring", tooltip=t5)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Calculate the SuperTrend based on the user's choice
vwma = switch maSrc
"SMA" => ta.sma(close*volume, len) / ta.sma(volume, len)
"EMA" => ta.ema(close*volume, len) / ta.ema(volume, len)
"WMA" => ta.wma(close*volume, len) / ta.wma(volume, len)
"RMA" => ta.rma(close*volume, len) / ta.rma(volume, len)
"VWMA" => ta.vwma(close*volume, len) / ta.vwma(volume, len)
atr = ta.atr(len)
upperBand = vwma + factor * atr
lowerBand = vwma - factor * atr
prevLowerBand = nz(lowerBand )
prevUpperBand = nz(upperBand )
lowerBand := lowerBand > prevLowerBand or close < prevLowerBand ? lowerBand : prevLowerBand
upperBand := upperBand < prevUpperBand or close > prevUpperBand ? upperBand : prevUpperBand
int direction = na
float superTrend = na
prevSuperTrend = superTrend
if na(atr )
direction := 1
else if prevSuperTrend == prevUpperBand
direction := close > upperBand ? -1 : 1
else
direction := close < lowerBand ? 1 : -1
superTrend := direction == -1 ? lowerBand : upperBand
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Collect data points and their corresponding labels
price = ta.wma(close,KNN_PriceLen)
sT = ta.wma(superTrend,KNN_STLen)
data = array.new_float(n)
labels = array.new_int(n)
for i = 0 to n - 1
data.set(i, superTrend )
label_i = price > sT ? 1 : 0
labels.set(i, label_i)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Define a function to compute distance between two data points
distance(x1, x2) =>
math.abs(x1 - x2)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Define the weighted k-nearest neighbors (KNN) function
knn_weighted(data, labels, k, x) =>
n1 = data.size()
distances = array.new_float(n1)
indices = array.new_int(n1)
// Compute distances from the current point to all other points
for i = 0 to n1 - 1
x_i = data.get(i)
dist = distance(x, x_i)
distances.set(i, dist)
indices.set(i, i)
// Sort distances and corresponding indices in ascending order
// Bubble sort method
for i = 0 to n1 - 2
for j = 0 to n1 - i - 2
if distances.get(j) > distances.get(j + 1)
tempDist = distances.get(j)
distances.set(j, distances.get(j + 1))
distances.set(j + 1, tempDist)
tempIndex = indices.get(j)
indices.set(j, indices.get(j + 1))
indices.set(j + 1, tempIndex)
// Compute weighted sum of labels of the k nearest neighbors
weighted_sum = 0.
total_weight = 0.
for i = 0 to k - 1
index = indices.get(i)
label_i = labels.get(index)
weight_i = 1 / (distances.get(i) + 1e-6)
weighted_sum += weight_i * label_i
total_weight += weight_i
weighted_sum / total_weight
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Classify the current data point
current_superTrend = superTrend
label_ = knn_weighted(data, labels, k, current_superTrend)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Plot
col = label_ == 1?upCol:label_ == 0?dnCol:neCol
plot(current_superTrend, color=col, title="Volume Super Trend AI")
upTrend = plot(superTrend==lowerBand?current_superTrend:na, title="Up Volume Super Trend AI", color=col, style=plot.style_linebr)
Middle = plot((open + close) / 2, display=display.none, editable=false)
downTrend = plot(superTrend==upperBand?current_superTrend:na, title="Down Volume Super Trend AI", color=col, style=plot.style_linebr)
fill_col = color.new(col,90)
fill(Middle, upTrend, fill_col, fillgaps=false,title="Up Volume Super Trend AI")
fill(Middle, downTrend, fill_col, fillgaps=false, title="Down Volume Super Trend AI")
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Ai Super Trend Signals
Start_TrendUp = col==upCol and (col !=upCol or col ==neCol) and aisignals
Start_TrendDn = col==dnCol and (col !=dnCol or col ==neCol) and aisignals
// ~~ Add buy and sell signals
plotshape(Start_TrendUp, title="Buy Signal", location=location.belowbar, color=Bullish_col, style=shape.labelup, text="BUY")
plotshape(Start_TrendDn, title="Sell Signal", location=location.abovebar, color=Bearish_col, style=shape.labeldown, text="SELL")
AstroTrading_OrderBlocksThe AstroTrading Order Blocks indicator is a tool that helps identify potential support and resistance levels by establishing relationships between price action and candle data. This indicator uses the open, close, high and low values of past candles to analyze their interaction with current candles. Users can add this indicator to their charts to better understand market behavior.
Key Features:
Candle Information Analysis:
The indicator detects whether the previous candle was green or red.
The open, close, high and low levels of past candles are analyzed and compared to the current candle.
Conditions:
Red Line Condition: If the previous candle is green, the high of the current candle is between the open and close of the previous candle and the current candle is red, a red line is formed.
Green Line Condition: If the previous candle was red, the low of the current candle is between the open and close of the previous candle, and the current candle is green, a green line is formed.
Visual Expressions on the Chart:
When the red line condition is triggered, red lines and the “🐻Bear OB🐻” sign are displayed on the chart.
When the green line condition is triggered, green lines and the “🐂Bull OB🐂” sign are displayed on the chart.
Usage:
This indicator helps to identify support and resistance levels in technical analysis.
Traders can evaluate potential buying or selling opportunities by analyzing past price movements.
Warnings:
Users are advised to use the indicator with caution and conduct their own research.
The indicator should only be used to identify support and resistance levels and should not be used in conjunction with other technical analysis tools.
Summary of the Code:
This indicator is designed to work on the TradingView platform and performs the following functions:
Analyzes previous candle data and compares it with the current candle data.
Plots support and resistance levels on the chart according to the conditions.
It displays the relevant symbols with red and green lines.
RSI by ShrimpChén thánh Rsi
Chỉ báo này sẽ cho bạn biết khi nào rsi sẽ phân kỳ
Cũng như lồng ghép các đường ema và wma chu kỳ 9 và 45 vào rsi
Điều này làm cho việc đọc biểu đồ dễ dàng hơn rất nhiều
SupernovaBuy/Sell Signal with Bollinger Bands, Color Changing Lines, SL Lines with SL Price, and Color Changing Parabolic SAR
VWAP on Straddle & Strangle From Sandeep// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © AlgoTest
//@version=5
indicator("VWAP on Straddle & Strangle", overlay = false)
var bool first = true
var strike_gap = map.new()
if first
first := false
strike_gap.put("NIFTY", 50)
strike_gap.put("BANKNIFTY", 100)
strike_gap.put("FINNIFTY", 50)
strike_gap.put("MIDCPNIFTY", 25)
strike_gap.put("SENSEX", 100)
strike_gap.put("CRUDEOIL",50)
spot = input.string( "NIFTY" , title = "Spot Symbol", options = , group = "Index")
tooltip_day = "Enter the day of the expiry. Add 0 infront, if day is in single digit. For eg : 05 instead of 5"
tooltip_month = "Enter the month of the expiry. Add 0 infront, if month is in single digit. For eg : 06 instead of 6"
tooltip_year = "Enter the year of the expiry. Use last digit of the year. For eg : 24 instead of 2024"
_day = input.string( "11" , title = "Expiry Day", tooltip = tooltip_day, group="Expiry Date")
_month = input.string( "07" , title = "Expiry Month", tooltip = tooltip_month, group="Expiry Date")
_year = input.string( "24" , title = "Expiry Year", tooltip = tooltip_year, group="Expiry Date")
tooltip_ = "You can select any Strike, you can also have VWAP on Straddle, Strangle"
strike_ce = input.int(24300, "Call Strike", tooltip = tooltip_, group = "Select Strike")
strike_pe = input.int(24300, "Put Strike", tooltip = tooltip_, group = "Select Strike")
var string symbol_CE = ""
var string symbol_PE = ""
if(spot == "SENSEX")
symbol_CE := spot+"_"+_year+_month+_day+"_C_"+str.tostring(strike_ce)
symbol_PE := spot+"_"+_year+_month+_day+"_P_"+str.tostring(strike_pe)
if(spot != "SENSEX")
symbol_CE := spot+_year+_month+_day+"C"+str.tostring(strike_ce)
symbol_PE := spot+_year+_month+_day+"P"+str.tostring(strike_pe)
= request.security( symbol_CE, timeframe.period , )
= request.security( symbol_PE, timeframe.period , )
call_volume = request.security( symbol_CE, timeframe.period , volume )
put_volume = request.security( symbol_PE, timeframe.period , volume )
straddle_open = call_open + put_open
straddle_close = call_close + put_close
straddle_high = math.max(straddle_open, straddle_close)
straddle_low = math.min(straddle_open, straddle_close)
straddle_volume = call_volume + put_volume
var float sumPriceVolume = 0.0
var float sumVolume = 0.0
var float vwap = 0.0
if (dayofweek != dayofweek )
sumPriceVolume := 0.0
sumVolume := 0.0
vwap := 0.0
sumPriceVolume += straddle_close * straddle_volume
sumVolume += straddle_volume
vwap := sumPriceVolume / sumVolume
plotcandle ( straddle_open , straddle_high , straddle_low , straddle_close , title = "Straddle" , color = straddle_close > straddle_open ? color.green : color.red )
// vwap = ta.vwap(straddle_close)
plot ( vwap , title = "VWAP on Straddle" , color = color.blue , linewidth = 2 )
entry = straddle_close < vwap and straddle_close >= vwap
exit = straddle_close >= vwap and straddle_close < vwap
plotshape(exit, title = "Exit", text = 'Exit', style = shape.labeldown, location = location.top, color= color.red, textcolor = color.white, size = size.tiny)
plotshape(entry, title = "Entry", text = 'Entry', style = shape.labelup, location = location.bottom, color= color.green, textcolor = color.white, size = size.tiny)
alertcondition(exit, "Exit", "Exit")
alertcondition(entry, "Entry", "Entry")
Trade Management RulesThis script is a visual reminder of the user’s trade management rules, displayed on the left side of the Trading View chart. The purpose is to have these guidelines visible at all times while trading, helping the user stay disciplined.
Previous Day's CloseThis indicator plots a line from yesterday's intraday close till the en d of today's session.
Adaptive ema Cloud v1 Trend & Trade Signals"adaptive ema cloud v1 trend & trade signals" is a comprehensive technical indicator aimed at assisting traders in identifying market trends, trade entry points, and potential take profit (tp) and stop-loss (sl) levels. this indicator combines adaptive exponential moving average (ema) clouds with standard deviation bands to create a visual trend and signal system, enabling users to better analyze price action.
key features:
adaptive ema cloud: calculates a dynamic ema-based cloud using a simple moving average (sma) line, with upper and lower deviation bands based on standard deviations. users can adjust the standard deviation multiplier to modify the cloud's width.
trend direction detection: the indicator determines trend direction by comparing the close price to the ema cloud and signals bullish or bearish trends when the price crosses key levels.
take profit (tp) and stop-loss (sl) points: adaptive tp and sl levels are calculated based on the deviation bands, providing users with suggested exit points when a trade is triggered.
peak and valley detection: detects peaks and valleys in price, aiding traders in spotting potential support and resistance areas.
gradient-based cloud fill: dynamically fills the cloud with a gradient color based on trend strength, helping users visually gauge trend intensity.
trade tracking: tracks recent trades and records them in an internal memory, allowing users to view the last 20 trade outcomes, including whether tp or sl was hit.
how to use:
trend signals: look for green arrows (bullish trend) or red arrows (bearish trend) to identify potential entries based on trend crossovers.
tp/sl management: tp and sl levels are automatically calculated and displayed, with alerts available to notify users when these levels are reached.
adjustable settings: customize period length, standard deviation multiplier, and color preferences to match trading preferences and chart style.
inputs-
period: defines the look-back period for ema calculations.
standard deviation multiplier: adjusts cloud thickness by setting the multiplier for tp and sl bands.
gauge size: scales the gradient intensity for trend cloud visualization.
up/down colors: allows users to set custom colors for bullish and bearish bars.
alert conditions: this script has built-in alerts for trend changes, tp, and sl levels, providing users with automated notifications of important trading signals.
3 EMA Bands with Color CodingEMA Bands with Colors Coding
This indicator plots three Exponential Moving Averages (EMA) with color-coded signals based on their order. It provides quick insights into market trends:
Green: EMA 1 > EMA 2 > EMA 3, indicating a potential bullish trend.
Red: EMA 3 > EMA 2 > EMA 1, signaling a potential bearish trend.
Gray: Any other order of EMAs, showing a neutral or mixed trend.
Aadil's Buy Sell StrategyEMA Rejection Strategy
Overview: The EMA Rejection Strategy is designed for traders who rely on technical analysis to make informed trading decisions. This strategy is ideal for identifying potential buy and sell signals based on price rejections from the Exponential Moving Average (EMA). Specifically, it focuses on detecting scenarios where the price interacts with the 9-period EMA, providing clear entry points for traders.
Features:
EMA Calculation: Uses a 9-period EMA to identify key price levels.
Buy Signal: Generated when the price drops below the EMA and then closes above it, indicating a bullish rejection.
Sell Signal: Generated when the price rises above the EMA and then closes below it, indicating a bearish rejection.
Visual Indicators: Plots the EMA on the chart and marks buy/sell signals for easy identification.
Automated Trading: Integrates with TradingView’s strategy framework to execute trades automatically based on the signals.
Who Will Use This: This strategy is suited for:
Day Traders: Who need real-time signals for quick buy and sell decisions.
Swing Traders: Who look for short to medium-term trading opportunities based on price rejections.
Technical Analysts: Who rely on EMA as a key indicator for market trends and reversals.
Automated Trading Enthusiasts: Who want to incorporate EMA-based rejections into their algorithmic trading setups.
Try it then let me know ;)
SMA 20 Slope ChangeTo identify the points where the slope of the 20-period moving average (20MA) changes, you can use the following methods
SK_Pivot_StrategyKey Changes:
Market Hours Checkbox: Added useMarketHours input to enable or disable the market hours filter.
isMarketHour() Function: Added to determine if the current time is within market hours.
Condition Modification: Included isMarketHour() in the conditions for longConditionMet and shortConditionMet to ensure signals are generated only during market hours if the filter is enabled.
These modifications ensure that your strategy only triggers signals during market hours when the filter is enabled.