LL Moving Averages with Controlled Price LabelsThis is an indicator for two user-defined moving averages, with default settings of 10 and 100 periods. It includes labels for buy and sell signals at key crossover points. With a label indicating a price increase of 100 points from the buy entry or a decrease of 100 points from the sell entry. The label will say "+100" or "-100" when these conditions are met.
Indicateurs et stratégies
Optimized Algo Trading with Stop Loss, Target & Trailing SLOptimized Algo Trading with Stop Loss, Target & Trailing SL chat gpt created
BODY WICK OF HIGHER TIME CANDLEDenotes the level of open and close of the body of the candle formed on a higher timeframe between the red and green dots with the line as the body, above the green is the upper shadow, and below the red is the lower shadow.
BaseLibrary "Base"
n_atr(source, length)
Parameters:
source (float)
length (simple int)
xma(ma_type, source, length)
Parameters:
ma_type (string)
source (float)
length (simple int)
EMA + MACD Strategy//@version=5
indicator("EMA + MACD Strategy", overlay=true)
// EMA 설정
ema50 = ta.ema(close, 50)
ema200 = ta.ema(close, 200)
// MACD 설정
= ta.macd(close, 12, 26, 9)
// 매매 신호
goldenCross = ta.crossover(ema50, ema200)
deathCross = ta.crossunder(ema50, ema200)
macdBuy = ta.crossover(macdLine, signalLine)
macdSell = ta.crossunder(macdLine, signalLine)
// 차트에 표시
plot(ema50, title="EMA 50", color=color.blue)
plot(ema200, title="EMA 200", color=color.red)
// 매수/매도 신호
plotshape(goldenCross, location=location.belowbar, color=color.green, style=shape.labelup, title="Golden Cross")
plotshape(deathCross, location=location.abovebar, color=color.red, style=shape.labeldown, title="Death Cross")
plotshape(macdBuy, location=location.belowbar, color=color.green, style=shape.triangleup, title="MACD Buy")
plotshape(macdSell, location=location.abovebar, color=color.red, style=shape.triangledown, title="MACD Sell")
3 Trading SessionsValutazione della volatilità in pips delle 3 Sessioni di mercato principali (Asia / Europa /America) su base oraria.
Combined Indicator (Session, 3EMAs, Engulfing Candles)The Indicator combines session highlights, EMA indicators, and engulfing candle detection. It visually marks major forex sessions with background colors, plots three EMAs (9, 21, 50), and identifies bullish/bearish engulfing candles with alerts. Perfect for trend analysis and session-based trading insights!
Features:
✅ Session Highlights: Marks major forex sessions (London, New York, Tokyo, Sydney) with transparent background colors for easy visualization.
✅ EMA Indicators: Plots three Exponential Moving Averages (EMAs) (9, 21, 50) to help identify trends and potential reversals.
✅ Engulfing Candle Detection: Detects bullish and bearish engulfing patterns, plotting visual markers (triangles) on the chart.
✅ Alerts: Triggers notifications when an engulfing pattern appears, helping traders act quickly.
This script is ideal for traders who want to analyze trends, spot key price action patterns, and navigate different market sessions effectively!
NTS Forex (NewStrategy) //@version=5
indicator('NTS Forex (NewStrategy) ',overlay = true)
//---------------------- Engulfing ------------------------------
//barcolor(open > close ? close > open ? close >= open ? close >= open ? close - open > open - close ? color.yellow :na :na : na : na : na)
//-----------------------------------------------------------------
var timeF = timeframe.period
getResolution(tf) =>
switch tf
'1' => '3'
'3' => '5'
'5' => '15'
'15'=> '15'
'30'=> '45'
'45'=> '60'
'60'=> '120'
'120'=> '180'
'180'=> '240'
'240'=> 'D'
'D'=> 'W'
'W'=> 'M'
var atrP = 10
var atrF = 5
res = getResolution(timeF)
trailType = input.string('modified', 'Trailtype', options= )
var int ATRPer = 0
var int ATRFac = 0
if timeF == '45'
ATRPer := 12
ATRFac := 12
else if timeF == '15'
ATRPer := 9
ATRFac := 9
else
ATRPer := 7
ATRFac := 7
manualFts = input.bool(false, title = 'use manual FTS')
ATRPeriod = manualFts ? input.int(15, title = 'ATRPeriod') : ATRPer
ATRFactor = manualFts ? input.int(15, title = 'ATRFactor') : ATRFac
var testTable = table.new(position=position.bottom_left, columns=2, rows=4, bgcolor=color.new(color.gray,50), border_width=2, border_color=color.black)
if barstate.islast
table.cell(testTable, 0, 0, 'Chart Time',text_color = color.red,text_size = size.small)
table.cell(testTable, 1, 0, timeF,text_color = color.green,text_size = size.small)
table.cell(testTable, 0, 1, 'NTS Time',text_color = color.red,text_size = size.small)
table.cell(testTable, 1, 1, res,text_color = color.green,text_size = size.small)
table.cell(testTable, 0, 2, 'ATRPeriod',text_color = color.red,text_size = size.small)
table.cell(testTable, 1, 2, str.tostring(ATRPeriod),text_color = color.green,text_size = size.small)
table.cell(testTable, 0, 3, 'ATRFactor',text_color = color.red,text_size = size.small)
table.cell(testTable, 1, 3, str.tostring(ATRFactor),text_color = color.green,text_size = size.small)
norm_o = request.security(ticker.new(syminfo.prefix, syminfo.ticker), res, open)
norm_h = request.security(ticker.new(syminfo.prefix, syminfo.ticker), res, high)
norm_l = request.security(ticker.new(syminfo.prefix, syminfo.ticker), res, low)
norm_c = request.security(ticker.new(syminfo.prefix, syminfo.ticker), res, close)
Wild_ma(_src, _malength) =>
_wild = 0.0
_wild := nz(_wild ) + (_src - nz(_wild )) / _malength
_wild
/////////// TRUE RANGE CALCULATIONS /////////////////
HiLo = math.min(norm_h - norm_l, 1.5 * nz(ta.sma(norm_h - norm_l, ATRPeriod)))
HRef = norm_l <= norm_h ? norm_h - norm_c : norm_h - norm_c - 0.5 * (norm_l - norm_h )
LRef = norm_h >= norm_l ? norm_c - norm_l : norm_c - norm_l - 0.5 * (norm_l - norm_h)
trueRange = trailType == 'modified' ? math.max(HiLo, HRef, LRef) : math.max(norm_h - norm_l, math.abs(norm_h - norm_c ), math.abs(norm_l - norm_c ))
loss = ATRFactor * Wild_ma(trueRange, ATRPeriod)
Up = norm_c - loss
Dn = norm_c + loss
TrendUp = Up
TrendDown = Dn
Trend = 1
TrendUp := norm_c > TrendUp ? math.max(Up, TrendUp ) : Up
TrendDown := norm_c < TrendDown ? math.min(Dn, TrendDown ) : Dn
Trend := norm_c > TrendDown ? 1 : norm_c < TrendUp ? -1 : nz(Trend , 1)
trail = Trend == 1 ? TrendUp : TrendDown
ex = 0.0
ex := ta.crossover(Trend, 0) ? norm_h : ta.crossunder(Trend, 0) ? norm_l : Trend == 1 ? math.max(ex , norm_h) : Trend == -1 ? math.min(ex , norm_l) : ex
state = Trend == 1 ? 'long' : 'short'
fib1Level = 61.8
fib2Level = 78.6
fib3Level = 88.6
f1 = ex + (trail - ex) * fib1Level / 100
f2 = ex + (trail - ex) * fib2Level / 100
f3 = ex + (trail - ex) * fib3Level / 100
l100 = trail + 0
Fib1 = plot(f1, 'Fib 1', style=plot.style_line, color=color.new(#ff7811, 0))
Fib2 = plot(f2, 'Fib 2', style=plot.style_line, color=color.new(color.gray, 0))
Fib3 = plot(f3, 'Fib 3', style=plot.style_line, color=color.new(#00ff3c, 0))
L100 = plot(l100, 'l100', style=plot.style_line, color=color.rgb(120, 123, 134))
fill(Fib3, L100, color=state == 'long' ? color.new(#00eaff, 12) : state == 'short' ? #ff5280e9 : na)
changcDir = ta.cross(f3,l100)
alertcondition(changcDir, title="Alert: FTS Direction Change", message="FTS has changed direction!")
l1 = state == "long" and ta.crossunder(norm_c, f1 )
l2 = state == "long" and ta.crossunder(norm_c, f2 )
l3 = state == "long" and ta.crossunder(norm_c, f3 )
s1 = state == "short" and ta.crossover(norm_c, f1 )
s2 = state == "short" and ta.crossover(norm_c, f2 )
s3 = state == "short" and ta.crossover(norm_c, f3 )
atr = ta.sma(trueRange, 14)
//////////// FIB ALERTS /////////////////////
alertcondition(l1, title = "cross over Fib1", message = "Price crossed below Fib1 level in long trend")
alertcondition(l2, title = "cross over Fib2", message = "Price crossed below Fib2 level in long trend")
alertcondition(l3, title = "cross over Fib3", message = "Price crossed below Fib3 level in long trend")
alertcondition(s1, title = "cross under Fib1", message = "Price crossed above Fib1 level in short trend")
alertcondition(s2, title = "cross under Fib2", message = "Price crossed above Fib2 level in short trend")
alertcondition(s3, title = "cross under Fib3", message = "Price crossed above Fib3 level in short trend")
alertcondition(fixnan(f1)!=fixnan(f1 ), title = "Stop Line Change", message = "Stop Line Change")
Pin Bar Detector (open)The Pin Bar Detector script is designed to identify and highlight pin bars (reversal candles) on a price chart. It scans for bullish and bearish pin bars based on wick-to-body ratio, candle size, and price structure.
🔹 Features & How It Works
✅ Detects Both Bullish & Bearish Pin Bars
Bullish Pin Bar (Hammer): Long lower wick, small body near the top, and little to no upper wick.
Bearish Pin Bar (Shooting Star): Long upper wick, small body near the bottom, and little to no lower wick.
✅ Wick-to-Body Ratio Calculation
The wick must be at least 2x the size of the body to be considered a valid pin bar.
The script dynamically checks if the upper or lower wick dominates the candle to classify it.
✅ Key Level Filtering (Optional)
The script can be modified to only detect pin bars at VWAP, 50 EMA, Support/Resistance, or First 15-Min High/Low for stronger trade signals.
✅ Customizable Inputs
Users can adjust the minimum wick-to-body ratio to refine detection.
Option to show/hide pin bars that form in choppy or sideways markets.
✅ Pin Bar Confirmation (Optional)
Can include a volume filter to detect pin bars with significant market participation.
Can add ATR confirmation to check if the pin bar forms during high volatility periods.
🔹 How to Use It in Your Trading
1️⃣ Enable the script on your chart to automatically highlight pin bars.
2️⃣ Wait for confirmation (volume spike or key level rejection) before entering a trade.
3️⃣ Use stop-loss below/above the pin bar wick to control risk.
4️⃣ Target key resistance/support levels for take-profit.
🔹 Final Thoughts
Pin bars are powerful reversal signals, but they work best at strong support/resistance zones with volume confirmation.
This script helps eliminate false pin bars by ensuring the wick-to-body ratio is valid.
Can be combined with VWAP, 50 EMA, and ATR to create a high-probability trading system.
Multi EMA + SR Channels + Timer v1An advanced technical analysis indicator, inspired by Fastbull, that combines multiple Exponential Moving Averages (EMAs), Support/Resistance channels, and a precision candle timer. This indicator is designed to provide traders with a comprehensive view of trend direction, potential reversal zones, and precise timing for trade execution.
RSI, MACD, Volume, BB Buy Sell Signals (From Deepseek)Mean Reversion strategy combines all the prevelant indicators and just give you a buy and sell signal. The conditions are very tight only to abstain the noise.
5 EMAs GAG IndicatorDescription:
This indicator plots five Exponential Moving Averages (EMAs) on your chart, providing a dynamic view of price trends over different timeframes. By default, the EMAs are set to periods 9, 20, 50, 100, and 200, each with its own color (blue, red, orange, teal, and navy respectively). However, both the period values and the colors are fully customizable through the indicator's settings.
Key Features:
Five Customizable EMAs: Quickly visualize different trend lengths with five EMAs. The default periods are 9, 20, 50, 100, and 200.
Customizable Appearance: Change the colors of each EMA line to suit your chart style and preferences.
User-Friendly: Easily adjust the EMA periods directly in the indicator settings to tailor the analysis to your trading strategy.
Overlay on Main Chart: The EMAs are plotted directly on the price chart for easy visual correlation with price movements.
Usage:
Add the indicator to your TradingView chart.
Open the indicator’s settings panel to adjust the EMA periods and colors as needed.
Use the different EMA lines to help identify trends, support/resistance levels, and potential reversals.
Relative Strength Comparison HoneyThis helps to compare strength on quantum basis of different asset class
Smartfox: DEMA50 + DEMA200 + MSS + OB What does this script do?
1. It looks for a Market Structure Shift after a breakout of the DEMA50.
2. The breakout must have a full candle close above or below the DEMA50.
3. As additional confirmation, the script checks for an Order Block.
4. If these conditions are met, an orange (bearish) or blue (bullish) signal is displayed.
5. If all the above conditions are met plus a breakout of the DEMA200, a red (bearish) or green (bullish) signal is displayed.
How do I use this script?
Through my testing, I have noticed the significant role of DEMA50 and DEMA200. The price often returns to these levels for a retest and frequently uses them as support or resistance. The above rules serve as additional confirmation for a solid trade. I use it as follows:
1. Draw support and resistance lines on higher timeframes, typically the 1-hour and 4-hour charts.
2. Look for the displayed signals on the 15-minute timeframe when the price reaches these key levels.
3. Check if there is an open GAP and determine whether a retest of the DEMA50 is likely to occur.
4. For blue and orange signals, I take a scalp trade toward the next support or resistance level.
5. For red or green signals, I also consider a swing trade, as the reversal is now confirmed by both the DEMA50 and DEMA200.
Of course, there are no guarantees of success, but this method has shown a proven track record when following these rules. 🚀📈
3x Supertrend (for Vietnamese stock market and vn30f1m)The 4Vietnamese 3x Supertrend Strategy is an advanced trend-following trading system developed in Pine Script™ and designed for publication on TradingView as an open-source strategy under the Mozilla Public License 2.0. This strategy leverages three Supertrend indicators with different ATR lengths and multipliers to identify optimal trade entries and exits while dynamically managing risk.
Key Features:
Option to build and hold long term positions with entry stop order. Try this to avoid market complex movement and retain long term investment style's benefits.
Advanced Entry & Exit Optimization: Includes configurable stop-loss mechanisms, pyramiding, and exit conditions tailored for different market scenarios.
Dynamic Risk Management: Implements features like selective stop-loss activation, trade window settings, and closing conditions based on trend reversals and loss management.
This strategy is particularly suited for traders seeking a systematic and rule-based approach to trend trading. By making it open-source, we aim to provide transparency, encourage community collaboration, and help traders refine and optimize their strategies for better performance.
License:
This script is released under the Mozilla Public License 2.0, allowing modifications and redistribution while maintaining open-source integrity.
Happy trading!