NFP RangesThis simple indicator will mark the high and low prices during NFP days. You an choose how many NFP days you want to go back and a gradient to use for the levels.
The NFP dates are hard coded from 2023 through 2029. If this script survives past 2029, it should be simple to add more dates.
Indicators and strategies
✅ SMA20 Trend Table -(MAJOAK)Trend table of Bullish or Bearish to the SMA 20. Displays 1 Day, 1Hr, 15 Min and 5 min.
9AM–11AM NAS100 Session Box//@version=5
indicator("9AM–11AM NAS100 Session Box", overlay=true)
// Define session times in New York (EST)
session_start = timestamp("America/New_York", year, month, dayofmonth, 09, 0)
session_end = timestamp("America/New_York", year, month, dayofmonth, 11, 0)
// Detect if we're inside the session window
in_session = (time >= session_start) and (time < session_end)
// Track high/low of the session
var float session_high = na
var float session_low = na
if (in_session)
session_high := na(session_high) ? high : math.max(session_high, high)
session_low := na(session_low) ? low : math.min(session_low, low)
else
session_high := na
session_low := na
// Draw the session box
bgcolor(in_session ? color.new(color.blue, 85) : na)
// Optionally draw lines at session high/low
plot(in_session ? session_high : na, title="Session High", color=color.green, linewidth=1)
plot(in_session ? session_low : na, title="Session Low", color=color.red, linewidth=1)
EMA 9/21 Crossover Indicator w/ Shading9 and 21 ema cross over with buy and sell signals. No close signal so you will need to trail your stop manually
First 15 Min High/Low//@version=5
indicator("First 15 Min High/Low", overlay=true)
// Define the session start time (adjust according to your market)
startHour = 9
startMinute = 30
endMinute = startMinute + 15
// Track the first 15 minutes of the day
isFirst15 = (hour == startHour and minute >= startMinute and minute < endMinute)
// New day logic
newDay = ta.change(time("D"))
// Hold values
var float first15High = na
var float first15Low = na
var bool isLocked = false
// Capture high/low during first 15 min
if newDay
first15High := na
first15Low := na
isLocked := false
if isFirst15 and not isLocked
first15High := na(first15High) ? high : math.max(high, first15High)
first15Low := na(first15Low) ? low : math.min(low, first15Low)
if not isFirst15 and not isLocked and not na(first15High) and not na(first15Low)
isLocked := true
// Plot
plot(isLocked ? first15High : na, title="First 15 Min High", color=color.green, linewidth=2, style=plot.style_line)
plot(isLocked ? first15Low : na, title="First 15 Min Low", color=color.red, linewidth=2, style=plot.style_line)
HAPatternsLibrary "HAPatterns"
isBearishRSIDivergence(price, rsi, pricePrevHigh, rsiPrevHigh)
Parameters:
price (float)
rsi (float)
pricePrevHigh (float)
rsiPrevHigh (float)
shouldExitSteepRise(curveShrinking, rsi, rsiPrev, adx, adxPrev, divergenceDetected)
Parameters:
curveShrinking (bool)
rsi (float)
rsiPrev (float)
adx (float)
adxPrev (float)
divergenceDetected (bool)
plotSteepRiseDebug(isSteep, shrinkExit, rsiExit, divergenceExit, adxExit)
Parameters:
isSteep (bool)
shrinkExit (bool)
rsiExit (bool)
divergenceExit (bool)
adxExit (bool)
HeikinAshiCurveCoreLibrary "HeikinAshiCurveCore"
haClose(srcOpen, srcHigh, srcLow, srcClose)
Parameters:
srcOpen (float)
srcHigh (float)
srcLow (float)
srcClose (float)
haOpen(srcOpen, srcClose)
Parameters:
srcOpen (float)
srcClose (float)
rollingBodySizes(haOpenSeries, haCloseSeries, window)
Parameters:
haOpenSeries (float)
haCloseSeries (float)
window (int)
detectCurve(bodySizes, compressionThreshold)
Parameters:
bodySizes (array)
compressionThreshold (float)
isSustainableCurve(bodySizes)
Parameters:
bodySizes (array)
isCompressionZone(bodySizes, flatThreshold)
Parameters:
bodySizes (array)
flatThreshold (float)
EMA Trend Dashboard
Trend Indicator using 3 custom EMA lines. Displays a table with 5 rows(position configurable)
-First line shows relative position of EMA lines to each other and outputs Bull, Weak Bull, Flat, Weak Bear, or Bear. EMA line1 should be less than EMA line2 and EMA line 2 should be less than EMA line3. Default is 9,21,50.
-Second through fourth line shows the slant of each EMA line. Up, Down, or Flat. Threshold for what is considered a slant is configurable. Also added a "steep" threshold configuration for steep slants.
-Fifth line shows exhaustion and is a simple, configurable calculation of the distance between EMA line1 and EMA line2.
--Lines one and five change depending on its value but ALL other colors are able to be changed.
--Default is somewhat set to work well with Micro E-mini Futures but this indicator can be changed to work on anything. I created it to help get a quick overview of short-term trend on futures. I used ChatGPT to help but I am still not sure if it actually took longer because of it.
Williams %RHuge T's William's Percent Range
5 and 10 length graph overlay
-4 represents overbought conditions
-94 represents oversold conditions
EMA 200 & EMA 20EMA20\200 Golden & Death cross
you can use it for all time frame trading in market
it make more easy way to find the way for market if its going up or down
HeikinAshiPatternsLibrary "HeikinAshiPatterns"
isReverseWickTrap(isBullish, wickRatioThreshold)
Parameters:
isBullish (bool)
wickRatioThreshold (float)
impulseClusterCheck(strengthBars, maxWickToBodyRatio)
Parameters:
strengthBars (int)
maxWickToBodyRatio (float)
isMixedCurveLosingStrength(lookback)
Parameters:
lookback (int)
HeikinAshiCorev1Library "HeikinAshiCorev1"
haOpen()
haClose()
haHigh(haOpenVal, haCloseVal)
Parameters:
haOpenVal (float)
haCloseVal (float)
haLow(haOpenVal, haCloseVal)
Parameters:
haOpenVal (float)
haCloseVal (float)
isGreen(haOpenVal, haCloseVal)
Parameters:
haOpenVal (float)
haCloseVal (float)
isRed(haOpenVal, haCloseVal)
Parameters:
haOpenVal (float)
haCloseVal (float)
bodySize(haOpenVal, haCloseVal)
Parameters:
haOpenVal (float)
haCloseVal (float)
upperWick(haHighVal, haOpenVal, haCloseVal)
Parameters:
haHighVal (float)
haOpenVal (float)
haCloseVal (float)
lowerWick(haLowVal, haOpenVal, haCloseVal)
Parameters:
haLowVal (float)
haOpenVal (float)
haCloseVal (float)
isDoji(haOpenVal, haCloseVal, haHighVal, haLowVal)
Parameters:
haOpenVal (float)
haCloseVal (float)
haHighVal (float)
haLowVal (float)
TICK ±1200 Intrabar MarkerMarks +1100 and -1200 NYSE TICK readings on any chart. Useful for TICK fades without having to look at the actual USI:TICK chart.
Simple Bollinger BandsBollinger Bands are a popular technical analysis indicator used to measure market volatility and identify potential overbought or oversold conditions.
This script plots:
A middle band (20-period Simple Moving Average)
An upper band (SMA + 2 standard deviations)
A lower band (SMA – 2 standard deviations)
Alt Market Index (Halving-Adjusted BTC Supply, EMA)
암호화폐 알트코인 시총 상위 125개를 모아서
나스닥 기반의 계산식을 활용한 알트코인지수125를 만들었습니다.
반감기에 따른 비트코인 하루 채굴량 갯수 추가까지 포함한 버전입니다.
일봉이 기준이 됩니다.
I created the Altcoin Index 125 by compiling the top 125 altcoins by market capitalization in the cryptocurrency market, using a calculation method based on the Nasdaq index.
This version also includes adjustments for Bitcoin’s halving events, reflecting changes in daily mining output. The index is based on daily candles.
Simple RSIThe Relative Strength Index (RSI) is a momentum oscillator that measures the speed and change of price movements. It helps traders identify overbought or oversold conditions in the market.
This script plots the 14-period RSI, which is one of the most commonly used settings.
How It Works:
The RSI ranges from 0 to 100.
Values above 70 suggest the asset may be overbought (a potential sell area).
Values below 30 suggest the asset may be oversold (a potential buy area).
Líneas desde apertura 1 de eneroBased on the opening price of January 1st, generate lines at the base price, +10%, +20%, -10%, and -20%.
En base al precio de apertura del 1 de Enero, genera unas lineas a precio base, +10%, +20%, -10% y -20%
EMA Cross Strategy only Long📈 EMA Cross Strategy – Only Long
Simple. Clean. Powerful. Designed for strong uptrends.
This is a long-only trend-following strategy based on the classic crossover of Exponential Moving Averages (EMAs). It’s designed for growth stocks and trending assets where upward momentum dominates.
⚙️ How it works:
Entry: when the Fast EMA crosses above the Slow EMA
Exit: when the Fast EMA crosses below the Slow EMA
No shorts, no reversals – just pure trend riding.
By default, the strategy uses 50/100 EMA, which has performed exceptionally well on stocks like NVIDIA (NVDA). These settings can be easily customized to fit your preferred asset or timeframe.
📊 Backtest Example – NVIDIA (NVDA, 1D timeframe)
Test parameters:
Initial capital: $10,000
Order size: 50% of equity per trade (adjustable in settings)
Results:
Net profit: +$2,037,563.63 USD
Gross profit: $2,127,432.33
Gross loss: $89,868.70
Max equity growth: $2,708,648.75 (+99.63%)
Drawdown: 20.00%
Buy & Hold profit: +$30,636,000 USD (but with far more exposure)
The strategy dramatically outperformed passive holding on a risk-adjusted basis, while keeping drawdowns and trade count under control.
🔧 Customization & Risk Management
In the Strategy Settings, you can adjust:
EMA lengths (default: 50 fast, 100 slow)
Order size as a % of equity (e.g., reduce below 50% to lower drawdown)
Backtest range and asset type (works well on growth stocks and trending commodities)
Try this on assets with strong bullish cycles like NVDA, AAPL, MSFT, or Gold (XAU/USD).
⚠️ Disclaimer
This script is for educational and backtesting purposes only. It is not financial advice. Please do your own research and test carefully before trading live.
Moving Average Convergence-Divergence (MACD)This script implements the Moving Average Convergence-Divergence (MACD), a popular momentum indicator used in technical analysis to identify trend direction, momentum shifts, and potential buy/sell signals.
🔹 Key Features
1. Inputs & Customization
MACD Lines Toggle: Enable/disable the MACD and signal lines.
Source Price: Defaults to close but can be adjusted (e.g., open, high, low, hl2).
Fast Length (12): The period for the faster-moving EMA.
Slow Length (26): The period for the slower-moving EMA.
Signal Length (9): The smoothing period for the signal line.
2. Calculations
Computes the MACD Line (fast EMA - slow EMA).
Computes the Signal Line (EMA of the MACD line).
Computes the Histogram (difference between MACD and Signal lines).
3. Visual Indicators
Zero Line: A white horizontal line at 0 for reference.
MACD Line: Plotted in green when above the signal line, red when below.
Signal Line: Displayed as a yellow line.
Histogram:
Green bars when MACD > Signal (bullish momentum).
Red bars when MACD < Signal (bearish momentum).
Background Highlights:
Light green on bullish crossovers (MACD crosses above Signal).
Light red on bearish crossunders (MACD crosses below Signal).
4. Alerts
Triggers when:
Bullish Crossover (MACD crosses above Signal).
Bearish Crossunder (MACD crosses below Signal).
🔹 How Traders Use This Indicator
Trend Identification:
MACD above zero → bullish trend.
MACD below zero → bearish trend.
Momentum Signals:
Bullish Crossover (Buy Signal): MACD crosses above Signal.
Bearish Crossunder (Sell Signal): MACD crosses below Signal.
Divergence (Not in this script, but useful):
Price makes higher highs, but MACD makes lower highs → Potential reversal.
🔹 Strengths of This Script
✅ Clean and Efficient Code – Uses Pine Script v6 best practices.
✅ Customizable Inputs – Adjust lengths and source price.
✅ Clear Visuals – Color-coded for easy interpretation.
✅ Built-in Alerts – For automated trading strategies.