Search in scripts for "北证50+股票+新浪财经"
EMA Crossover Strategy (15m)50 and 200 ema crossing when leaving anchor. when 50 and 200 crosses will give you direction of where market is going. wait for a pull back and take trade. sl on highest or lowest point of apex tp open . when you see multiple equal ( low or High) get put of trade.
The Lazy Trader - Index (ETF) Trend Following Robot50/150 moving average, index (ETF) trend following robot. Coded for people who cannot psychologically handle dollar-cost-averaging through bear markets and extreme drawdowns (although DCA can produce better results eventually), this robot helps you to avoid bear markets. Be a fair-weathered friend of Mr Market, and only take up his offer when the sun is shining! Designed for the lazy trader who really doesn't care...
Recommended Chart Settings:
Asset Class: ETF
Time Frame: Daily
Necessary ETF Macro Conditions:
a) Country must have healthy demographics, good ratio of young > old
b) Country population must be increasing
c) Country must be experiencing price-inflation
Default Robot Settings:
Slow Moving Average: 50 (integer) //adjust to suit your underlying index
Fast Moving Average: 150 (integer) //adjust to suit your underlying index
Bullish Slope Angle: 5 (degrees) //up angle of moving averages
Bearish Slope Angle: -5 (degrees) //down angle of moving averages
Average True Range: 14 (integer) //input for slope-angle formula
Risk: 100 (%) //100% risk means using all equity per trade
ETF Test Results (Default Settings):
SPY (1993 to 2020, 27 years), 332% profit, 20 trades, 6.4 profit factor, 7% drawdown
EWG (1996 to 2020, 24 years), 310% profit, 18 trades, 3.7 profit factor, 10% drawdown
EWH (1996 to 2020, 24 years), 4% loss, 26 trades, 0.9 profit factor, 36% drawdown
QQQ (1999 to 2020, 21 years), 232% profit, 17 trades, 3.6 profit factor, 2% drawdown
EEM (2003 to 2020, 17 years), 73% profit, 17 trades, 1.1 profit factor, 3% drawdown
GXC (2007 to 2020, 13 years), 18% profit, 14 trades, 1.3 profit factor, 26% drawdown
BKF (2009 to 2020, 11 years), 11% profit, 13 trades, 1.2 profit factor, 33% drawdown
A longer time in the markets is better, with the exception of EWH. 6 out of 7 tested ETFs were profitable, feel free to test on your favourite ETF (default settings) and comment below.
Risk Warning:
Not tested on commodities nor other financial products like currencies (code will not work), feel free to leave comments below.
Moving Average Slope Angle Formula:
Reproduced and modified from source:
50 & 200 SMA + RSI Average Strategy (Long Only, Single Trade)It works better in trending markets. It delivers its best performance in the 4-hour to 1-day timeframes.
50-Minute Opening Range BreakoutThis is a test of the opening range with Bearish/Bullish confirmation
50-Line Oscillator // (\_/)
// ( •.•)
// (")_(")
25-Line Oscillator
Description:
The 25-Line Oscillator is a sophisticated technical analysis tool designed to visualize market trends through the use of multiple Simple Moving Averages (SMAs). This indicator computes a series of 26 SMAs, incrementally increasing the base length, providing traders with a comprehensive view of price dynamics.
Features:
Customizable Base Length: Adjust the base length of the SMAs according to trading preferences, enhancing versatility for different market conditions.
Rainbow Effect: The indicator employs a visually appealing rainbow color scheme to differentiate between the various trend lines, making it easy to identify crossovers and momentum shifts.
Crossovers Detection: The script includes logic to detect crossover events between consecutive trend lines, which can serve as signals for potential entry or exit points in trading.
Clear Visualization: Suitable for both novice and seasoned traders, the plots enable quick interpretation of trends and market behavior.
How to Use:
Add the indicator to your chart and customize the base length as desired.
Observe the rainbow-colored lines for trend direction.
Look for crossover events between the SMAs as potential trading signals.
Application: This indicator is particularly useful for swing traders and trend followers who aim to capitalize on market momentum and identify reversals. By monitoring the behavior of multiple SMAs, traders can gain insights into the strength and direction of price movements over various time frames.
AK Simple Moving Average 50 days Simple Moving average suitable for Intraday on 1Hr,30Min.15Min Time frames
1. When candle crossing above SMA Line - Go for Long Entries
2. When candle crossing below SMA Line - Go for short Entries
50 SMA / 200 EMA / 128EMA Moving Average CrossFound success using 50SMA vs 200EMA.
128 EMA also charted for it's BTC relevance.
50/100/200 Moving Averages (Pine Script For Copy)by fresca
SCRIPT LANGUAGE
Copy script below and adjust based on your preferences.
-function (change function from "sma" to "ema", "wma" and more)
-length (25 Day, 150 Day or add more averages to the three in this script.)
-color, (red, yellow, etc. or use color hex codes i.e. #FEDA15, #FFAD8F, etc.)
-transparency (set to desired level 1-100)
Or add more options.
RESOURCES
Color hex codes site: www.canva.com
Trading View Pine Script Editor Reference Guide: www.tradingview.com
Taint's Multi Time Frame MA50-100-200 SMA with two 200 EMA's all with the ability choose a time frame for each.
Z-EMA Fusion BandsDesigned with crypto markets in mind, particularly Bitcoin , it builds on the concept that the 1-Week 50 EMA often serves as a long-term bull/bear market threshold — an area where institutional bias, momentum shifts, and cyclical rotations tend to occur.
🔹 Core Components & Synergies:
1. 1W 50 EMA (Higher Timeframe)
- This EMA is calculated on a weekly timeframe, regardless of your current chart.
- In crypto, price above the 1W 50 EMA typically aligns with long-term bull market phases, while extended periods below can signify bearish macro structure.
- The slope of the EMA is also analyzed to add directional confidence to trend strength.
2. ±1 Standard Deviation Bands
- Surrounding the 50 EMA, these bands visualize normal price dispersion relative to trend.
- When price consistently hugs or breaks outside these bands, it often reflects market expansion, volatility events, or mean-reversion opportunity.
3. Z-Score Gradient Fill
- The area between the bands is filled using a Z-score-based gradient, which dynamically adjusts color based on how far price is from the EMA (in terms of standard deviations).
- Color shifts from aqua (near EMA) to fuchsia (far from EMA) help you spot price compression, equilibrium, or overextension at a glance.
- The fill also uses transparency scaling, making it fade as price stretches further, emphasizing the core structure.
4. Directional EMA Coloring
- The EMA line itself is colored based on:
- The slope of the EMA (rising/falling)
- Whether the HTF candle is bullish or bearish
- This provides intuitive color-coded confirmation of momentum alignment or potential exhaustion.
5. Price/EMA Divergence Detection
- The script detects bullish and bearish divergence between price and the EMA (rather than using a traditional oscillator).
- Bullish Divergence: Price makes a lower low, EMA makes a higher low.
- Bearish Divergence: Price makes a higher high, EMA makes a lower high.
- These signals often mark transitional zones where momentum fades before a trend reversal or correction.
📊 Suggested Uses:
🔸 Swing and Position Trading:
- Use the 1W 50 EMA as a macro-trend anchor.
- Stay long-biased when price is above with positive slope, and short-biased when below.
- Consider entries near band edges for mean-reversion plays, especially if confluence forms with divergence signals.
🔸 Volatility-Based Filtering:
- Use the Z-score fill to identify volatility compression (near EMA) or expansion (edge of bands).
- Combine this with breakout strategies or dynamic position sizing.
🔸 Divergence Confirmation:
- Combine divergence markers with HTF EMA slope for high-probability setups.
- Bullish div + EMA flattening/rising can signal the start of accumulation after a macro dip.
🔸 Multi-Timeframe Analysis:
- Works well as a structural overlay on intraday charts (1H, 4H, 1D).
- Use this indicator to track long-term bias while executing lower timeframe trades.
⚠️ Disclaimer:
This indicator is designed for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any asset.
Always use proper risk management, and combine with your own analysis, tools, and strategy. Performance in past market conditions does not guarantee future results.
Gap-Up Momentum Screener (S.S)
ENGLISH-VERSION
1) TradingView Gap Screener (for US stocks)
➤ Conditions
Gap-Up ≥ +3% (large gaps indicate institutional pressure)
Pre-market volume ≥ 150% of the 20-day average
RS line > 50
Price > 50 SMA
Market cap ≥ 1 billion USD
No penny stocks
2) Minervini Gap-Entry Strategy (Swing Trading)
This is a variant specifically optimized for gaps + momentum.
A) Setup Criteria
The stock must meet the following conditions:
Gap-Up ≥ +3%
First retracement ≤ 30% of the gap
High relative strength (RS line rising)
Volume on the gap day > 2× average
Price above 20 EMA, 50 SMA, 150 SMA, 200 SMA
No immediate resistance within 2–5%
B) Entry Setups
Entry 1: First Pullback Entry (FPE)
Wait for the first 1–3 day consolidation.
Entry → Breakout of the small range.
Stop → Below the low of the pullback.
Rule: No entry on the gap day itself.
Entry 2: High Tight Flag above the Gap
Stock rises > 10% after the gap
Then forms a 3–8 day sideways phase
Entry → Break above the flag’s high
Stop → Below the flag base
Entry 3: ORB Entry (Opening Range Breakout, 30 minutes)
Very effective for strong gaps.
Wait 30 minutes after the market opens
Entry → Break above the high of these first 30 minutes
Stop → Below the 30-minute low
C) Stop Levels
For FPE: 4–8%
For ORB: 1–2 × ATR(14)
For flags: 3–5%
D) Add Rules
Only if the stock continues showing strong volume:
Add on every new 3–5 day high
Add only above half-range levels
Maximum 3 adds
3) Early-Warning Module (Setup forming but not ready for entry)
This module marks stocks that are forming a setup but are not yet buyable.
➤ Criteria
Gap-Up ≥ 3%
Strong volume
Stock pulls back and consolidates (1–5 bars)
BUT no breakout yet
4) Exact Entry Checklist (Minervini-style, optimized for gaps)
Checklist before entry:
Gap ≥ +3%
20 EMA rising
Volume > 2× average
RS line rising
Price > 50 SMA
Pullback not deeper than 30% of the gap
3+ green signals from the Early-Warning diamonds
If all 7 are fulfilled → green light.
5) How to apply the strategy in daily practice
Morning (08:00–09:00)
Check the screener
Build your watchlist
Identify gaps
US Market Open (15:30)
Monitor the Early-Warning module
Sort gap momentum opportunities
16:00–17:00
Enter: First Pullback / ORB / Flag
Set stops
Determine position size based on risk
After 20:00
Check volume strength
If momentum fades → no more adds
Ratchet Exit Trend Strategy with VIX FilterThis strategy is a trend-following system designed specifically for volatile markets. Instead of focusing solely on the "perfect entry," this script emphasizes intelligent trade management using a custom **"Ratchet Exit System."**
Additionally, it integrates a volatility filter based on the CBOE Volatility Index (VIX) to minimize risk during extreme market phases.
### 🎯 The Concept: Ratchet Exit
The "Ratchet" system operates like a mechanical ratchet tool: the Stop Loss can only move in one direction (up, for long trades) and "locks" into specific stages. The goal is to give the trade "room to breathe" initially to avoid being stopped out by noise, then aggressively reduce risk as the trade moves into profit.
The exit logic moves through 3 distinct phases:
1. **Phase 0 (Initial Risk):** At the start of the trade, a wide Stop Loss is set (Default: 10%) to tolerate normal market volatility.
2. **Phase 1 (Risk Reduction):** Once the trade reaches a specific floating profit (Default: +10%), the Stop Loss is raised and "pinned" to a fixed value (Default: -8% from entry). This drastically reduces risk while keeping the trade alive.
3. **Phase 2 (Trailing Mode):** If the trend extends to a higher profit zone (Default: +15%), the Stop switches to a dynamic Trailing Mode. It follows the **Highest High** at a fixed percentage distance (Default: 8%).
### 🛡️ VIX Filter & Panic Exit
High volatility is often the enemy of trend-following strategies.
* **Entry Filter:** The system will not enter new positions if the VIX is above a user-defined threshold (Default: 32). This helps avoid entering "falling knife" markets.
* **Panic Exit:** If the VIX spikes above the threshold (32) while a trade is open, the position is closed immediately to protect capital (Emergency Exit).
### 📈 Entry Signals
The strategy trades **LONG only** and uses Simple Moving Averages (SMAs) to identify trends:
* **Golden Cross:** SMA 25 crosses over SMA 50.
* **3-Bar Breakouts:** A confirmation logic where the price must close above the SMA 50, 100, or 200 for 3 consecutive bars.
### ⚙️ Settings (Inputs)
All parameters are fully customizable via the settings menu:
* **SMAs:** Lengths for the trend indicators (Default: 25, 50, 100, 200).
* **VIX Filter:** Toggle the filter on/off and adjust the panic threshold.
* **Ratchet Settings:** Percentages for Initial Stop, Trigger Levels for Stages 1 & 2, and the Trailing Distance.
### ⚠️ Technical Note & Risk Warning
This script uses `request.security` to fetch VIX data. Please ensure you understand the risks associated with trading leveraged or volatile assets. Past performance is not indicative of future results.
MusaCandlePatternsLibrary "MusaCandlePatterns"
Patterns is a Japanese candlestick pattern recognition Library for developers. Functions here within detect viable setups in a variety of popular patterns. Please note some patterns are without filters such as comparisons to average candle sizing, or trend detection to allow the author more freedom.
doji(dojiSize, dojiWickSize)
Detects "Doji" candle patterns
Parameters:
dojiSize (float) : (float) The relationship of body to candle size (ie. body is 5% of total candle size). Default is 5.0 (5%)
dojiWickSize (float) : (float) Maximum wick size comparative to the opposite wick. (eg. 2 = bottom wick must be less than or equal to 2x the top wick). Default is 2
Returns: (series bool) True when pattern detected
dLab(showLabel, labelColor, textColor)
Produces "Doji" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
bullEngulf(maxRejectWick, mustEngulfWick)
Detects "Bullish Engulfing" candle patterns
Parameters:
maxRejectWick (float) : (float) Maximum rejection wick size.
The maximum wick size as a percentge of body size allowable for a top wick on the resolution candle of the pattern. 0.0 disables the filter.
eg. 50 allows a top wick half the size of the body. Default is 0% (Disables wick detection).
mustEngulfWick (bool) : (bool) input to only detect setups that close above the high prior effectively engulfing the candle in its entirety. Default is false
Returns: (series bool) True when pattern detected
bewLab(showLabel, labelColor, textColor)
Produces "Bullish Engulfing" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
bearEngulf(maxRejectWick, mustEngulfWick)
Detects "Bearish Engulfing" candle patterns
Parameters:
maxRejectWick (float) : (float) Maximum rejection wick size.
The maximum wick size as a percentge of body size allowable for a bottom wick on the resolution candle of the pattern. 0.0 disables the filter.
eg. 50 allows a botom wick half the size of the body. Default is 0% (Disables wick detection).
mustEngulfWick (bool) : (bool) Input to only detect setups that close below the low prior effectively engulfing the candle in its entirety. Default is false
Returns: (series bool) True when pattern detected
bebLab(showLabel, labelColor, textColor)
Produces "Bearish Engulfing" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
hammer(ratio, shadowPercent)
Detects "Hammer" candle patterns
Parameters:
ratio (float) : (float) The relationship of body to candle size (ie. body is 33% of total candle size). Default is 33%.
shadowPercent (float) : (float) The maximum allowable top wick size as a percentage of body size. Default is 5%.
Returns: (series bool) True when pattern detected
hLab(showLabel, labelColor, textColor)
Produces "Hammer" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
star(ratio, shadowPercent)
Detects "Star" candle patterns
Parameters:
ratio (float) : (float) The relationship of body to candle size (ie. body is 33% of total candle size). Default is 33%.
shadowPercent (float) : (float) The maximum allowable bottom wick size as a percentage of body size. Default is 5%.
Returns: (series bool) True when pattern detected
ssLab(showLabel, labelColor, textColor)
Produces "Star" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
dragonflyDoji()
Detects "Dragonfly Doji" candle patterns
Returns: (series bool) True when pattern detected
ddLab(showLabel, labelColor, textColor)
Produces "Dragonfly Doji" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color)
Returns: (label) A label visible at the chart level intended for the title pattern
gravestoneDoji()
Detects "Gravestone Doji" candle patterns
Returns: (series bool) True when pattern detected
gdLab(showLabel, labelColor, textColor)
Produces "Gravestone Doji" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
tweezerBottom(closeUpperHalf)
Detects "Tweezer Bottom" candle patterns
Parameters:
closeUpperHalf (bool) : (bool) input to only detect setups that close above the mid-point of the candle prior increasing its bullish tendancy. Default is false
Returns: (series bool) True when pattern detected
tbLab(showLabel, labelColor, textColor)
Produces "Tweezer Bottom" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
tweezerTop(closeLowerHalf)
Detects "TweezerTop" candle patterns
Parameters:
closeLowerHalf (bool) : (bool) input to only detect setups that close below the mid-point of the candle prior increasing its bearish tendancy. Default is false
Returns: (series bool) True when pattern detected
ttLab(showLabel, labelColor, textColor)
Produces "TweezerTop" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
spinningTopBull(wickSize)
Detects "Bullish Spinning Top" candle patterns
Parameters:
wickSize (float) : (float) input to adjust detection of the size of the top wick/ bottom wick as a percent of total candle size. Default is 34%, which ensures the wicks are both larger than the body.
Returns: (series bool) True when pattern detected
stwLab(showLabel, labelColor, textColor)
Produces "Bullish Spinning Top" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
spinningTopBear(wickSize)
Detects "Bearish Spinning Top" candle patterns
Parameters:
wickSize (float) : (float) input to adjust detection of the size of the top wick/ bottom wick as a percent of total candle size. Default is 34%, which ensures the wicks are both larger than the body.
Returns: (series bool) True when pattern detected
stbLab(showLabel, labelColor, textColor)
Produces "Bearish Spinning Top" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
spinningTop(wickSize)
Detects "Spinning Top" candle patterns
Parameters:
wickSize (float) : (float) input to adjust detection of the size of the top wick/ bottom wick as a percent of total candle size. Default is 34%, which ensures the wicks are both larger than the body.
Returns: (series bool) True when pattern detected
stLab(showLabel, labelColor, textColor)
Produces "Spinning Top" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
morningStar()
Detects "Bullish Morning Star" candle patterns
Returns: (series bool) True when pattern detected
msLab(showLabel, labelColor, textColor)
Produces "Bullish Morning Star" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
eveningStar()
Detects "Bearish Evening Star" candle patterns
Returns: (series bool) True when pattern detected
esLab(showLabel, labelColor, textColor)
Produces "Bearish Evening Star" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
haramiBull()
Detects "Bullish Harami" candle patterns
Returns: (series bool) True when pattern detected
hwLab(showLabel, labelColor, textColor)
Produces "Bullish Harami" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
haramiBear()
Detects "Bearish Harami" candle patterns
Returns: (series bool) True when pattern detected
hbLab(showLabel, labelColor, textColor)
Produces "Bearish Harami" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
haramiBullCross()
Detects "Bullish Harami Cross" candle patterns
Returns: (series bool) True when pattern detected
hcwLab(showLabel, labelColor, textColor)
Produces "Bullish Harami Cross" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
haramiBearCross()
Detects "Bearish Harami Cross" candle patterns
Returns: (series bool) True when pattern detected
hcbLab(showLabel, labelColor, textColor)
Produces "Bearish Harami Cross" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color)
Returns: (label) A label visible at the chart level intended for the title pattern
marubullzu()
Detects "Bullish Marubozu" candle patterns
Returns: (series bool) True when pattern detected
mwLab(showLabel, labelColor, textColor)
Produces "Bullish Marubozu" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
marubearzu()
Detects "Bearish Marubozu" candle patterns
Returns: (series bool) True when pattern detected
mbLab(showLabel, labelColor, textColor)
Produces "Bearish Marubozu" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
abandonedBull()
Detects "Bullish Abandoned Baby" candle patterns
Returns: (series bool) True when pattern detected
abwLab(showLabel, labelColor, textColor)
Produces "Bullish Abandoned Baby" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
abandonedBear()
Detects "Bearish Abandoned Baby" candle patterns
Returns: (series bool) True when pattern detected
abbLab(showLabel, labelColor, textColor)
Produces "Bearish Abandoned Baby" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
piercing()
Detects "Piercing" candle patterns
Returns: (series bool) True when pattern detected
pLab(showLabel, labelColor, textColor)
Produces "Piercing" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
darkCloudCover()
Detects "Dark Cloud Cover" candle patterns
Returns: (series bool) True when pattern detected
dccLab(showLabel, labelColor, textColor)
Produces "Dark Cloud Cover" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
tasukiBull()
Detects "Upside Tasuki Gap" candle patterns
Returns: (series bool) True when pattern detected
utgLab(showLabel, labelColor, textColor)
Produces "Upside Tasuki Gap" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
tasukiBear()
Detects "Downside Tasuki Gap" candle patterns
Returns: (series bool) True when pattern detected
dtgLab(showLabel, labelColor, textColor)
Produces "Downside Tasuki Gap" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
risingThree()
Detects "Rising Three Methods" candle patterns
Returns: (series bool) True when pattern detected
rtmLab(showLabel, labelColor, textColor)
Produces "Rising Three Methods" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
fallingThree()
Detects "Falling Three Methods" candle patterns
Returns: (series bool) True when pattern detected
ftmLab(showLabel, labelColor, textColor)
Produces "Falling Three Methods" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
risingWindow()
Detects "Rising Window" candle patterns
Returns: (series bool) True when pattern detected
rwLab(showLabel, labelColor, textColor)
Produces "Rising Window" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
fallingWindow()
Detects "Falling Window" candle patterns
Returns: (series bool) True when pattern detected
fwLab(showLabel, labelColor, textColor)
Produces "Falling Window" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
kickingBull()
Detects "Bullish Kicking" candle patterns
Returns: (series bool) True when pattern detected
kwLab(showLabel, labelColor, textColor)
Produces "Bullish Kicking" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
kickingBear()
Detects "Bearish Kicking" candle patterns
Returns: (series bool) True when pattern detected
kbLab(showLabel, labelColor, textColor)
Produces "Bearish Kicking" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
lls(ratio)
Detects "Long Lower Shadow" candle patterns
Parameters:
ratio (float) : (float) A relationship of the lower wick to the overall candle size expressed as a percent. Default is 75%
Returns: (series bool) True when pattern detected
llsLab(showLabel, labelColor, textColor)
Produces "Long Lower Shadow" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
lus(ratio)
Detects "Long Upper Shadow" candle patterns
Parameters:
ratio (float) : (float) A relationship of the upper wick to the overall candle size expressed as a percent. Default is 75%
Returns: (series bool) True when pattern detected
lusLab(showLabel, labelColor, textColor)
Produces "Long Upper Shadow" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
bullNeck()
Detects "Bullish On Neck" candle patterns
Returns: (series bool) True when pattern detected
nwLab(showLabel, labelColor, textColor)
Produces "Bullish On Neck" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
bearNeck()
Detects "Bearish On Neck" candle patterns
Returns: (series bool) True when pattern detected
nbLab(showLabel, labelColor, textColor)
Produces "Bearish On Neck" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
soldiers(wickSize)
Detects "Three White Soldiers" candle patterns
Parameters:
wickSize (float) : (float) Maximum allowable top wick size throughout pattern expressed as a percent of total candle height. Default is 5%
Returns: (series bool) True when pattern detected
wsLab(showLabel, labelColor, textColor)
Produces "Three White Soldiers" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
crows(wickSize)
Detects "Three Black Crows" candle patterns
Parameters:
wickSize (float) : (float) Maximum allowable bottom wick size throughout pattern expressed as a percent of total candle height. Default is 5%
Returns: (series bool) True when pattern detected
bcLab(showLabel, labelColor, textColor)
Produces "Three Black Crows" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
triStarBull()
Detects "Bullish Tri-Star" candle patterns
Returns: (series bool) True when pattern detected
tswLab(showLabel, labelColor, textColor)
Produces "Bullish Tri-Star" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
triStarBear()
Detects "Bearish Tri-Star" candle patterns
Returns: (series bool) True when pattern detected
tsbLab(showLabel, labelColor, textColor)
Produces "Bearish Tri-Star" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
insideBar()
Detects "Inside Bar" candle patterns
Returns: (series bool) True when pattern detected
insLab(showLabel, labelColor, textColor)
Produces "Inside Bar" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
doubleInside()
Detects "Double Inside Bar" candle patterns
Returns: (series bool) True when pattern detected
dinLab(showLabel, labelColor, textColor)
Produces "Double Inside Bar" identifier label
Parameters:
showLabel (bool) : (series bool) Shows label when input is true. Default is false
labelColor (color) : (series color) Color of the label border and arrow
textColor (color) : (series color) Text color
Returns: (label) A label visible at the chart level intended for the title pattern
wrap(cond, barsBack, borderColor, bgColor)
Produces a box wrapping the highs and lows over the look back.
Parameters:
cond (bool) : (series bool) Condition under which to draw the box.
barsBack (int) : (series int) the number of bars back to begin drawing the box.
borderColor (color) : (series color) Color of the four borders. Optional. The default is `color.gray` with a 45% transparency.
bgColor (color)
Returns: (box) A box whom's top and bottom are above and below the highest and lowest points over the lookback
topWick()
Returns the top wick size of the current candle
Returns: (series float) A value equivelent to the distance from the top of the candle body to its high
bottomWick()
Returns the bottom wick size of the current candle
Returns: (series float) A value equivelent to the distance from the bottom of the candle body to its low
body()
Returns the body size of the current candle
Returns: (series float) A value equivelent to the distance between the top and the bottom of the candle body
highestBody()
Returns the highest body of the current candle
Returns: (series float) A value equivelent to the highest body, whether it is the open or the close
lowestBody()
Returns the lowest body of the current candle
Returns: (series float) A value equivelent to the highest body, whether it is the open or the close
barRange()
Returns the height of the current candle
Returns: (series float) A value equivelent to the distance between the high and the low of the candle
bodyPct()
Returns the body size as a percent
Returns: (series float) A value equivelent to the percentage of body size to the overall candle size
midBody()
Returns the price of the mid-point of the candle body
Returns: (series float) A value equivelent to the center point of the distance bewteen the body low and the body high
bodyupGap()
Returns true if there is a gap up between the real body of the current candle in relation to the candle prior
Returns: (series bool) True if there is a gap up and no overlap in the real bodies of the current candle and the preceding candle
bodydwnGap()
Returns true if there is a gap down between the real body of the current candle in relation to the candle prior
Returns: (series bool) True if there is a gap down and no overlap in the real bodies of the current candle and the preceding candle
gapUp()
Returns true if there is a gap down between the real body of the current candle in relation to the candle prior
Returns: (series bool) True if there is a gap down and no overlap in the real bodies of the current candle and the preceding candle
gapDwn()
Returns true if there is a gap down between the real body of the current candle in relation to the candle prior
Returns: (series bool) True if there is a gap down and no overlap in the real bodies of the current candle and the preceding candle
dojiBody()
Returns true if the candle body is a doji
Returns: (series bool) True if the candle body is a doji. Defined by a body that is 5% of total candle size






















