Monthly ETF Indicatortestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertestertester
Indicadores y estrategias
VIX Fix con Alarma bv596vix fix con alarma +28 para poder comprar cuando el vix supera los 29 puntos en una tendencia alcista del ticker, accion o crypto
ideal para tendencias alcistas
EMA CloudsThe EMA Clouds indicator is a visually dynamic tool that overlays exponential moving averages (EMAs) on your chart, enhancing trend analysis and decision-making. It provides:
1. Customizable EMA Periods: Users can define up to four EMA periods, allowing flexibility to adapt to various trading strategies and timeframes.
2. Cloud Visualization:
- Green and Red Clouds: Represent the relationship between the faster EMAs (e.g., EMA 1 and EMA 2) to identify short-term trends.
- Blue and Orange Clouds: Represent the relationship between the slower EMAs (e.g., EMA 3 and EMA 4) to highlight longer-term trends.
3. Transparency: Clouds are semi-transparent (75% opacity), ensuring they don't obstruct the underlying price action while providing clear visual cues.
4. Trend Identification:
- Green Clouds indicate bullish momentum (faster EMA above slower EMA).
- Red Clouds signal bearish momentum (faster EMA below slower EMA).
- Blue Clouds and Orange Clouds provide similar signals for the slower EMA pairs, assisting in aligning short- and long-term trends.
This indicator is ideal for traders seeking to enhance their trend-following strategies or identify potential reversals by observing the interaction between multiple EMAs. The cloud-based approach ensures a more intuitive understanding of market dynamics.
Swingtrade Bestie - ABackesTeste com EMA do Backes
//Media de 3 Semanal
//Media 8 Semanas ajustada
//Media de 8 Semanal Area
//Media de 14 Semanal
//Media de 200 Semanal
//Media de 80 Semanal Area
MA 10/50/100/200Four Simple averages combined. This function enable users to use the SMA 10, 50, 100, and 200 in one single formula.
Pi Cycle Bitcoin Top and Bottom (Daily)Pi Cycle Bitcoin Top and Bottom (Daily)
This indicator combines the renowned Pi Cycle Top and Pi Cycle Bottom indicators into one comprehensive tool designed to identify Bitcoin's market cycle tops and bottoms with precision.
Pi Cycle Top
The Pi Cycle Top indicator uses the 111-day moving average (111DMA) and a multiple of the 350-day moving average (350DMA x 2). Historically, this indicator has identified Bitcoin’s price cycle peaks with an accuracy of up to 3 days.
📈 When the 111DMA crosses above the 350DMA x 2, it signals a market cycle top.
Pi Cycle Bottom
The Pi Cycle Bottom indicator utilizes the 150-day exponential moving average (150EMA) and a multiple of the 471-day simple moving average (471SMA x 0.745). Over past cycles, this combination has effectively pinpointed Bitcoin’s market bottoms with the same level of accuracy.
📉 When the 150EMA crosses below the 471SMA x 0.745, it signals a market cycle bottom.
Parabola
As an additional feature, the indicator identifies moments when the 150EMA crosses back above the 471SMA x 0.745, suggesting a potential parabolic price movement.
Features
Precision: Both indicators have historically aligned with major market turning points.
Customizable settings: Adjust the short and long moving averages to fit your analysis needs.
Alerts: Real-time alerts can be enabled for identifying market tops and bottoms.
Clear visualization: Optional moving average lines and signal markers make it easy to track market trends.
Full credits to Philip Swift, PositiveCrypto, Tondy, BilzerianCandle.
TMA Bands TMA (Triangular Moving Average):
Üçgen hareketli ortalamalar, fiyat verilerini yumuşatarak trendi daha net göstermek için kullanılır.
"Centered Asymmetric Bands" terimi, bu indikatörün merkezlenmiş bir yapıda çalıştığını ve farklı genişliklerde bantlar içerdiğini gösteriyor.
Simplified Momentum ScoreIndicator Name: Simplified Momentum Score
Description:
The Simplified Momentum Score indicator calculates the normalized price momentum of an asset over a user-defined period (e.g., 30 days). It provides a single actionable score between 0 and 1, making it easy to compare the relative strength of different tokens or assets:
1: Strongest momentum (best performer).
0: Weakest momentum (worst performer).
How to Use:
Apply this indicator to any chart in TradingView.
Use the normalized score to rank tokens or assets:
Closer to 1: Indicates strong recent price performance.
Closer to 0: Indicates weak recent price performance.
Customize the momentum period to match your trading strategy.
This tool is ideal for quick comparative analysis of multiple tokens to identify top-performing assets. Keep it simple, actionable, and effective! 🚀
Candlestick Strength and Volatility ReadoutDisplays a readout on the top right corner of the screen displaying a two basic calculations (volatility and strength; i.e. candlestick size and how close to the highs or lows it closed) for more convenient candlestick (price action) analysis.
Due to restrictions with Pine Script (or my knowledge thereof) only the current and previous candlestick data is shown, rather than the one currently hovered over.
The data is derived via two simple calculations; volatility being division between the range of the candlestick's high and low by the ATR; 'strength' (what I like to call it) being the range of the body by the range of the open to high or low, depending on the facing direction (positive or negative candlestick). These are expressed as percentages and will turn green depending on the set threshold.
Using this, one can effectively automate calculations you'd have to do by hand otherwise. I personally use these as entry filters in my trading, so it helps to not have to measure, remeasure, and divide before each potential entry.
Settings are implemented to change certain variables to your liking.
Trend Flow Line (TFL)The Trend Flow Line (TFL) is a versatile moving average indicator that dynamically adjusts to trends using a combination of Hull and Weighted Moving Averages, with optional color coding for bullish and bearish trends.
Introduction
The Trend Flow Line (TFL) is a powerful indicator designed to help traders identify and follow market trends with precision. It combines multiple moving average techniques to create a responsive yet smooth trendline. Whether you're a beginner or an experienced trader, the TFL can enhance your chart analysis by highlighting key price movements and trends.
Detailed Description
The Trend Flow Line (TFL) goes beyond traditional moving averages by leveraging a hybrid approach to calculate trends.
Here's how it works:
.........
Combination of Hull and Weighted Moving Averages
The TFL integrates the Hull Moving Average (HMA), known for its fast responsiveness, and the Double Weighted Moving Average (DWMA), which offers smooth transitions.
The HMA is adjusted dynamically based on the user-defined length, ensuring adaptability to various trading styles and timeframes.
.....
Dynamic Smoothing
The TFL calculates its value by averaging the HMA and DWMA, creating a balanced line that responds to market fluctuations without excessive noise.
This balance makes it ideal for identifying both short-term reversals and long-term trends.
.....
Customizable Features
Timeframe: Analyze the indicator on custom timeframes, independent of the chart's current timeframe.
Color Coding: Optional color settings visually differentiate bullish (uptrend) and bearish (downtrend) phases.
Line Width: Adjust the line thickness to suit your chart preferences.
Color Smoothness: Fine-tune how quickly the color changes to reflect trend shifts, providing a visual cue for potential reversals.
The TFL's algorithm ensures a blend of precision and adaptability, making it suitable for any market or trading strategy.
.........
The Trend Flow Line (TFL) is an essential tool for traders looking to stay ahead of market trends while maintaining a clear and visually intuitive charting experience. It combines HMA and DWMA for trend sensitivity and smoothness.
Daily PlayDaily Play Indicator
The Daily Play Indicator is a clean and versatile tool designed to help traders organize and execute their daily trading plan directly on their charts. This indicator simplifies your workflow by visually displaying key inputs like market trend, directional bias, and key levels, making it easier to focus on your trading strategy.
Features
Dropdown Selection for Trend and Bias:
• Set the overall market trend (Bullish, Bearish, or Neutral) and your directional bias (Long, Short, or Neutral) using intuitive dropdown menus. No more manual typing or guesswork!
Key Levels:
Quickly input and display the Previous Day High and Previous Day Low. These levels are essential for many trading strategies, such as breakouts.
Real-Time News Notes:
Add a quick note about impactful news or market events (e.g., “Fed meeting today” or “Earnings season”) to keep contextual awareness while trading.
Simple On-Chart Display:
The indicator creates a “table-like” structure on the chart, aligning your inputs in an easy-to-read format. The data is positioned dynamically so it doesn’t obstruct the price action.
Customisable Visual Style:
Simple labels with clear text to ensure that your chart remains neat and tidy.
----
Use Case
The Daily Play Indicator is ideal for:
• Day traders and scalpers who rely on precise planning and real-time execution.
• Swing traders looking to mark critical levels and develop a trade plan before the session begins.
• Anyone who needs a structured way to stay focused and disciplined during volatile market conditions.
By integrating this tool into your workflow, you can easily align your daily preparation with live market action.
----
How to Use
Open the indicator settings to configure your inputs:
• Trend: Use the dropdown to choose between Bullish, Bearish, or Neutral.
• Bias: Select Long, Short, or Neutral to align your personal bias with the market.
• Previous Day Levels: Enter the High and Low of the previous trading session for key reference points.
• News: Add a short description of any relevant market-moving events.
High and Retracement Finder
This Pine Script indicator, titled "High and Retracement Finder," is designed to identify significant highs and lows on a price chart based on a user-defined starting point and retracement threshold. It begins analysis from a manually set bar index and tracks the highest high until the price retraces by a specified percentage (retracement threshold). Once this retracement occurs, it switches focus to finding the lowest low. If the price surpasses the previous high during this phase, the cycle resets, and the script resumes tracking a new highest high. The script visually marks these significant highs and lows with arrows on the chart, helping traders identify potential turning points or retracements in the market.
Relative Momentum StrengthThe Relative Momentum Strength (RMS) indicator is designed to help traders and investors identify tokens with the strongest momentum over two customizable timeframes. It calculates and plots the percentage price change over 30-day and 90-day periods (or user-defined periods) to evaluate a token's relative performance.
30-Day Momentum (Green Line): Short-term price momentum, highlighting recent trends and movements.
90-Day Momentum (Blue Line): Medium-term price momentum, providing insights into broader trends.
This tool is ideal for comparing multiple tokens or assets to identify those showing consistent strength or weakness. Use it to spot outperformers and potential reversals in a competitive universe of assets.
How to Use:
Apply this indicator to your TradingView chart for any token or asset.
Look for tokens with consistently high positive momentum for potential strength.
Use the plotted values to compare relative performance across your watchlist.
Customization:
Adjust the momentum periods to suit your trading strategy.
Overlay it with other indicators like RSI or volume for deeper analysis.
vika //@version=5
indicator("Auto Anchored Moving Average", "Anchored MA", overlay = true, max_bars_back = 5000, max_lines_count = 500)
// Inputs
auto = input.bool(true, "Enable Auto Anchor")
anchor = input.timeframe('D', 'Anchor Period')
source = input(hlc3, "Source")
showPP = input.bool(true, "Show Prev. Period MA")
highlightAnc = input.bool(true, "Highlight Anchor Change")
wma_show = input.bool(true, "WMA", inline = "WMA", group = "Styles")
sma_show = input.bool(true, "SMA", inline = "SMA", group = "Styles")
vwap_show = input.bool(true, "VWAP", inline = "VWAP", group = "Styles")
wma_style = input.string("──────", "", options = , inline = "WMA", group = "Styles")
sma_style = input.string("──────", "", options = , inline = "SMA", group = "Styles")
vwap_style = input.string("──────", "", options = , inline = "VWAP", group = "Styles")
wma_color = input.color(color.lime, "WMA Color", inline = "WMA", group = "Styles")
sma_color = input.color(color.red, "SMA Color", inline = "SMA", group = "Styles")
vwap_color = input.color(color.blue, "VWAP Color", inline = "VWAP", group = "Styles")
// Determine anchor period automatically
autoAnchor = switch
timeframe.isintraday => timeframe.multiplier <= 15 ? "1D" : "1W"
timeframe.isdaily => "1M"
=> "12M"
// Override auto-anchor if 'auto' is off
if auto
anchor := autoAnchor
// Anchor change detection
isNewAnchor = timeframe.change(anchor)
var length = 1
length := isNewAnchor ? 1 : length + 1
// Calculate MAs
wma = ta.wma(source, length)
sma = ta.sma(source, length)
vwap = nz(ta.vwma(source, length))
// Previous MAs (for prev period plot)
p_wma = ta.valuewhen(isNewAnchor, wma , 0)
p_sma = ta.valuewhen(isNewAnchor, sma , 0)
p_vwap = ta.valuewhen(isNewAnchor, vwap , 0)
// Plot styles
get_style(style) =>
switch style
"──────" => line.style_solid
"─ ─ ─ ─" => line.style_dashed
"· · · · ·" => line.style_dotted
// Draw moving averages
draw(show, ma, _c, style) =>
var line _l = na
var label _lb = na
var label _lbc = na
_l.set_x2(bar_index)
if show and isNewAnchor and showPP
_l := line.new(bar_index - 1, ma , bar_index, ma , color = _c, style = style)
show = not isNewAnchor
plot(show and wma_show ? wma : na, "WMA", wma_color, style=plot.style_linebr)
plot(show and sma_show ? sma : na, "SMA", sma_color, style=plot.style_linebr)
plot(show and vwap_show ? vwap : na, "VWAP", vwap_color, style=plot.style_linebr)
// Highlight anchor change
hlight = isNewAnchor and highlightAnc
plotshape(hlight and wma_show ? wma : na, 'WMA Highlight', shape.circle, location.absolute, color.new(wma_color, 50), -1)
plotshape(hlight and sma_show ? sma : na, 'SMA Highlight', shape.circle, location.absolute, color.new(sma_color, 50), -1)
plotshape(hlight and vwap_show ? vwap : na, 'VWAP Highlight', shape.circle, location.absolute, color.new(vwap_color, 50), -1)
// Draw lines for each moving average
draw(wma_show, wma, wma_color, get_style(wma_style))
draw(sma_show, sma, sma_color, get_style(sma_style))
draw(vwap_show, vwap, vwap_color, get_style(vwap_style))
Bostian Intraday Intensity Index (BII)The Bostian Intraday Intensity Index (BII) is a metric used to analyze the trading volume and price movements of a specific stock or asset, measuring the strength and pressure of the market. BII captures buy and sell signals by examining the relationship between trading volume and price fluctuations. Below is an explanation of the key components and calculation method for BII:
○ BII Formula:
sum(V*((C-L)^2-(H-C)^2))/(H-L)))
V (Volume): Trading volume
C (Close): Closing price
L (Low): Lowest price
H (High): Highest price
○ Meaning of the Indicator:
Positive Values: When BII is positive, it indicates strong buying pressure. The closer the closing price is to the high, the stronger the buying pressure.
Negative Values: When BII is negative, it indicates strong selling pressure. The closer the closing price is to the low, the stronger the selling pressure.
○ How to Use:
Buy Signal: When the BII value is positive and trending upwards, it may be considered a buying opportunity.
Sell Signal: When the BII value is negative and trending downwards, it may be considered a selling opportunity.
The BII indicator is useful for analyzing the strength and pressure of the market through the correlation of price movements and trading volume. It helps investors capture buy and sell signals to make better investment decisions.
Automatic Fibonacci Levels with EMAautomatically sets fib line and EMA turning red or green according to market direction
56//@version=5
strategy('Naser_M4PIVOT_R', overlay=true, default_qty_value=5, currency=currency.USD, default_qty_type=strategy.percent_of_equity, initial_capital=10000, max_bars_back=4000)
//===== TIMEFRAME ==========================================================================//
factorA = input.float(0.8, title='حساسیت ربات 1', step=0.1)
periodA = input.int(1, minval=1, maxval=100, title='پریود ربات 1')
factor = input.float(2.5, title='حساسیت ربات 2', step=0.1)
period = input.int(1, minval=1, maxval=100, title='پریود ربات 2')
use_sl = input(title='حد ضرر رو فعال کن', defval=false)
initial_sl_pct = input.float(defval=5, minval=0.0, title='حد ضرر %')
from_day = input.int(defval=1, title='از روز', minval=1, maxval=31)
from_month = input.int(defval=1, title='از ماه', minval=1, maxval=12)
from_year = input.int(defval=2019, title='از سال', minval=2017)
to_day = input.int(defval=1, title='تا روز', minval=1, maxval=31)
to_month = input.int(defval=1, title='تا ماه', minval=1, maxval=12)
to_year = input.int(defval=9999, title='تا سال', minval=2017)
start = timestamp(from_year, from_month, from_day, 00, 00)
finish = timestamp(to_year, to_month, to_day, 23, 59)
window() =>
time >= start and time <= finish ? true : false
//===== INPUTS ==========================================================================//
upA = (high + low) / 2 - factorA * ta.atr(periodA)
downA = (high + low) / 2 + factorA * ta.atr(periodA)
trend_upA = 0.0
trend_upA := close > trend_upA ? math.max(upA, trend_upA ) : upA
trend_downA = 0.0
trend_downA := close < trend_downA ? math.min(downA, trend_downA ) : downA
trendA = 0.0
trendA := close > trend_downA ? 1 : close < trend_upA ? -1 : nz(trendA , 1)
tslA = trendA == 1 ? trend_upA : trend_downA
line_colorA = trendA == 1 ? 'green' : 'red'
long_signalA = trendA == 1 and trendA == -1
short_signalA = trendA == -1 and trendA == 1
backgroundA = input(title=' پس زمینه ربات 1', defval=true)
//===== PLOTS ==========================================================================//
// Line
line_plotA = plot(tslA, color=trendA == 1 ? color.green : color.red, linewidth=2, title='Trend Line')
// Labels
plotshape(long_signalA and window() ? upA : na, location=location.absolute, style=shape.labelup, size=size.tiny, color=color.new(color.green, 0), textcolor=color.new(color.white, 0))
plotshape(short_signalA and window() ? downA : na, location=location.absolute, style=shape.labeldown, size=size.tiny, color=color.new(color.red, 0), textcolor=color.new(color.white, 0))
// Circles
plotshape(long_signalA and window() ? upA : na, title='Uptrend starts', location=location.absolute, style=shape.circle, size=size.tiny, color=color.new(color.green, 0))
plotshape(short_signalA and window() ? downA : na, title='Downtrend starts', location=location.absolute, style=shape.circle, size=size.tiny, color=color.new(color.red, 0))
// Background
long_fillA = backgroundA ? trendA == 1 ? color.green : na : na
short_fillA = backgroundA ? trendA == -1 ? color.red : na : na
candle_plotA = plot(ohlc4, title='Price Line', color=trendA == 1 ? long_fillA : short_fillA, linewidth=2, transp=90)
fill(candle_plotA, line_plotA, title='Long Background', color=long_fillA, transp=90)
fill(candle_plotA, line_plotA, title='Short Background', color=short_fillA, transp=90)
//===== GLOBAL ==========================================================================//
var entry_price = 0.0
var updated_entry_price = 0.0
var sl_price = 0.0
has_open_trade() =>
strategy.position_size != 0
has_no_open_trade() =>
strategy.position_size == 0
is_long() =>
strategy.position_size > 0 ? true : false
is_short() =>
strategy.position_size < 0 ? true : false
plot(use_sl ? has_no_open_trade() ? close : sl_price : na, color=has_no_open_trade() ? na : color.blue, title='Stop Loss')
strategy_close() =>
if is_long()
strategy.close('خرید')
if is_short()
strategy.close('فروش')
strategy_long() =>
strategy.entry('خرید', strategy.long)
strategy_short() =>
strategy.entry('فروش', strategy.short)
sl_pct = initial_sl_pct
if long_signalA or is_long() and not(short_signalA or is_short())
sl_pct := initial_sl_pct * -1
sl_pct
//===== STRATEGY ==========================================================================//
crossed_sl = false
if is_long() and use_sl
crossed_sl := close <= sl_price
crossed_sl
if is_short() and use_sl
crossed_sl := close >= sl_price
crossed_sl
terminate_operation = window() and has_open_trade() and crossed_sl
if terminate_operation and not(long_signalA or short_signalA) // Do not close position if trend is flipping anyways.
entry_price := 0.0
updated_entry_price := entry_price
sl_price := 0.0
strategy_close()
start_operation = window() and (long_signalA or short_signalA)
if start_operation
entry_price := close
updated_entry_price := entry_price
sl_price := entry_price + entry_price * sl_pct / 100
if long_signalA
strategy_long()
if short_signalA
strategy_short()
//===== TRAILING ==========================================================================//
if is_long() and use_sl
strategy_pct = (close - updated_entry_price) / updated_entry_price * 100.00
if strategy_pct > 1
sl_pct += strategy_pct - 1.0
new_sl_price = updated_entry_price + updated_entry_price * sl_pct / 100
sl_price := math.max(sl_price, new_sl_price)
updated_entry_price := sl_price
updated_entry_price
if is_short() and use_sl
strategy_pct = (close - updated_entry_price) / updated_entry_price * 100.00
if strategy_pct < -1
sl_pct += strategy_pct + 1.0
new_sl_price = updated_entry_price + updated_entry_price * sl_pct / 100
sl_price := math.min(sl_price, new_sl_price)
updated_entry_price := sl_price
updated_entry_price
//===== INPUTS ==========================================================================//
up = (high + low) / 2 - factor * ta.atr(period)
down = (high + low) / 2 + factor * ta.atr(period)
trend_up = 0.0
trend_up := close > trend_up ? math.max(up, trend_up ) : up
trend_down = 0.0
trend_down := close < trend_down ? math.min(down, trend_down ) : down
trend = 0.0
trend := close > trend_down ? 1 : close < trend_up ? -1 : nz(trend , 1)
tsl = trend == 1 ? trend_up : trend_down
line_color = trend == 1 ? 'green' : 'red'
long_signal = trend == 1 and trend == -1
short_signal = trend == -1 and trend == 1
background = input(title='پس زمینه ربات 2', defval=true)
//===== PLOTS ==========================================================================//
// Line
line_plot = plot(tsl, color=trend == 1 ? color.green : color.red, linewidth=2, title='Trend Line')
// Labels
plotshape(long_signal and window() ? up : na, location=location.absolute, style=shape.labelup, size=size.tiny, color=color.new(color.green, 0), textcolor=color.new(color.white, 0))
plotshape(short_signal and window() ? down : na, location=location.absolute, style=shape.labeldown, size=size.tiny, color=color.new(color.red, 0), textcolor=color.new(color.white, 0))
// Circles
plotshape(long_signal and window() ? up : na, title='Uptrend starts', location=location.absolute, style=shape.circle, size=size.tiny, color=color.new(color.green, 0))
plotshape(short_signal and window() ? down : na, title='Downtrend starts', location=location.absolute, style=shape.circle, size=size.tiny, color=color.new(color.red, 0))
// Background
long_fill = background ? trend == 1 ? color.green : na : na
short_fill = background ? trend == -1 ? color.red : na : na
candle_plot = plot(ohlc4, title='Price Line', color=trend == 1 ? long_fill : short_fill, linewidth=2, transp=90)
fill(candle_plot, line_plot, title='Long Background', color=long_fill, transp=90)
fill(candle_plot, line_plot, title='Short Background', color=short_fill, transp=90)
//===== GLOBAL ==========================================================================//
var entry_priceB = 0.0
var updated_entry_priceB = 0.0
var sl_priceB = 0.0
plot(use_sl ? has_no_open_trade() ? close : sl_price : na, color=has_no_open_trade() ? na : color.blue, title='Stop Loss')
strategy_closeB() =>
if is_long()
strategy.close('خرید')
if is_short()
strategy.close('فروش')
sl_pctB = initial_sl_pct
if long_signal or is_long() and not(short_signal or is_short())
sl_pct := initial_sl_pct * -1
sl_pct
//===== STRATEGY ==========================================================================//
crossed_slB = false
if is_long() and use_sl
crossed_sl := close <= sl_price
crossed_sl
if is_short() and use_sl
crossed_sl := close >= sl_price
crossed_sl
terminate_operationB = window() and has_open_trade() and crossed_sl
if terminate_operation and not(long_signal or short_signal) // Do not close position if trend is flipping anyways.
entry_price := 0.0
updated_entry_price := entry_price
sl_price := 0.0
strategy_close()
start_operationB = window() and (long_signal or short_signal)
if start_operation
entry_price := close
updated_entry_price := entry_price
sl_price := entry_price + entry_price * sl_pct / 100
if long_signal
strategy_long()
if short_signal
strategy_short()
//===== TRAILING ==========================================================================//
if is_long() and use_sl
strategy_pct = (close - updated_entry_price) / updated_entry_price * 100.00
if strategy_pct > 1
sl_pct += strategy_pct - 1.0
new_sl_price = updated_entry_price + updated_entry_price * sl_pct / 100
sl_price := math.max(sl_price, new_sl_price)
updated_entry_price := sl_price
updated_entry_price
if is_short() and use_sl
strategy_pct = (close - updated_entry_price) / updated_entry_price * 100.00
if strategy_pct < -1
sl_pct += strategy_pct + 1.0
new_sl_price = updated_entry_price + updated_entry_price * sl_pct / 100
sl_price := math.min(sl_price, new_sl_price)
updated_entry_price := sl_price
updated_entry_price
UP and Down Volume change with ema - Rohit ChaudharyUP and Down Volume change with ema - Rohit Chaudhary
Test Line Variable//@version=5
indicator("Auto Trend Lines (Support & Resistance)", overlay=true)
// Inputs
lengthHigh = input.int(10, title="Lookback Period for Highs")
lengthLow = input.int(10, title="Lookback Period for Lows")
extendLines = input.bool(true, title="Extend Lines into the Future")
// Function to find significant levels
findHigh(x) => ta.highest(x)
findLow(x) => ta.lowest(x)
// Identify recent significant highs and lows
recentHigh = findHigh(lengthHigh)
recentLow = findLow(lengthLow)
// Store the levels in variables
highLevel = recentHigh == high ? high : na
lowLevel = recentLow == low ? low : na
// Initialize line variables
var line highLine = na
var line lowLine = na
// Draw resistance line
if not na(highLevel)
if na(highLine)
highLine := line.new(x1=bar_index , y1=highLevel, x2=bar_index , y2=highLevel, width=2, color=color.red, extend=extendLines ? line.extend_right : line.none)
else
line.set_xy1(highLine, bar_index , highLevel)
line.set_xy2(highLine, bar_index , highLevel)
// Draw support line
if not na(lowLevel)
if na(lowLine)
lowLine := line.new(x1=bar_index , y1=lowLevel, x2=bar_index , y2=lowLevel, width=2, color=color.green, extend=extendLines ? line.extend_right : line.none)
else
line.set_xy1(lowLine, bar_index , lowLevel)
line.set_xy2(lowLine, bar_index , lowLevel)
// Visualization
plotshape(recentHigh == high , style=shape.triangleup, location=location.abovebar, color=color.red, size=size.small)
plotshape(recentLow == low , style=shape.triangledown, location=location.belowbar, color=color.green, size=size.small)
Shivali RSI Strategy with Entry, Stop Loss, and TargetTitle: 15-Min RSI Strategy with Entry, Stop Loss, and Target
This Pine Script is designed for traders who want to implement a strategy based on the Relative Strength Index (RSI) in the 15-minute timeframe. It helps identify potential buy and sell signals with clearly defined entry points, stop-loss levels, and profit targets.
Key Features:
RSI-Based Buy Condition:
A buy signal is generated when the 15-minute RSI crosses above the threshold of 60.
The entry price is set at the high of the crossover candle.
Stop loss is placed just below the low of the crossover candle.
A target profit is calculated using a 1:2 risk-reward ratio.
RSI-Based Sell Condition:
A sell signal is triggered when the 15-minute RSI crosses below the threshold of 40.
The entry price is set at the low of the crossover candle.
Stop loss is placed just above the high of the crossover candle.
A target profit is calculated using a 1:2 risk-reward ratio.
Visual Elements:
Buy Signals:
Entry level is plotted with a green line.
Stop loss is plotted with a red line.
Target level is plotted with a blue line.
A "BUY" label appears below the crossover candle.
Sell Signals:
Entry level is plotted with a red line.
Stop loss is plotted with a green line.
Target level is plotted with a blue line.
A "SELL" label appears above the crossover candle.
Customizable Parameters:
RSI length (default is 14).
RSI thresholds for buy (default is 60) and sell (default is 40).
Risk-reward ratio (default is 1:2).
How to Use:
Apply this script to your TradingView chart.
Set the chart to the 15-minute timeframe.
Wait for RSI-based buy or sell signals.
Use the visualized entry, stop-loss, and target lines to guide your trades.
This script is ideal for intraday traders looking for a systematic, RSI-based strategy with clear rules for entries, exits, and risk management.
ST, BB, VF Tablethis script allows you to use supertrend, bollinger bands and volume flow table all in one.
The Next Pivot [version by Vilas]Shows tentative projection of further movement of chart based on past historical chart patterns. It is always advisable to study other aspects of market and chart before taking any decision. May be applied on chart for information on your own risk.