Livelli di Sconto da All Time HighInspired by the philosophy of the discount buy, this indicator give the discount levels from all time. In the last times, in which there's a massive amount money flowing in the market due to massive use of etf. Ther usual metrics to buy assets are difficult to use. In my opinion, after a strong correction, the prices usualy goes up again, except for some strong macro event.
So, I hope this indicator could hepl, for some trending growing market, to help to take decisions for extra buy in pac/dca plan.
Penunjuk dan strategi
Monday High/LowShows Monday High and Low throughout the week with tags to the trendlines. Updates every Monday and shows the two values constantly.
Parabolic SARThe parabolic Sar allows market entries by exploiting the implied volatility of the cross
Asian Session Standard DeviationA configurable standard deviation indicator for showing the standard deviation from specific session times. Typically useful for measuring Asian session as setup for later sessions.
Wx Stop Loss BetaWx Stop Loss Beta is an adaptive stop-loss overlay intended for discretionary entry management in medium- to long-term trades. It integrates a volatility filter, support-based logic, and capital protection constraints.
• Manual Entry Price: User inputs their actual entry point
• Volatility Anchor: Stop-loss adjusts using ATR (customizable length and multiplier)
• Support Reference: Based on swing low over a configurable lookback period
• Loss Cap: Maximum allowable loss percentage from entry price (hard floor)
• Trailing Logic: Stop-loss only moves upward (never lowers), adapting to favorable price action
• Output: Displays a horizontal line at the stop-loss level and renders its value in the data window
Warning: This tool is experimental and has not been formally backtested. It is provided as-is for manual strategy enhancement. Use at your own discretion, and validate thoroughly in a paper or sandbox environment before relying on it in live trading. Feedback and critique are encouraged.
Daily Range % with Conditional SPX DirectionThis indicator visualizes the short-term market sentiment by combining the trend of the S&P 500 index (SPX) with daily price volatility (DP%).
Key Features:
Calculates a 5-period Exponential Moving Average (EMA) of SPX to detect trend direction:
Rising EMA → Uptrend
Falling EMA → Downtrend
Calculates a 5-period Simple Moving Average (SMA) of Daily Price Range % (DP%) to assess volatility trend:
Rising DP% → Increasing volatility
Falling DP% → Decreasing volatility
Background Colors:
Green: SPX trend up & volatility down → Bullish
Yellow:
SPX trend up & volatility up, or
SPX trend down & volatility down → Neutral
Red: SPX trend down & volatility up → Bearish
On-screen Labels:
Displays SPX trend direction (⬆️ / ⬇️)
Displays volatility direction (⬆️ / ⬇️)
Displays overall market sentiment: Bullish / Neutral / Bearish
This tool is designed to help traders quickly assess the relationship between trend and volatility, aiding in market environment analysis and discretionary trading decisions.
Automated Trading Session: New York KillzoneAutomated Trading Session: New York Killzone (Timezone & DST Aware)
This indicator tracks the New York Killzone session using intraday data and real-time timezone adjustments. It draws high/low boxes after the session ends and highlights the active session on your chart, making it ideal for traders focused on U.S. market volatility.
Key Features
Timezone & DST Support
Accurately reflects session timing based on your selected timezone and daylight saving settings.
Custom Session Input
Set your preferred New York Killzone hours (default: 08:00–09:30 New York time).
Visual Session Boxes
High/low ranges of the session are boxed on the chart for quick reference.
End-of-Session Alert
Get notified when the session closes, supporting both manual and automated workflows.
On-Chart Info Table
Displays active session time and timezone directly on the chart.
MarketCap_FreeFloatGive you market cap and free float instantly..
Considers TOTAL_SHARES_OUTSTANDING & FLOAT_SHARES_OUTSTANDING
Multiplies by
// Calculate metrics in crores
MarketCap = Outstanding * close
FreeFloat = free_float * close
Values are in INR (Crores)
Forex Sessions - Simple//@version=5
indicator("Forex Sessions - Simple", overlay=true)
// === INPUTS === //
showSydney = input.bool(true, "Show Sydney")
showTokyo = input.bool(true, "Show Tokyo")
showLondon = input.bool(true, "Show London")
showNY = input.bool(true, "Show New York")
// Color customization
colorSydney = input.color(color.new(color.blue, 70), "Sydney Color")
colorTokyo = input.color(color.new(color.orange, 70), "Tokyo Color")
colorLondon = input.color(color.new(color.green, 70), "London Color")
colorNY = input.color(color.new(color.red, 70), "New York Color")
// === SESSION LOGIC (UTC TIME) === //
sydneySession = showSydney and ((hour >= 22) or (hour < 7))
tokyoSession = showTokyo and (hour >= 0 and hour < 9)
londonSession = showLondon and (hour >= 8 and hour < 17)
nySession = showNY and (hour >= 13 and hour < 22)
// Determine active session (priority order: NY > London > Tokyo > Sydney)
sessionColor = color(na)
if nySession
sessionColor := colorNY
else if londonSession
sessionColor := colorLondon
else if tokyoSession
sessionColor := colorTokyo
else if sydneySession
sessionColor := colorSydney
// === BACKGROUND COLOR === //
bgcolor(sessionColor, title="Session Highlight")
// === SESSION LEGEND === //
var table legend = table.new(position.top_right, 1, 5, border_width=1)
if bar_index == 0
table.cell(legend, 0, 0, "Sessions", bgcolor=color.gray, text_color=color.white)
table.cell(legend, 0, 1, "Sydney", bgcolor=colorSydney)
table.cell(legend, 0, 2, "Tokyo", bgcolor=colorTokyo)
table.cell(legend, 0, 3, "London", bgcolor=colorLondon)
table.cell(legend, 0, 4, "New York", bgcolor=colorNY)
BTC EMA+RSI Strong Signals//@version=5
indicator("BTC EMA+RSI Strong Signals", overlay=true)
ema100 = ta.ema(close, 100)
ema200 = ta.ema(close, 200)
rsi = ta.rsi(close, 14)
// Фильтры тренда
isUptrend = ema100 > ema200
isDowntrend = ema100 < ema200
// Условия входа
longCondition = isUptrend and ta.crossover(close, ema100) and rsi < 30
shortCondition = isDowntrend and ta.crossunder(close, ema100) and rsi > 70
// TP/SL
tpLong = close * 1.025
slLong = close * 0.985
tpShort = close * 0.975
slShort = close * 1.015
// Отображение
plot(ema100, color=color.orange, title="EMA 100")
plot(ema200, color=color.red, title="EMA 200")
plot(longCondition ? tpLong : na, title="TP LONG", color=color.green)
plot(longCondition ? slLong : na, title="SL LONG", color=color.red)
plot(shortCondition ? tpShort : na, title="TP SHORT", color=color.green)
plot(shortCondition ? slShort : na, title="SL SHORT", color=color.red)
// Метки сигнала
plotshape(longCondition, location=location.belowbar, color=color.green, style=shape.labelup, text="LONG")
plotshape(shortCondition, location=location.abovebar, color=color.red, style=shape.labeldown, text="SHORT")
// Alertconditions
alertcondition(longCondition, title="BTC LONG", message='BTC LONG сигнал по цене {{close}}')
alertcondition(shortCondition, title="BTC SHORT", message='BTC SHORT сигнал по цене {{close}}')
// Webhook Alerts
if longCondition
alert('{"chat_id": "@exgosignal", "text": "BTC LONG сигнал по цене ' + str.tostring(close) + ' (TP +2.5%, SL -1.5%)"}', alert.freq_once_per_bar_close)
if shortCondition
alert('{"chat_id": "@exgosignal", "text": "BTC SHORT сигнал по цене ' + str.tostring(close) + ' (TP +2.5%, SL -1.5%)"}', alert.freq_once_per_bar_close)
if close >= tpLong
alert('{"chat_id": "@exgosignal", "text": "BTC LONG: цель достигнута по цене ' + str.tostring(close) + '"}', alert.freq_once_per_bar_close)
if close <= slLong
alert('{"chat_id": "@exgosignal", "text": "BTC LONG: сработал стоп по цене ' + str.tostring(close) + '"}', alert.freq_once_per_bar_close)
if close <= tpShort
alert('{"chat_id": "@exgosignal", "text": "BTC SHORT: цель достигнута по цене ' + str.tostring(close) + '"}', alert.freq_once_per_bar_close)
if close >= slShort
alert('{"chat_id": "@exgosignal", "text": "BTC SHORT: сработал стоп по цене ' + str.tostring(close) + '"}', alert.freq_once_per_bar_close)
Directional Movement Index (DMI) + AlertsThis is a Study with associated visual indicators and Bullish/Bearish Alerts for Directional Movement (DMI). It consists of an Average Directional Index (ADX), Plus Directional Indicator (+DI) and Minus Directional Indicator (-DI).
Published by J. Welles Wilder in 1978 for use with currencies and commodities which are typically more volatile than stocks and have stronger trends.
Development Notes
---------------------------
This indicator, and most of the descriptions below, were derived largely from the TradingView reference manual. Feedback and suggestions for improvement are more than welcome, as well are recommended Input settings and best practices for use.
tradingview.com/chart/?solution=43000502250
Strategy Description
---------------------------
ADX defines whether or not there is a trend present; +DI and -DI compliment the ADX by taking direction into account. An ADX above 25 indicates a strong trend, and a Bullish alert is subsequently triggered when +DI is above -DI and a Bearish alert when -DI is above +DI.
Note that the Bullish or Bearish crossover alert will only trigger if ADX is simultaneously above 25 during the crossover event. If ADX later rises to 25 and +DI is still greater than -DI, or -DI greater than +DI, then a delayed alert will not trigger by design.
Basic Use
---------------------------
Acceptable DMI values are up to the trader's interpretation and may change depending on the financial instrument being examined. Recommend not changing any default values without being first familiar with their purpose and impact on the indicator at large.
Confidence in price action and trend is higher when two or more indicators are in agreement -- therefore we recommend not using this indicator by itself to determine entry or exit trade opportunities.
Recommend also choosing 'Once Per Bar Close' when creating alerts.
Inputs
---------------------------
ADX Smoothing - the time period to be used in calculating the ADX which has a smoothing component (14 is the Default).
DI Length - the time period to be used in calculating the DI (14 is the Default).
Key Level - any trade with the ADX above the key level is a strong indicator that it is trending (23 to 25 is the suggested setting).
Sensitivity - an incremental variable to test whether the past n candles are in the same bullish or bearish state before triggering a delayed crossover alert (3 is the Default). Filter out some noise and reduces active alerts.
Show ADX Option - two visual styles are provided for user preference, a visible ADX line or a background overlay (green or red when ADX is above the key level, for bullish or bearish, and gray when below).
Color Candles - an option to transpose the bullish and bearish crossovers to the main candle bars. Can be turned off in the Style Tab by deselecting 'Bar Colors'. Dark blue is bullish, dark purple is bearish, and the black inner color is neutral. Note that the outer red and green border will still be distinguished by whether each individual candle is bearish or bullish during the specified timeframe.
Indicator Visuals
---------------------------
Bullish or Bearish plot based on DMI strategy (ADX and +/-DI values).
Visual cues are intended to improve analysis and decrease interpretation time during trading, as well as to aid in understanding the purpose of this study and how its inclusion can benefit a comprehensive trading strategy.
Trend Strength
---------------------------
To analyze trend strength, the focus should be on the ADX line and not the +DI or -DI lines. An ADX reading above 25 indicates a strong trend, while a reading below 20 indicates a weak or non-existent trend. A reading between those two values would be considered indeterminable. Though what is truly a strong trend or a weak trend depends on the financial instrument being examined; historical analysis can assist in determining appropriate values.
Bullish DI Cross
---------------------------
1. ADX must be over 25 (strong trend) (value is determined by the trader)
2. +DI cross above -DI
3. Set Stop Loss at the current day's low (any +DI cross-backs below -DI should be ignored)
4. Set trailing stop if ADX strengthens (i.e., signal rises)
Bearish DI Cross
---------------------------
1. ADX must be over 25 (strong trend) (value is determined by the trader)
2. -DI cross above +DI
3. Set Stop Loss at the current day's high (any -DI cross-backs below +DI should be ignored)
4. Set trailing stop if ADX strengthens (i.e., signal rises)
Disclaimer
---------------------------
This post and the script are not intended to provide any financial advice. Trade at your own risk.
No known repainting.
Version 1.1
-------------------------
- Added multi-timeframe resolution using PineCoders secure security function to eliminate repainting.
- Cleaned up option for selecting ADX view; and added a colored line as a choice, based on same bullish, bearish, or neutral colors as the background.
- Added exit crossover indicator to aid in an overall strategy development. This ability pairs better with my CHOP Zone Entry Strategy which relies on DMI Exits. Note that exit conditions don't employ the sensitivity variable. Green labels are for Bullish exits and red are for Bearish.
-- Exit condition is triggered if in an active Bullish or Bearish position and ADX drops below 25, Or if either the -DI crosses above +DI (for previously Bullish) or +DI crosses above -DI (for previously Bearish).
- Added reverse position determination. Triggers when a Bullish entry occurs on the same candle as a Bearish exit, or vice versa. Green labels are for Bullish reverses and red are for Bearish.
- Added selectable option to choose visible labels -- Bearish, Bullish, Both, Exits, Reverses, or All.
-- Note that a reverse label will only show if the opposing entry and exit labels are set to show, otherwise the reverse will revert to the appropriate entry or exit on the chart.
- Added alerts to account for new conditions.
-- Note that alerts for crossovers, exits, and reverses will only be triggered if the associated labels are selected to be shown (i.e., what you choose to see on the chart is what you will be alerted to).
Version 1.2
-------------------------
- Changed exit condition to be decided on by whether ADX is below 25 and on a +/-DI crossover. Versus being either or. The previous version had too many false triggers. This variety can now show multiple Bullish or Bearish alerts before an Exit condition too. I'm tempted to simply make this condition based on ADX, and not DI … thoughts? See lines 138 and 139.
- Updated the Background view to have deeper shades of colors dependent upon the ADX trend strength.
- Added an Oscillator view for the ADX and momentum computations to color the histogram by trend. DI lines are hidden.
-- If ADX is Bullish, then the oscillator is colored light green in an uptrend and dark green in a downtrend; if Bearish, then its light red in an uptrend and dark redin a downtrend; if adx is below key level, then it is light gray in a downtrend and dark grey in the uptrend.
- Added option to Hide ADX in case only the Directional lines are desired. This could be useful if you would like to have the ADX oscillator in one panel and +/-DI crossovers in another.
- Added a Columnar view for the ADX. DI lines are hidden. This view is really simple and compact, with the trend strength still easily understood. Colors are the same as for the oscillator -- the deeper the shade of green or red, then the higher the ADX trend strength level.
- Added a Trend Strength label.
ADX Trend Strength Trade (Y/N) Setup Types
0 to 10 = Barely Breathing N N/A
10 to 20 = Weak Trend Y Range/Pre-Breakout
20 to 30 = Potentially Starting to Trend Y Early Stage Trend
30 to 50 = Strong Trend Y Ride the Wave
50 to 75 = Very Strong Trend N Exhaustion
75 to 100 = Extremely Strong Trend N N/A
Version 1.3
-------------------------
Updated to Pine Script v5 to resolve errors from the deprecated v4 version.
This is a reissue of a previously published script that was hidden due to a v4 compatibility issue.
'https://www.tradingview.com/script/9OoEHrv5-Directional-Movement-Index-DMI-Alerts/'
Distance from 52-week LowYou will see a % line showing distance from 52 week low.
Colour changes:
Green if price is within 10% up from 52 week low
Orange if price is between 10% to 25% up from 52 week low
Red if price is more than 25% up from 52 week low.
Hourly FVG/iFVG ZoneMacros Price Delivery
Note: Determine short time bias and enter for a 30 40 handles runs to the minor liquidity or FVG
2x 200MAThis indicator plots the 200-period Moving Average (SMA or EMA) and a line that represents 2x the value of the 200MA. You can switch between SMA and EMA from the settings panel.
Инвертированный мультиактивный индекс страха и жадностиWhat is the opposite of fear and greed? Correct, love.
The idea of an indicator is that if you take indexes of fear and greed for the top 3 corellated assets with the current one and weight the result by the index of corellations, you can see 2 things.
one is tops and bottoms of an assets movements as measured by the inverted fear and greed index,
and the other is that you can see the cycles of when the asset gets corellated and de-corellated, becoming stronger or weaker then the corellated asset's index.
Turn off the average blue line in settings - it's useless.
Cheers, love
Eugene
MAD_MacD_MTFThis is educational purpose only but not a financial advise. Script modified on top Chris Moody.
Key Levels SpacemanBTC IDWMThe Key Level Indicator for TradingView is a powerful tool designed to automatically identify and display critical price levels where significant market reactions have historically occurred. These levels include previous highs and lows, session opens, closes, midpoints, and custom support/resistance zones based on user-defined criteria. The indicator helps traders pinpoint areas of potential liquidity, breakout zones, and high-probability reversal or continuation setups. With customizable styling, real-time updates, and multi-timeframe support, this indicator is ideal for scalpers, day traders, and swing traders looking to enhance their technical analysis with clearly marked, actionable price levels.
Sector 50MA vs 200MA ComparisonThis TradingView indicator compares the 50-period Moving Average (50MA) and 200-period Moving Average (200MA) of a selected market sector or index, providing a visual and analytical tool to assess relative strength and trend direction. Here's a detailed breakdown of its functionality:
Purpose: The indicator plots the 50MA and 200MA of a chosen sector or index on a separate panel, highlighting their relationship to identify bullish (50MA > 200MA) or bearish (50MA < 200MA) trends. It also includes a histogram and threshold lines to gauge momentum and key levels.
Inputs:
Resolution: Allows users to select the timeframe for calculations (Daily, Weekly, or Monthly; default is Daily).
Sector Selection: Users can choose from a list of sectors or indices, including Tech, Financials, Consumer Discretionary, Utilities, Energy, Communication Services, Materials, Industrials, Health Care, Consumer Staples, Real Estate, S&P 500 Value, S&P 500 Growth, S&P 500, NASDAQ, Russell 2000, and S&P SmallCap 600. Each sector maps to specific ticker pairs for 50MA and 200MA data.
Data Retrieval:
The indicator fetches closing prices for the 50MA and 200MA of the selected sector using the request.security function, based on the chosen timeframe and ticker pairs.
Visual Elements:
Main Chart:
Plots the 50MA (blue line) and 200MA (red line) for the selected sector.
Fills the area between the 50MA and 200MA with green (when 50MA > 200MA, indicating bullishness) or red (when 50MA < 200MA, indicating bearishness).
Threshold Lines:
Horizontal lines at 0 (zero line), 20 (lower threshold), 50 (center), 80 (upper threshold), and 100 (upper limit) provide reference points for the 50MA's position.
Fills between 0-20 (green) and 80-100 (red) highlight key zones for potential overbought or oversold conditions.
Sector Information Table:
A table in the top-right corner displays the selected sector and its corresponding 50MA and 200MA ticker symbols for clarity.
Alerts:
Generates alert conditions for:
Bullish Crossover: When the 50MA crosses above the 200MA (indicating potential upward momentum).
Bearish Crossover: When the 50MA crosses below the 200MA (indicating potential downward momentum).
Use Case:
Traders can use this indicator to monitor the relative strength of a sector's short-term trend (50MA) against its long-term trend (200MA).
The visual fill between the moving averages and the threshold lines helps identify trend direction, momentum, and potential reversal points.
The sector selection feature allows for comparative analysis across different market segments, aiding in sector rotation strategies or market trend analysis.
This indicator is ideal for traders seeking to analyze sector performance, identify trend shifts, and make informed decisions based on moving average crossovers and momentum thresholds.
XAUUSA Sniping SMA by Time/Trend with BBPT trend alignmentThis indicator is designed to trade XAUUSD and has defaults set during the hours (Central Time) that gold usually falls and when it usually rises. Using the input form defaults and a 1 to 3 minute timeframe on your chart is best. Don't take trades during the no-trade times (white line) and do trade when the line changes to either green or red. The first few bars going with the trend are high probability but as the trend fades the line will change to orange (caution signal) when the trend is likely over for the moment. This indicator is best used with the BBPT indicator that shows bull/bear strength. When the BBPT trend line is rising, pair with the green line in this indicator and when the BBPT trend is falling pair with the red line in this indicator for some high probability trades.
NY Open Market Condition Analyzer – TTR & RINY Open Market Condition Analyzer – TTR & RI (Dynamic Edition)
Built for MNQ/NQ scalpers using 1-minute charts , this upgraded analyzer continuously reevaluates structural quality during the NY Open, and now includes optional divergence detection between MNQ and MES.
📊 Core Strategy Filters
TTR = Total Trading Range (2:00–6:30AM PST premarket movement)
RI = Reactive Impulse (body of current 5-min candle)
VWAP Clearance = Confirms directional momentum
VWAP Slope Alignment = Confirms trend context (optional)
MNQ/MES Divergence Filter = Detects structural disagreement (optional)
🎯 Primary Objective
This tool helps you:
Avoid low-conviction sessions and false breakouts
React to structure as it evolves between 6:30–8:30AM PST
Confirm ideal trading windows based on clear, aligned structure
✅ Features
🔁 Dynamic Evaluation Logic
Starts at 6:34AM PST (after first 5-min bar)
Reevaluates every 5 minutes until 8:30AM PST
Signal (GOOD or SKIP) updates dynamically based on latest structure
Once structure improves, you'll know — in real-time
📊 Condition Checks
Premarket Range ≥ threshold (default: 15 pts)
5-min Candle Body ≥ threshold (default: 10 pts)
Distance from VWAP ≥ threshold (default: 5 pts)
VWAP Slope alignment (optional)
MNQ/MES Directional Divergence (optional)
📋 Visual Output
📦 Icon above bar for every 5-min window
🏷 Label displays “GOOD SETUP” or “SKIP”
📊 Dashboard panel shows:
- Premarket Range
- 5-min Candle Size
- VWAP Distance
- VWAP Slope Status
- Divergence Check Result
- Final Verdict
🛠️ Configurable Settings
Minimum Range / Candle / VWAP thresholds
Toggle VWAP Slope Filter
Toggle MNQ/MES Divergence Filter
Custom Colors for:
- GOOD/Skip Session
- Divergence Alert
- Dashboard Panel
🔔 How to Add the Alert
Load on a 1-minute MNQ chart
Click the Alerts tab (🔔 icon)
Click + Create Alert
Condition: NY Open Market Condition Analyzer – TTR & RI → Good Setup Alert
Set to: “Only Once Per Bar Close”
🧪 Best For
Scalpers trading 10–30 pt MNQ/NQ setups
Traders filtering out low-structure sessions (especially Mondays & Fridays)
Discretionary traders who want real-time structure confirmation
🧠 Pro Tip
Pair with:
Opening Range Breakout strategies
Session VWAP
Pre-market S/R zones
MAS Capital RI confirmation for trade entry
This tool adapts with the market — because setups aren’t static, and neither is your edge.
SPX Intraday Call SignalThis indicator identifies intraday SPX call option trade setups based on a simple trend and momentum strategy. It detects when the 9-period EMA crosses above the 21-period EMA (bullish momentum) while price is trading above the VWAP (confirming intraday bullish bias) and the RSI (14) is above 55 (confirming momentum strength). The indicator is designed to trigger only during a defined trading window between 9:45 AM and 11:30 AM ET and plots a signal only once per day (the first valid setup) to avoid overtrading. It also includes alert conditions for automated notifications when a valid setup is detected.
Yosef26 - Weighted Decision Model//@version=5
indicator("Yosef26 - Weighted Decision Model", overlay=true)
// === Moving Averages ===
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
ema100 = ta.ema(close, 100)
// === Candle Components ===
priceRange = high - low
body = math.abs(close - open)
upperWick = high - math.max(close, open)
lowerWick = math.min(close, open) - low
volSMA = ta.sma(volume, 20)
// === Volume Momentum (3-day uptrend) ===
volUp3 = (volume > volume ) and (volume > volume )
// === Candlestick Pattern Detection ===
bullishEngulfing = (close < open ) and (close > open) and (close > open ) and (open < close )
bearishEngulfing = (close > open ) and (close < open) and (close < open ) and (open > close )
doji = body < (priceRange * 0.1)
hammer = (lowerWick > body * 2) and (upperWick < body) and (close > open)
shootingStar = (upperWick > body * 2) and (lowerWick < body) and (close < open)
// === Support/Resistance Zones ===
atSupport = low <= ta.lowest(low, 5)
atResistance = high >= ta.highest(high, 5)
// === Scoring System for Entry ===
entryScore = 0
entryScore := entryScore + (bullishEngulfing ? 3 : 0)
entryScore := entryScore + (hammer ? 2 : 0)
entryScore := entryScore + (volUp3 ? 1 : 0)
entryScore := entryScore + ((volume > volSMA) ? 2 : 0)
entryScore := entryScore + ((close > ema20 or close > ema50) ? 1 : 0)
entryScore := entryScore + (atSupport ? 2 : 0)
entryScore := entryScore + ((close > close ) ? 1 : 0)
// === Scoring System for Exit ===
exitScore = 0
exitScore := exitScore + (bearishEngulfing ? 3 : 0)
exitScore := exitScore + (shootingStar ? 2 : 0)
exitScore := exitScore + (doji ? 1 : 0)
exitScore := exitScore + ((volume < volSMA * 1.1) ? 1 : 0)
exitScore := exitScore + ((close < ema50) ? 1 : 0)
exitScore := exitScore + (atResistance ? 2 : 0)
exitScore := exitScore + ((close < close ) ? 1 : 0)
// === Decision Thresholds ===
entryCond = (entryScore >= 7)
exitCond = (exitScore >= 6)
// === Position Tracking ===
var bool inPosition = false
var int barsInPosition = 0
var label entryLabel = na
var label exitLabel = na
if entryCond and not inPosition
inPosition := true
barsInPosition := 0
entryLabel := label.new(bar_index, close, "Entry @" + str.tostring(close), style=label.style_label_up, color=color.green, textcolor=color.white)
if inPosition
barsInPosition += 1
if exitCond
inPosition := false
barsInPosition := 0
exitLabel := label.new(bar_index, close, "Exit @" + str.tostring(close), style=label.style_label_down, color=color.red, textcolor=color.white)
// === Alerts ===
alertcondition(entryCond, title="Entry Alert", message="Yosef26: Entry Signal (Scored Decision)")
alertcondition(exitCond, title="Exit Alert", message="Yosef26: Exit Signal (Scored Decision)")