Candle Close TableChecks the previous closes of Daily H4 and H1 candles to give you an idea where the momentum should take us.
Candlestick analysis
Dynamic 200 EMA with Trend-Based ColoringDescription:
This script plots the 200-period Exponential Moving Average (EMA) and dynamically changes its color based on the trend direction. The script helps traders quickly identify whether the price is above or below the 200 EMA, which is widely used as a long-term trend indicator.
How It Works:
The script calculates the 200 EMA based on the closing price.
If the price is above the EMA, it suggests a bullish trend, and the EMA line turns green.
If the price is below the EMA, it suggests a bearish trend, and the EMA line turns red.
An optional background color is added to enhance visual clarity, highlighting the current trend direction.
Use Cases:
Trend Confirmation: Helps traders determine if the overall trend is bullish or bearish.
Support and Resistance: The 200 EMA is often used as dynamic support/resistance.
Entry & Exit Signals: Traders can use crossovers with the 200 EMA as potential trade signals.
This script is designed for traders looking for a simple yet effective way to incorporate trend visualization into their charts. It is fully open-source and can be customized to fit individual trading strategies.
Average Balance Oscillator StrategyThis strategy is built on a model of the average balance of Bitcoin addresses, it provides a dynamic approach to market conditions. It effectively adapts to different phases of the cycle:
✅ Bull Markets (Green Background): Long positions are taken when the model confirms an uptrend.
🔴 Bear Markets (Red Background): Short positions are entered as the market trends downward.
⚪ Range Markets: A half-position can be taken to capitalize on consolidation phases.
Features:
Risk Management: Integrated stop-loss and position sizing controls to optimize capital preservation.
Robustness Testing: Options to evaluate the strategy’s performance under different conditions.
Template Flexibility: Can be customized for different timeframes and asset classes.
Cycle Top & Bottom Detection: The indicator also identifies potential market tops and bottoms based on on-chain data, helping assess Bitcoin's long-term cycle.
Alerts System: Built-in alerts notify you of changing market conditions and when a potential bottom or top is reached.
Versatility: Can be applied to other models based on different metrics or the same metric for different assets.
This strategy has demonstrated strong performance, adapting to Bitcoin's market structure while managing risk efficiently.
And it's part of my on-chain indicators to assess the Bitcoin cycle. Check my other Macro and TA indicators for Bitcoin
NazriRichPositioning of Fibonacci Labels: All the Fibonacci levels are placed left of the candles, near the price panel using xloc=xloc.bar_index and yloc=yloc.price.
Positioning of Trend Labels: The "Uptrending" or "Downtrending" label is now displayed to the left of the candle and near the price as well.
TP, SL, and Entry Price Labels: These are also positioned left of the candles near the price, with the same alignment as the Fibonacci and trend labels.
Inside BarThis code defines an inside bar as a bar where the low is higher than the low of the previous bar, and the high is lower than the high of the previous bar. The plotshape function is then used to plot a label below the bar when the inside bar condition is met.
MACD Crossover + RSI + Volume + RRR 1:2 - OptimizedMACD Crossover + RSI + Volume + RRR 1:2 - Optimized
Advanced 1-Minute Open Range Breakout IndicatorThis indicator is designed for the market on a 1-minute chart. It calculates the open range based on the first 5 minutes after the market open (09:30 – 09:35) and plots the high and low of this period as the daily resistance and support levels respectively. Additionally, the indicator displays the previous day’s high and low as blue horizontal lines, providing extra reference levels.
Trade signals are generated only during the active trading session (09:35 – 16:00). The advanced trade logic works as follows:
• For long entries:
- When the price first breaks above the open range high, the indicator enters a “breakout” state.
- If the price then retraces to (or below) the open range high, it moves to a “retest” state.
- Finally, if the price breaks above the open range high again, a long signal is issued.
• For short entries:
- When the price first breaks below the open range low, the indicator enters a “breakdown” state.
- If the price then retraces to (or above) the open range low, it moves to a “retest” state.
- Finally, if the price breaks below the open range low again, a short signal is issued.
All signals and the open range lines are only displayed during the trading session (09:35 to 16:00).
Use this indicator to help identify high-probability breakout setups in the early part of the trading day.
Fibonacci & 24H Volume StrategyThis script is a trading strategy that combines Fibonacci retracement levels with 24-hour volume analysis to identify potential trading opportunities. It is designed to work on intraday charts and helps traders make informed decisions based on historical price action and market activity.
Stocks Moved Less Than 1% in First 15 MinutesStocks Moved Less Than 1% in First 15 Minutes (Full Candle Movement)
PullBack_Level_HunterThis script creates an "Auto Fibonacci" indicator that automatically plots selected Fibonacci retracement levels on a chart, based on a defined lookback period. Users can choose from various Fibonacci levels (0.236, 0.382, 0.5, 0.618, or 0.786) via a dropdown input, allowing for quick adjustments to analysis.
**Key Features:**
1. **Fibonacci Level Selection:** Users can select from multiple Fibonacci levels (0.236, 0.382, 0.5, 0.618, and 0.786) for analysis.
2. **Lookback Period:** The script allows users to define a lookback period to determine the highest high and the lowest low for plotting Fibonacci levels.
3. **Fibonacci Level Calculation:** The Fibonacci levels are calculated using two functions:
- `fib_level`: Calculates the Fibonacci level based on the highest high and lowest low of the lookback period.
- `fib_level_from_current`: Calculates the Fibonacci level from the current candle’s high.
4. **Plotting:** The script plots the selected Fibonacci level on the chart, using a red line for the general Fibonacci level and a blue line for the level calculated from the current high.
5. **Dynamic Visualization:** The Fibonacci levels are drawn as step lines to clearly visualize price levels based on historical data and current price action.
This tool is ideal for traders who wish to quickly assess key Fibonacci levels for potential support or resistance within a customizable lookback period.
Scalping Strategy with Fib, MAs, Heiken Ashi, MACDThis script is a scalping strategy indicator for TradingView that incorporates multiple technical analysis tools, including Fibonacci levels, Moving Averages (MAs), Heiken Ashi candles, and MACD to identify potential buy and sell opportunities.
Key Components:
Moving Averages (MAs)
Exponential Moving Averages (EMA) of 34, 89, 200, and 600 periods.
Used to determine the trend direction.
Heiken Ashi Candles
Smoothed candle values for trend clarity.
MACD (Moving Average Convergence Divergence)
Uses a 12-period fast, 26-period slow, and 9-period signal line.
Identifies momentum shifts via crossovers.
Fibonacci Retracement Levels
Supports 38.2%, 50%, and 61.8% retracement levels.
Helps identify key support and resistance zones.
Trading Logic:
Uptrend: Price is above all EMAs (34 > 89 > 200 > 600).
Downtrend: Price is below all EMAs.
Buy Signal:
Price is in an uptrend.
MACD line crosses above the signal line.
Close price is above 34 EMA.
Sell Signal:
Price is in a downtrend.
MACD line crosses below the signal line.
Close price is below 34 EMA.
Visual Elements:
Buy signals are plotted with green upward arrows.
Sell signals are plotted with red downward arrows.
EMA lines are color-coded for easy trend analysis.
Fibonacci retracement levels are plotted if valid.
Purpose:
Designed for short-term trading (scalping).
Helps traders identify high-probability trend-based entry and exit points.
Works well in trending markets but may require adjustments in ranging conditions.
ICT Concepts: MML, Order Blocks, FVG, OTECore ICT Trading Concepts
These strategies are designed to identify high-probability trading opportunities by analyzing institutional order flow and market psychology.
1. Market Maker Liquidity (MML) / Liquidity Pools
Idea: Institutional traders ("market makers") place orders around key price levels where retail traders’ stop losses cluster (e.g., above swing highs or below swing lows).
Application: Look for "liquidity grabs" where price briefly spikes to these levels before reversing.
Example: If price breaks a recent high but reverses sharply, it may indicate a liquidity grab to trigger retail stops before a trend reversal.
2. Order Blocks (OB)
Idea: Institutional orders are often concentrated in specific price zones ("order blocks") where large buy/sell decisions occurred.
Application: Identify bullish order blocks (strong buying zones) or bearish order blocks (strong selling zones) on higher timeframes (e.g., 1H/4H charts).
Example: A bullish order block forms after a strong rally; price often retests this zone later as support.
3. Fair Value Gap (FVG)
Idea: A price imbalance occurs when candles gap without overlapping, creating an area of "unfair" price that the market often revisits.
Application: Trade the retracement to fill the FVG. A bullish FVG acts as support, and a bearish FVG acts as resistance.
Example: Three consecutive candles create a gap; price later returns to fill this gap, offering a entry point.
4. Time-Based Analysis (NY Session, London Kill Zones)
Idea: Institutional activity peaks during specific times (e.g., 7 AM – 11 AM New York time).
Application: Focus on trades during high-liquidity periods when banks and hedge funds are active.
Example: The "London Kill Zone" (2 AM – 5 AM EST) often sees volatility due to European market openings.
5. Optimal Trade Entry (OTE)
Idea: A retracement level (similar to Fibonacci retracement) where institutions re-enter trends after a pullback.
Application: Look for 62–79% retracements in a trend to align with institutional accumulation/distribution zones.
Example: In an uptrend, price retraces 70% before resuming upward—enter long here.
6. Stop Hunts
Idea: Institutions manipulate price to trigger retail stop losses before reversing direction.
Application: Avoid placing stops at obvious levels (e.g., above/below recent swings). Instead, use wider stops or wait for confirmation.
BK Trend TraderBoris Schlossberg created a strategy using ChatGPT-4 for trading stock indices where you can learn how to code pine script with ChatGPT too! Join Boris Schlossberg as he reveal tips for integrating ChatGPT into your trading strategy in this video. Boris shows a step-by-step tutorial on how you can create the perfect prompts from ChatGPT and implement it into TradingView for a customized indicator view. Whether you're a beginner or a seasoned trader, this video is your gateway to leveraging AI for market analysis, decision-making, and significantly enhancing your trading performance.
8/34 EMA with Bullish Engulfing Strategy - Linked Trades8/34 EMA with Bullish Engulfing Strategy - Linked Trade Visualization
📈 Description
This script implements an 8 EMA / 34 EMA crossover strategy with Bullish and Bearish Engulfing Candlestick patterns to confirm trade entries. It enhances trade visualization by tracking entry and exit points and drawing connecting lines between them. Each trade is uniquely labeled with an entry ID and exit ID, making it easy to see which exit corresponds to which entry.
📌 Key Features:
✅ Uses 8 EMA and 34 EMA for trend direction
✅ Identifies Bullish Engulfing patterns for long entries
✅ Identifies Bearish Engulfing patterns for short entries
✅ Tracks trade entries and exits with matching labels
✅ Draws a line between each entry and exit for better trade tracking
✅ Works on all timeframes and assets
🛠️ How to Use
Apply to Any Chart
Use this script on any asset (stocks, crypto, forex, etc.).
Works best on timeframes 15m and above for clearer signals.
Entry Signals (Trade Start)
🟢 Long Entry: When the 8 EMA crosses above the 34 EMA and a bullish engulfing pattern appears.
🔴 Short Entry: When the 8 EMA crosses below the 34 EMA and a bearish engulfing pattern appears.
Each trade entry is labeled with "Long Entry #X" or "Short Entry #X" (where X is the trade number).
Exit Signals (Trade Close)
🔴 Long Exit: When the 8 EMA crosses below the 34 EMA and price closes below it.
🟢 Short Exit: When the 8 EMA crosses above the 34 EMA and price closes above it.
Exit points are labeled as "Long Exit #X" or "Short Exit #X" with a matching trade ID.
A line is drawn between the entry and exit to show trade duration.
Legend & Labels
Legend & Labels
🟢 Long Entry → "Long Entry #X" (Green, Large Label)
🔴 Short Entry → "Short Entry #X" (Red, Large Label)
🔴 Long Exit → "Long Exit #X" (Red, Small Label)
🟢 Short Exit → "Short Exit #X" (Green, Small Label)
📏 Trade Line → Yellow for Long Trades, Orange for Short Trades
Customizations
Modify EMA lengths to suit different assets.
Change label colors or sizes in the code.
Adjust trade confirmation conditions if needed.
💡 Notes
This is a visual indicator, not an automated strategy. It does not place live trades.
Some signals may repaint on lower timeframes due to EMA recalculations.
Always backtest before using in live trading.
📊 Enjoy the script! If you find it useful, leave a comment or share improvements. 🚀
BUY and SELL 20/200 MA + MACD Strategy + ATRThis indicator is a BUY and SELL strategy based on a combination of Moving Averages (MA), MACD, and Candlestick patterns. The key features include:
Moving Averages: The strategy allows users to choose between Simple Moving Averages (SMA) or Exponential Moving Averages (EMA) with customizable periods (20, 50, 100, and 200). These MAs help identify the overall market trend.
Buy Signal: A buy signal is triggered when:
Two consecutive green candles close above the 200-period MA, and
The 20-period MA is below the 200-period MA, or
The MACD shows a bullish crossover below the zero line.
Sell Signal: A sell signal is triggered when:
Two consecutive red candles close below the 200-period MA, and
The 20-period MA is above the 200-period MA, or
The MACD shows a bearish crossover above the zero line.
Customizable Alerts:
Alerts for Buy and Sell signals.
A general "Any" alert for both Buy or Sell signals.
ATR-based Stop Loss and Take Profit:
The stop loss and take profit levels can be set using the Average True Range (ATR) with adjustable multipliers.
Users can choose to enable or disable this feature.
Algoman Oscillator//@version = 5
indicator(shorttitle='Algoman Oscillator', title='Algoman Oscillator', overlay=false)
n1 = input(10, 'Channel length')
n2 = input(21, 'Average length')
reaction_wt = input.int(defval=1, title='Reaction in change of direction', minval=1)
nsc = input.float(53, 'Levels About Buys', minval=0.0)
nsv = input.float(-53, 'Levels About Sells', maxval=-0.0)
Buy_sales = input(true, title='Only Smart Buy Reversal')
Sell_sales = input(true, title='Only Smart Sell Reversal')
Histogram = input(true, title='Show Histogarm')
//Trendx = input(false, title='Show Trendx')
barras = input(true, title='Divergence on chart(Bars)')
divregbull = input(true, title='Regular Divergence Bullish')
divregbear = input(true, title='Regular Divergence Bearish')
divhidbull = input(true, title='Show Divergence Hidden Bullish')
divhidbear = input(true, title='Show Divergence Hidden Bearish')
Tags = input(true, title='Show Divergence Lable')
amme = input(false, title='Activar media movil Extra para WT')
White = #FDFEFE
Black = #000000
Bearish = #e91e62
Bullish = #18e0ff
Strong_Bullish = #2962ff
Bullish2 = #00bedc
Blue1 = #00D4FF
Blue2 = #009BBA
orange = #FF8B00
yellow = #FFFB00
LEZ = #0066FF
purp = #FF33CC
// Colouring
tf(_res, _exp, gaps_on) =>
gaps_on == 0 ? request.security(syminfo.tickerid, _res, _exp) : gaps_on == true ? request.security(syminfo.tickerid, _res, _exp, barmerge.gaps_on, barmerge.lookahead_off) : request.security(syminfo.tickerid, _res, _exp, barmerge.gaps_off, barmerge.lookahead_off)
ha_htf = ''
show_ha = input.bool(true, "Show HA Plot/ Market Bias", group="HA Market Bias")
ha_len = input(7, 'Period', group="HA Market Bias")
ha_len2 = input(10, 'Smoothing', group="HA Market Bias")
// Calculations {
o = ta.ema(open, ha_len)
c = ta.ema(close, ha_len)
h = ta.ema(high, ha_len)
l = ta.ema(low, ha_len)
haclose = tf(ha_htf, (o + h + l + c) / 4, 0)
xhaopen = tf(ha_htf, (o + c) / 2, 0)
haopen = na(xhaopen ) ? (o + c) / 2 : (xhaopen + haclose ) / 2
hahigh = math.max(h, math.max(haopen, haclose))
halow = math.min(l, math.min(haopen, haclose))
o2 = tf(ha_htf, ta.ema(haopen, ha_len2), 0)
c2 = tf(ha_htf, ta.ema(haclose, ha_len2), 0)
h2 = tf(ha_htf, ta.ema(hahigh, ha_len2), 0)
l2 = tf(ha_htf, ta.ema(halow, ha_len2), 0)
ha_avg = (h2 + l2) / 2
// }
osc_len = 8
osc_bias = 100 *(c2 - o2)
osc_smooth = ta.ema(osc_bias, osc_len)
sigcolor =
(osc_bias > 0) and (osc_bias >= osc_smooth) ? color.new(Bullish, 35) :
(osc_bias > 0) and (osc_bias < osc_smooth) ? color.new(Bullish2, 75) :
(osc_bias < 0) and (osc_bias <= osc_smooth) ? color.new(Bearish, 35) :
(osc_bias < 0) and (osc_bias > osc_smooth) ? color.new(Bearish, 75) :
na
// }
nsc1 = nsc
nsc2 = nsc + 5
nsc3 = nsc + 10
nsc4 = nsc + 15
nsc5 = nsc + 20
nsc6 = nsc + 25
nsc7 = nsc + 30
nsc8 = nsc + 35
nsv1 = nsv - 5
nsv2 = nsv - 10
nsv3 = nsv - 15
nsv4 = nsv - 20
nsv5 = nsv - 25
nsv6 = nsv - 30
nsv7 = nsv - 35
nsv8 = nsv - 40
ap = hlc3
esa = ta.ema(ap, n1)
d = ta.ema(math.abs(ap - esa), n1)
ci = (ap - esa) / (0.015 * d)
tci = ta.ema(ci, n2)
wt1 = tci
wt2 = ta.sma(wt1, 4)
direction = 0
direction := ta.rising(wt1, reaction_wt) ? 1 : ta.falling(wt1, reaction_wt) ? -1 : nz(direction )
Change_of_direction = ta.change(direction, 1)
pcol = direction > 0 ? Strong_Bullish : direction < 0 ? Bearish : na
obLevel1 = input(60, 'Over Bought Level 1')
obLevel2 = input(53, 'Over Bought Level 2')
osLevel1 = input(-60, 'Over Sold Level 1')
osLevel2 = input(-53, 'Over Sold Level 2')
rsi = ta.rsi(close,14)
color greengrad = color.from_gradient(rsi, 10, 90, #00ddff, #007d91)
color redgrad = color.from_gradient(rsi, 10, 90, #8b002e, #e91e62)
ob1 = plot(obLevel1, color=#e91e6301)
os1 = plot(osLevel1, color=#00dbff01)
ob2 = plot(obLevel2, color=#e91e6301)
os2 = plot(osLevel2, color=#00dbff01)
p1 = plot(wt1, color=#00dbff01)
p2 = plot(wt2, color=#e91e6301)
plot(wt1 - wt2, color=wt2 - wt1 > 0 ? redgrad : greengrad, style=plot.style_columns)
// fill(p1,p2,color = wt2 - wt1 > 0 ? redgrad: greengrad) // old
fill(p1,p2,color = sigcolor) // new
fill(ob1,ob2,color = #e91e6350)
fill(os1,os2,color = #00dbff50)
midpoint = (nsc + nsv) / 2
ploff = (nsc - midpoint) / 8
BullSale = ta.crossunder(wt1, wt2) and wt1 >= nsc and Buy_sales == true
BearSale = ta.crossunder(wt1, wt2) and Buy_sales == false
Bullishh = ta.crossover(wt1, wt2) and wt1 <= nsv and Sell_sales == true
Bearishh = ta.crossover(wt1, wt2) and Sell_sales == false
plot(BullSale ? wt2 + ploff : na, style=plot.style_circles, color=color.new(Bearish, 0), linewidth=3, title='BuysG')
plot(BearSale ? wt2 + ploff : na, style=plot.style_circles, color=color.new(Bearish, 0), linewidth=3, title='SellsG')
plot(Bullishh ? wt2 - ploff : na, style=plot.style_circles, color=color.new(Strong_Bullish, 0), linewidth=3, title='Buys On Sale')
plot(Bearishh ? wt2 - ploff : na, style=plot.style_circles, color=color.new(Strong_Bullish, 0), linewidth=3, title='Sells on Sale')
plot(Histogram ? wt1 - wt2 : na, style=plot.style_area, color=color.new(Blue2, 80), linewidth=1, title='Histograma')
barcolor(barras == true and Bullishh == true or barras == true and Bearishh == true ? Bullish2 : na)
barcolor(barras == true and BullSale == true or barras == true and BearSale == true ? Bearish : na)
/////// Divergence ///////
f_top_fractal(_src) =>
_src < _src and _src < _src and _src > _src and _src > _src
f_bot_fractal(_src) =>
_src > _src and _src > _src and _src < _src and _src < _src
f_fractalize(_src) =>
f_top_fractal(_src) ? 1 : f_bot_fractal(_src) ? -1 : 0
fractal_top1 = f_fractalize(wt1) > 0 ? wt1 : na
fractal_bot1 = f_fractalize(wt1) < 0 ? wt1 : na
high_prev1 = ta.valuewhen(fractal_top1, wt1 , 0)
high_price1 = ta.valuewhen(fractal_top1, high , 0)
low_prev1 = ta.valuewhen(fractal_bot1, wt1 , 0)
low_price1 = ta.valuewhen(fractal_bot1, low , 0)
regular_bearish_div1 = fractal_top1 and high > high_price1 and wt1 < high_prev1 and divregbear == true
hidden_bearish_div1 = fractal_top1 and high < high_price1 and wt1 > high_prev1 and divhidbear == true
regular_bullish_div1 = fractal_bot1 and low < low_price1 and wt1 > low_prev1 and divregbull == true
hidden_bullish_div1 = fractal_bot1 and low > low_price1 and wt1 < low_prev1 and divhidbull == true
col1 = regular_bearish_div1 ? Bearish : hidden_bearish_div1 ? Bearish : na
col2 = regular_bullish_div1 ? Strong_Bullish : hidden_bullish_div1 ? Strong_Bullish : na
plot(title='Divergence Bearish', series=fractal_top1 ? wt1 : na, color=col1, linewidth=2, transp=0)
plot(title='Divergence Bullish', series=fractal_bot1 ? wt1 : na, color=col2, linewidth=2, transp=0)
plotshape(regular_bearish_div1 and divregbear and Tags ? wt1 + ploff * 1 : na, title='Divergence Regular Bearish', text='Bear', location=location.absolute, style=shape.labeldown, size=size.tiny, color=color.new(Bearish, 0), textcolor=color.new(White, 0))
plotshape(hidden_bearish_div1 and divhidbear and Tags ? wt1 + ploff * 1 : na, title='Divergence Hidden Bearish', text='H Bear', location=location.absolute, style=shape.labeldown, size=size.tiny, color=color.new(Bearish, 0), textcolor=color.new(White, 0))
plotshape(regular_bullish_div1 and divregbull and Tags ? wt1 - ploff * 1 : na, title='Divergence Regular Bullish', text='Bull', location=location.absolute, style=shape.labelup, size=size.tiny, color=color.new(Strong_Bullish, 0), textcolor=color.new(White, 0))
plotshape(hidden_bullish_div1 and divhidbull and Tags ? wt1 - ploff * 1 : na, title='Divergence Hidden Bullish', text='H Bull', location=location.absolute, style=shape.labelup, size=size.tiny, color=color.new(Strong_Bullish, 0), textcolor=color.new(White, 0))
/////// Unfazed Alerts //////
alertcondition(BullSale, title='Smart Bullish Reversal')
alertcondition(BearSale, title='Smart Bearish Reversal')
alertcondition(Bullishh, title='Bullish Reversal')
alertcondition(Bearishh, title='Bearish Reversal')
alertcondition(BullSale or Bullishh, title='Any Bullish reversal')
alertcondition(BearSale or Bearishh, title='Any Bearish Reversal')
alertcondition(Change_of_direction, title='Change In Direction WT')
/////// Extra Alerts //////
alertcondition(BullSale, title='Overbought Reversal')
alertcondition(BearSale, title='All Reversal')
alertcondition(Bullishh, title='Oversold Buys')
alertcondition(Bearishh, title='All Buys')
alertcondition(BullSale or Bullishh, title='Buys/Reversal Overbought/Oversold')
alertcondition(BearSale or Bearishh, title='All Reversal/Buys')
alertcondition(Change_of_direction, title='WT Direction Change')
////////////////////////////////////////////////-MISTERMOTA MOMENTUM-/////////////////////////////////////
source = input(close)
responsiveness = math.max(0.00001, input.float(0.9, minval=0.0, maxval=1.0))
periodd = input(50)
sd = ta.stdev(source, 50) * responsiveness
var worm = source
diff = source - worm
delta = math.abs(diff) > sd ? math.sign(diff) * sd : diff
worm += delta
ma = ta.sma(source, periodd)
raw_momentum = (worm - ma) / worm
current_med = raw_momentum
min_med = ta.lowest(current_med, periodd)
max_med = ta.highest(current_med, periodd)
temp = (current_med - min_med) / (max_med - min_med)
value = 0.5 * 2
value *= (temp - .5 + .5 * nz(value ))
value := value > .9999 ? .9999 : value
value := value < -0.9999 ? -0.9999 : value
temp2 = (1 + value) / (1 - value)
momentum = .25 * math.log(temp2)
momentum += .5 * nz(momentum )
//momentum := raw_momentum
signal = nz(momentum )
trend = math.abs(momentum) <= math.abs(momentum )
////////////////////////////////////////////////-GROWING/FAILING-//////////////////////////////////////////
length = input.int(title="MOM Period", minval=1, defval=14, group="MOM Settings")
src = input(title="MOM Source", defval=hlc3, group="MOM Settings")
txtcol_grow_above = input(#1a7b24, "Above Grow", group="MOM Settings", inline="Above")
txtcol_fall_above = input(#672ec5, "Fall", group="MOM Settings", inline="Above")
txtcol_grow_below = input(#F37121, "Below Grow", group="MOM Settings", inline="Below")
txtcol_fall_below = input(#be0606, "Fall", group="MOM Settings", inline="Below")
ma(source, length, type) =>
switch type
"SMA" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
typeMA = input.string(title = "Method", defval = "SMA", options= , group="MA Settings")
smoothingLength = input.int(title = "Length", defval = 5, minval = 1, maxval = 100, group="MA Settings")
smoothingLine = ma(delta, smoothingLength, typeMA)
deltaText=(delta > 0 ? (delta > delta ? " MOM > 0 and ? Growing, MOM = " + str.tostring(delta , "#.##") :" MOM > 0 and ? Falling, MOM = " + str.tostring(delta , "#.##") ) : (delta > delta ? "MOM < 0 and ? Growing, MOM = " + str.tostring(delta , "#.##"): " MOM < 0 and ? Falling, MOM = " + str.tostring(delta , "#.##")))
oneDay = 24 * 60 * 60 * 1000
barsAhead = 3
tmf = if timeframe.ismonthly
barsAhead * oneDay * 30
else if timeframe.isweekly
barsAhead * oneDay * 7
else if timeframe.isdaily
barsAhead * oneDay
else if timeframe.isminutes
barsAhead * oneDay * timeframe.multiplier / 1440
else if timeframe.isseconds
barsAhead * oneDay * timeframe.multiplier / 86400
else
0
angle(_src) =>
rad2degree = 180 / 3.14159265359 //pi
ang = rad2degree * math.atan((_src - _src ) / ta.atr(14))
ang
emae = angle(smoothingLine)
emaanglestat = emae > emae ? "? Growing": "? Falling"
deltaTextxxx = "MOM MA/ATR angle value is " + str.tostring(emae, "#.##") + "° and is " + emaanglestat
deltacolorxxx = emae >0 and emae >=emae ? txtcol_grow_above : txtcol_fall_below
// Label
label lpt1 = label.new(time, -30, text=deltaTextxxx , color=deltacolorxxx, xloc=xloc.bar_time, style=label.style_label_left, textcolor=color.white, textalign=text.align_left, size=size.normal)
label.set_x(lpt1, label.get_x(lpt1) + tmf)
label.delete(lpt1 )
txtdeltaColors = (delta > 50 ? (delta < delta ? txtcol_grow_above : txtcol_fall_above) : (delta < delta ? txtcol_grow_below : txtcol_fall_below))
label ldelta1 = label.new(time, 30, text=deltaText , color=txtdeltaColors, xloc=xloc.bar_time, style=label.style_label_left, textcolor=color.white, textalign=text.align_left, size=size.normal)
label.set_x(ldelta1, label.get_x(ldelta1) + tmf)
label.delete(ldelta1 )
PSP / PSC NQWPlots Precision Candles / Precision Swing Points on your Chart, you can change color and transparency.
At the Moment it does not support DXY
Adaptive Volatility Zones + MACD + RSI Strategy#### Strategy Overview:
This strategy is designed for trading on higher timeframes (from 4 hours and above) and combines several modern approaches to market analysis. It uses adaptive levels based on volatility, MACD and RSI indicators to confirm signals, and a trend filter (EMA 200). The strategy is optimized to work in trending market conditions and minimizes the number of false signals due to multi-layer filtering.
The average percentage movement of the last 96 K-linesThe average fluctuation amplitude of 96 K-lines is used to adjust the position of the contract according to the fluctuation amplitude, reduce the position when the fluctuation amplitude is large, and increase the position when the fluctuation amplitude is small to control the risk
8EMA/VWAP ReversalThis indicator helps mark out potenital areas of reversals in the market. Still a work in progress but best used using the 5m timeframe and on funds(SPY, QQQ, RTY)