MTF Bullish/Bearish IndicatorThe script plots a bullish/bearish indicator by evaluating a variety of moving averages for a security across multiple timeframes. It's derived from built in Technical Analysis indicator published by TradingView. The result of evaluation is plotted on the chart in green light/red light format in a configurable location.
evaluated moving averages include
- SMA 10, 20, 30, 50, 100, 200
- EMA 10, 20, 30, 50, 100, 200
- Hull MA 9
- VWMA 20
- Ichimoku Cloud
moving averages are evaluated at chart timeframes and 5 min, 15 min, 30 min, 120 min, 240 min, and daily by default but can be customized.
Cerca negli script per "bear"
Macd Divergence + MTF EMA MACD Divergence + Multi Time Frame EMA
This Strategy uses 3 indicators: the Macd and two emas in different time frames
The configuration of the strategy is:
Macd standar configuration (12, 26, 9) in 1H resolution
10 periods ema, in 1H resolution
5 periods ema, in 15 minutes resolution
We use the two emas to filter for long and short positions.
If 15 minutes ema is above 1H ema, we look for long positions
If 15 minutes ema is below 1H ema, we look for short positions
We can use an aditional filter using a 100 days ema, so when the 15' and 1H emas are above the daily ema we take long positions
Using this filter improves the strategy
We wait for Macd indicator to form a divergence between histogram and price
If we have a bullish divergence, and 15 minutes ema is above 1H ema, we wait for macd line to cross above signal line and we open a long position
If we have a bearish divergence, and 15 minutes ema is below 1H ema, we wait for macd line to cross below signal line and we open a short position
We close both position after a cross in the oposite direction of macd line and signal line
Also we can configure a Take profit parameter and a trailing stop loss
[SCL] True Market StructureSee market structure at a glance with Higher Highs and Lower Lows. Bullish/Bearish/Ranging market bias is automatically derived. Optionally get alerted for breaks in market structure. Uses true Local Highs/Lows instead of simply the highest/lowest "pivot" for x bars. Can be useful as a support for learning market structure or for alerts for a change in structure while you're not at the computer.
Separated ATR - evoThis script plots two ATR (Average True Range) values, one based on only bullish and the other based on only bearish bars. If the current bar is positive, the negative ATR will use its last known negative bar for the calculation. You can smooth bar directions by using the Heikin Ashi setting.
Use this the same way how you would use the regular ATR indicator, but with the added value of knowing which side of the market has more volatility.
TMMS OscillatorThe TMMS oscillator (aka “Trading Made More Simpler”) is an indicator made of conditions based on both 2 separated Stochastic and 1 RSI.
Bullish zone is green and bearish one is red. When the histogram is grey, no signals is available at that time.
The indicator has an option to show the current trend of an Hull moving average (ascending or descending curve). When the trend is up, green dots are plotted on the zero line. When the trend is down, the dots are coloured in red.
Greetings, success with your trade!!!
Dreadblitz BarsThese bars can give you good opportunities if you know how to analyze the context.
blue=bullish
black=bearish
thumbs up
Market Thrust IndicatorThe Market Thrust indicator is a powerful measure of the stock market's internal strength or weakness. There are four components to this indicator:
1-Advancing Issues on the New York Stock Exchange (NYSE) – $ADV
2-Advancing Volume on the NYSE – $UVOL
3-Declining Issues on the NYSE – $DECL
4-Declining Volume on the NYSE – $DVOL
The formula for Market Thrust is given below:
($ADV x $UVOL)-($DECL x $DVOL)
When used for day-trading, the trend of the Market Thrust indicator is what is most important.
Rising Market Thrust Indicator: Considered a bullish sign; can act as a confirmation signal when combined with a rising stock, index ETF, or stock index future's price.
Falling Market Thrust Indicator: Considered a bearish sign; can act as a confirmation signal of a decreasing market price.
The Market Thrust indicator could be used for detecting divergences in trends. Divergences occur when:
- Price is trending higher, but the Market Thrust indicator is not moving higher or is even going down.
- Price is trending lower, however, the Market Thrust technical analysis tool is not trending lower, it is either not trending or is trending higher.
Add a fully configurable trend line over MTI.
Read more at: commodity.com
Engulfing Scanner v1This indicator helps you to quickly identify bullish and bearish engulfing patterns.
Works on currencies only (pips required).
Differential Price Counter for Bullish/Bearish BarsThis script can show the cumulative differential price of both bullish/bearish bars with the 0.1pip precision for the currencies having five decimal precision. However, can be useful for all markets.
RepulseThis indicator was originally developed by Eric Lefort, a professional trader and author from France.
It gauges and displays the bullish or bearish pressure.
Like and follow for more open source indicators!
Happy Trading!
RSI_EMA & Bearish EngulfingThis is a RSI-RSI of EMA and bearish candlestick reversal pattern formed by two candlesticks. Following an uptrend, the first candlestick is a up candlestick which is followed by a down candlestick which has a long real body that engulfs or contains the real body of the prior bar. following an uptrend, if RSI and EMA line cross then Sell and for downtrend if RSI and EMA line cross then Buy.
CMYK VRMI◊ Introduction
This script indicates the relative movement of price x volume.
◊ Origin
Based on 'The Relative Momentum Index' by Roger Altman : February, 1993 issue of Technical Analysis of Stocks & Commodities magazine.
While RSI counts up and down days from close to close, the Relative Momentum Index counts up and down days from the close relative to a close x number of days ago.
This results in an RSI that is smoother. The input has been changed to the change of a smoothed close multiplied by a smoothed volume.
The polarity of VRMI indicates bearish/bullish movement.
◊ Adjustments
CMYK color theme applied.
◊ Usage
VRMI indicates the force the market moves with.
◊ Future Prospects
-
◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊
CMYK VRMI RAYS ◊ Introduction
Introducing VRMI in this script, an RMI based on price movement and volume, to indicate bullish and bearish trends.
This script marks the background depending on RMI <> VRMI , VRMI polarity and large buy/sell sprees.
◊ Origin
Based on 'The Relative Momentum Index' by Roger Altman : February, 1993 issue of Technical Analysis of Stocks & Commodities magazine.
While RSI counts up and down days from close to close, the Relative Momentum Index counts up and down days from the close relative to a close x number of days ago.
This results in an RSI that is smoother.
In addition VRMI reacts quick, it is used to cut off latency from RMI, and it's polarity indicates the beginning and end of a trend.
Large buy sell sprees and detected in their proportion with an sma on the volume
◊ Adjustments
CMYK color theme applied.
◊ Usage
This indicator can be used to detect trends and mark reversals.
◊ Prospects
◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊ ◊
Super Envolvente (Bullish y Bearish)Identificador de Super-envolventes (SE), se encarga de darle un color verde a la SE alzista (Bullish) verde y rojo a la bajista (Bearish).
Bearish signal using Point of Control (POC) with PAC by guruThis indicator code helps traders identify potential sell opportunities using several important technical indicators:
Point of Control (POC) – This is the price level where the most volume was traded over the past several days.
Previous Day's Low – This shows the lowest price reached during the previous day.
PAC (Price Action Channel) EMA – These are two moving averages (one based on the low price and one based on the close price) that help determine if the price is trending within a certain range.
Volume SMA – This is a 3-day simple moving average (SMA) of volume, which helps filter out signals based on market activity.
What the Script Does:
Point of Control (POC):
The script looks at the last 50 days (configurable) and calculates which price level had the highest trading volume.
It then plots a red line on the chart at the POC level. This is important because it helps identify areas where there was strong market interest in the past.
Volume Moving Average:
The script calculates a 3-day SMA of volume, but it excludes the current day to avoid premature signals based on today’s trading.
The volume SMA is used to ensure there’s enough market activity (with a threshold set to 25 units) before triggering a sell signal.
Price Action Channel (PAC) EMA:
The PAC consists of two exponential moving averages (EMAs):
The PAC Low EMA: This is based on the low prices over the last 34 periods (configurable).
The PAC Close EMA: This is based on the closing prices over the last 34 periods.
These EMAs help determine if the price is trending above or below certain price levels.
Sell Signal Logic: The script checks three conditions before displaying a "Sell" signal:
Price Below POC and Previous Day’s Low:
The close price must be below both the Point of Control (POC) and the previous day's low.
Volume SMA Above 25:
The 3-day volume SMA must be greater than 25. This ensures the signal only triggers when there’s enough trading volume in the market.
Today’s Low is Above PAC EMAs:
Today's low price must be above both the PAC low EMA and the PAC close EMA. This prevents sell signals when prices are already significantly below the PAC, indicating possible exhaustion in the downtrend.
If all three conditions are met, the script will display a red "Sell" label on the chart, signaling a potential selling opportunity.
No Sell Signal if Price Reverses:
If the price crosses back above the POC or the previous day's low, the script will remove the sell signal and reset for a new opportunity.
Summary of Conditions:
For the script to display a "Sell" label:
The close price must be below the Point of Control (POC) and the previous day’s low.
The 3-day volume SMA (excluding today) must be greater than 25 units.
The low price of the current day must be above both the PAC low EMA and the PAC close EMA.
If these conditions are met, a red sell label appears on the chart as a potential signal for a short (sell) trade.
PA SystemPA System - Price Action Trading System
价格行为交易系统
📊 概述 / Overview
PA System is a comprehensive price action trading indicator that combines Smart Money Concepts (SMC), market structure analysis, and multi-timeframe confirmation to identify high-probability trade setups. Designed for both manual traders and algorithmic trading systems.
PA System 是一个综合性价格行为交易指标,结合了Smart Money概念(SMC)、市场结构分析和多时间框架确认,用于识别高概率交易机会。适用于手动交易者和算法交易系统。
✨ 核心特性 / Key Features
🎯 Four-Phase Signal System / 四阶段信号系统
H1 (First Pullback) - Initial bullish retracement in uptrend
H2 (Confirmed Entry) - Breakout confirmation for long entries
L1 (First Bounce) - Initial bearish bounce in downtrend
L2 (Confirmed Entry) - Breakdown confirmation for short entries
中文说明:
H1(首次回调) - 上升趋势中的初次回撤信号
H2(确认入场) - 突破确认的做多入场点
L1(首次反弹) - 下降趋势中的初次反弹信号
L2(确认入场) - 跌破确认的做空入场点
📐 Market Structure Detection / 市场结构识别
HH (Higher High) - Uptrend confirmation / 上升趋势确认
HL (Higher Low) - Bullish pullback / 多头回调
LH (Lower High) - Bearish bounce / 空头反弹
LL (Lower Low) - Downtrend confirmation / 下降趋势确认
💎 Smart Money Concepts (SMC) / 智能资金概念
BoS (Break of Structure) - Trend continuation signal / 趋势延续信号
CHoCH (Change of Character) - Potential trend reversal / 潜在趋势反转
📈 Dynamic Trendlines / 动态趋势线
Auto-drawn support and resistance trendlines / 自动绘制支撑阻力趋势线
Real-time extension to current bar / 实时延伸至当前K线
Slope-filtered for accuracy / 斜率过滤确保准确性
🎚️ Multi-Timeframe Analysis / 多时间框架分析
Higher timeframe trend filter (default 4H) / 大周期趋势过滤(默认4小时)
Prevents counter-trend trades / 防止逆势交易
Configurable timeframe / 可配置时间周期
📊 Volume Confirmation / 成交量确认
Filters signals based on volume strength / 基于成交量强度过滤信号
20-period volume MA comparison / 与20期成交量均线对比
High-volume bars highlighted / 高成交量K线高亮显示
🎯 Risk Management Tools / 风险管理工具
Automatic SL/TP calculation and display / 自动计算并显示止损止盈
Visual stop loss and take profit lines / 可视化止损止盈线条
Risk percentage and R:R ratio display / 显示风险百分比和盈亏比
Dynamic stop loss sizing (0.3% - 1.5%) / 动态止损范围(0.3% - 1.5%)
📱 Real-Time Alerts / 实时警报
Instant notifications on H2/L2 signals / H2/L2信号即时通知
Webhook support for automation / 支持Webhook自动化
Mobile, email, and popup alerts / 手机、邮件和弹窗警报
📊 Professional Dashboard / 专业仪表盘
Real-time market state (CHANNEL/RANGE/BREAKOUT) / 实时市场状态
Local and MTF trend indicators / 本地及大周期趋势指标
Order flow status (HIGH VOL / LOW VOL) / 订单流状态
Last signal tracker / 最新信号追踪
🔧 参数设置 / Parameter Settings
Structure Settings / 结构设置
Parameter Default Range Description
Swing Length / 摆动长度 5 2-20 Pivot detection sensitivity / 枢轴点检测灵敏度
Trend Confirm Bars / 趋势确认根数 3 2-10 Consecutive bars for breakout / 突破所需连续K线数
Channel ATR Mult / 通道ATR倍数 2.0 1.0-5.0 Range detection threshold / 区间检测阈值
Signal Settings / 信号设置
Parameter Default Description
Enable H2 Longs / 启用H2做多 ✅ Toggle long signals / 开关做多信号
Enable L2 Shorts / 启用L2做空 ✅ Toggle short signals / 开关做空信号
Micro Range Length / 微平台长度 3 Breakout detection bars / 突破检测K线数
Close Strength / 收盘强度 0.6 Minimum close position in bar / K线内最小收盘位置
Filter Settings / 过滤设置
Parameter Default Description
Use MTF Filter / 大周期过滤 ✅ Enable higher timeframe filter / 启用大周期过滤
MTF Timeframe / 大周期时间框架 240 (4H) Higher timeframe period / 大周期时间
Use Volume Filter / 成交量过滤 ✅ Require high volume confirmation / 需要高成交量确认
Volume MA Length / 成交量均线周期 20 Volume comparison period / 成交量对比周期
Fast EMA / 快速EMA 20 Short-term trend / 短期趋势
Slow EMA / 慢速EMA 50 Long-term trend / 长期趋势
Risk Management / 风险管理
Parameter Default Description
Risk % / 风险百分比 1.0% Risk per trade / 每笔交易风险
R:R Ratio / 盈亏比 2.0 Reward to risk ratio / 盈亏比率
Max SL ATR / 最大止损ATR 3.0 Maximum stop loss in ATR / 最大止损ATR倍数
Min SL % / 最小止损百分比 0.3% Minimum stop loss percentage / 最小止损百分比
Max SL % / 最大止损百分比 1.5% Maximum stop loss percentage / 最大止损百分比
📖 使用方法 / How to Use
1. 基础设置 / Basic Setup
For Day Trading (5-15 min charts) / 日内交易(5-15分钟图)
text
Swing Length: 5
MTF Timeframe: 240 (4H)
Risk %: 1.0%
R:R: 2.0
For Swing Trading (1-4H charts) / 波段交易(1-4小时图)
text
Swing Length: 8
MTF Timeframe: D (Daily)
Risk %: 0.5%
R:R: 3.0
For Scalping (1-5 min charts) / 剥头皮(1-5分钟图)
text
Swing Length: 3
MTF Timeframe: 60 (1H)
Risk %: 0.5%
R:R: 1.5
Use Volume Filter: ✅
2. 信号识别 / Signal Identification
Long Entry / 做多入场
✅ Dashboard shows "Local Trend: BULL" / 仪表盘显示"本地趋势:多头"
✅ MTF Trend shows "BULLISH" / 大周期趋势显示"看涨"
✅ Green circle (H1) appears below bar / 绿色圆点(H1)出现在K线下方
⏳ Wait for H2 signal (green triangle ▲) / 等待H2信号(绿色三角▲)
📊 Check volume bar is cyan (HIGH VOL) / 检查成交量柱为青色(高成交量)
🎯 Enter at close of H2 bar / 在H2 K线收盘价入场
🛡️ Set SL at red dashed line / 止损设在红色虚线位置
🎁 Set TP at green dashed line / 止盈设在绿色虚线位置
Short Entry / 做空入场
✅ Dashboard shows "Local Trend: BEAR" / 仪表盘显示"本地趋势:空头"
✅ MTF Trend shows "BEARISH" / 大周期趋势显示"看跌"
✅ Red circle (L1) appears above bar / 红色圆点(L1)出现在K线上方
⏳ Wait for L2 signal (red triangle ▼) / 等待L2信号(红色倒三角▼)
📊 Check volume bar is cyan (HIGH VOL) / 检查成交量柱为青色(高成交量)
🎯 Enter at close of L2 bar / 在L2 K线收盘价入场
🛡️ Set SL at red dashed line / 止损设在红色虚线位置
🎁 Set TP at green dashed line / 止盈设在绿色虚线位置
3. 警报设置 / Alert Setup
Step-by-Step / 分步操作
Click the "⏰" alert icon on chart / 点击图表上的"⏰"警报图标
Select "PA System - Indicator Version" / 选择"PA System (V1.1) - Indicator Version"
Condition: "Any alert() function call" / 条件:选择"Any alert() function call"
Choose notification method: / 选择通知方式:
📱 Mobile Push / 手机推送
📧 Email / 邮件
🔗 Webhook URL (for automation) / Webhook网址(用于自动化)
Set frequency: "Once Per Bar Close" / 频率:选择"Once Per Bar Close"
Click "Create" / 点击"创建"
Webhook Example for IBKR API / IBKR API的Webhook示例
json
{
"signal": "{{strategy.order.action}}",
"ticker": "{{ticker}}",
"entry": {{close}},
"stop_loss": {{plot_0}},
"take_profit": {{plot_1}},
"timestamp": "{{timenow}}"
}
4. 交易管理 / Trade Management
Position Sizing / 仓位计算
text
Account: $10,000
Risk per Trade: 1% = $100
Entry Price: $690.45
Stop Loss: $687.38
Risk per Share: $690.45 - $687.38 = $3.07
Position Size: $100 / $3.07 = 32 shares
Partial Profit Taking / 部分止盈
Close 50% position at 1:1 R:R / 在1:1盈亏比时平仓50%
Move SL to breakeven / 移动止损至保本位
Let remaining 50% run to 2R target / 让剩余50%跑向2R目标
🎨 视觉元素说明 / Visual Elements Guide
Chart Markers / 图表标记
Symbol Color Meaning
⚫ Small Circle / 小圆点 🟢 Green / 绿色 H1 - First bullish pullback / 首次多头回调
▲ Triangle / 三角形 🟢 Green / 绿色 H2 - Confirmed long entry / 确认做多入场
⚫ Small Circle / 小圆点 🔴 Red / 红色 L1 - First bearish bounce / 首次空头反弹
▼ Inverted Triangle / 倒三角 🔴 Red / 红色 L2 - Confirmed short entry / 确认做空入场
Structure Labels / 结构标签
Label Position Meaning
HH Above high / 高点上方 Higher High - Bullish / 更高的高点-看涨
HL Below low / 低点下方 Higher Low - Bullish / 更高的低点-看涨
LH Above high / 高点上方 Lower High - Bearish / 更低的高点-看跌
LL Below low / 低点下方 Lower Low - Bearish / 更低的低点-看跌
BoS/CHoCH Lines / 破位线条
Type Color Width Meaning
BoS 🔵 Teal / 青色 2px Break of Structure - Trend continues / 结构突破-趋势延续
CHoCH 🔴 Red / 红色 2px Change of Character - Trend reversal / 性质改变-趋势反转
Trendlines / 趋势线
Type Color Style Meaning
Bullish / 看涨 🔵 Teal / 青色 Solid / 实线 Uptrend support / 上升趋势支撑
Bearish / 看跌 🔴 Red / 红色 Solid / 实线 Downtrend resistance / 下降趋势阻力
Risk Lines / 风险线条
Type Color Style Meaning
Stop Loss / 止损 🔴 Red / 红色 Dashed / 虚线 Suggested stop loss level / 建议止损位
Take Profit / 止盈 🟢 Green / 绿色 Dashed / 虚线 Suggested take profit level / 建议止盈位
Dashboard Colors / 仪表盘颜色
Status Color Meaning
BULL / 多头 🟢 Green / 绿色 Bullish trend / 看涨趋势
BEAR / 空头 🔴 Red / 红色 Bearish trend / 看跌趋势
NEUTRAL / 中性 ⚪ Gray / 灰色 No clear trend / 无明确趋势
BREAKOUT / 突破 🟡 Lime / 黄绿 Strong momentum / 强劲动能
HIGH VOL / 高成交量 🔵 Cyan / 青色 High volume confirmation / 高成交量确认
💡 交易策略建议 / Trading Strategy Tips
✅ High Probability Setups / 高概率设置
Trend Alignment / 趋势一致
Local Trend = BULL + MTF Trend = BULLISH / 本地多头 + 大周期看涨
Or: Local Trend = BEAR + MTF Trend = BEARISH / 或:本地空头 + 大周期看跌
Volume Confirmation / 成交量确认
H2/L2 signal appears with cyan volume bar / H2/L2信号伴随青色成交量柱
Volume > 20-period MA / 成交量 > 20期均线
Trendline Support / 趋势线支撑
H2 appears near bullish trendline / H2出现在看涨趋势线附近
L2 appears near bearish trendline / L2出现在看跌趋势线附近
BoS Confirmation / BoS确认
Recent BoS in same direction / 最近同方向的BoS
No CHoCH against the trade / 无逆向的CHoCH
❌ Avoid These Setups / 避免这些情况
Conflicting Trends / 趋势冲突
Local BULL but MTF BEARISH / 本地多头但大周期看跌
Market State = RANGE / 市场状态 = 区间
Low Volume / 低成交量
Order Flow shows "LOW VOL" / 订单流显示"低成交量"
Volume bar is red (below MA) / 成交量柱为红色(低于均线)
Against Trendline / 逆趋势线
Shorting at bullish trendline support / 在看涨趋势线支撑处做空
Buying at bearish trendline resistance / 在看跌趋势线阻力处做多
Recent CHoCH / 近期CHoCH
CHoCH appeared within 10 bars / 10根K线内出现CHoCH
Potential trend reversal zone / 潜在趋势反转区域
🔄 优化建议 / Optimization Tips
For Different Markets / 针对不同市场
Stocks / 股票
text
Swing Length: 5-8
MTF: 240 (4H) or D (Daily)
Risk %: 0.5-1.0%
Best on: SPY, QQQ, AAPL, TSLA
Forex / 外汇
text
Swing Length: 5
MTF: 240 (4H)
Risk %: 1.0-2.0%
Best on: EUR/USD, GBP/USD, USD/JPY
Use Volume Filter: OFF (Forex volume is unreliable)
Crypto / 加密货币
text
Swing Length: 3-5
MTF: 240 (4H)
Risk %: 0.5-1.0% (high volatility)
Max SL %: 2.0-3.0%
Best on: BTC, ETH, SOL
Futures / 期货
text
Swing Length: 5
MTF: 240 (4H)
Risk %: 1.0-1.5%
Best on: ES, NQ, RTY, CL
🤖 自动化集成 / Automation Integration
Python + IBKR API Example / Python + IBKR API示例
python
import requests
from ib_insync import *
def handle_tradingview_alert(alert_data):
"""
Receives webhook from TradingView alert
接收来自TradingView警报的webhook
"""
signal = alert_data # "H2 LONG" or "L2 SHORT"
ticker = alert_data # "SPY"
entry = alert_data # 690.45
stop_loss = alert_data # 687.38
take_profit = alert_data # 696.59
# Connect to IBKR
ib = IB()
ib.connect('127.0.0.1', 7497, clientId=1)
# Create contract
contract = Stock(ticker, 'SMART', 'USD')
# Calculate position size (1% risk)
account_value = ib.accountValues() .value
risk_amount = float(account_value) * 0.01
risk_per_share = abs(entry - stop_loss)
quantity = int(risk_amount / risk_per_share)
# Place order
if "LONG" in signal:
order = MarketOrder('BUY', quantity)
else:
order = MarketOrder('SELL', quantity)
trade = ib.placeOrder(contract, order)
# Set stop loss and take profit
ib.placeOrder(contract, StopOrder('SELL', quantity, stop_loss))
ib.placeOrder(contract, LimitOrder('SELL', quantity, take_profit))
ib.disconnect()
TradersPost Integration / TradersPost集成
Create TradersPost account / 创建TradersPost账户
Connect IBKR broker / 连接IBKR券商
Get Webhook URL / 获取Webhook网址
Add to TradingView alert / 添加到TradingView警报
Test with paper trading / 用模拟账户测试
📊 性能指标 / Performance Metrics
Expected Performance (Backtested) / 预期表现(回测)
Metric Value Notes
Win Rate / 胜率 60-75% With all filters enabled / 启用所有过滤器
Avg R:R / 平均盈亏比 1.8-2.2 Using 2R target / 使用2R目标
Max Drawdown / 最大回撤 8-12% 1% risk per trade / 每笔1%风险
Profit Factor / 盈利因子 1.8-2.5 Trend-following bias / 趋势跟随偏向
Best Markets / 最佳市场 Trending Avoid ranging markets / 避免区间市场
⚠️ Disclaimer: Past performance does not guarantee future results. Always test in paper trading first.
⚠️ 免责声明:历史表现不保证未来结果。请先在模拟账户测试。
🛠️ 故障排除 / Troubleshooting
Problem: No signals appearing / 问题:没有信号出现
Solution / 解决方案:
Disable MTF Filter temporarily / 暂时关闭大周期过滤
Disable Volume Filter / 关闭成交量过滤
Reduce Swing Length to 3 / 将摆动长度降至3
Check if market is ranging (no clear trend) / 检查市场是否处于区间(无明确趋势)
Problem: Too many signals / 问题:信号太多
Solution / 解决方案:
Enable MTF Filter / 启用大周期过滤
Enable Volume Filter / 启用成交量过滤
Increase Swing Length to 8 / 将摆动长度增至8
Enable Break Filter / 启用破位过滤
Problem: Alerts not working / 问题:警报不工作
Solution / 解决方案:
Check "Enable Alerts" is ON / 检查"启用警报"已开启
Verify alert condition is "Any alert() function call" / 确认警报条件为"Any alert() function call"
Check notification settings in TradingView / 检查TradingView通知设置
Test alert with "Test" button / 用"测试"按钮测试警报
Problem: SL/TP lines not showing / 问题:止损止盈线不显示
Solution / 解决方案:
Enable "Show SL/TP Labels" in settings / 在设置中启用"显示止损止盈标签"
Check if signal is recent (lines expire after 10 bars) / 检查信号是否近期(线条在10根K线后消失)
Zoom in to see lines more clearly / 放大图表以更清楚地看到线条
📚 常见问题 FAQ
Q1: Can I use this on any timeframe? / 可以在任何时间框架使用吗?
A: Yes, but works best on 5min-4H charts. Recommended: 15min (day trading), 1H (swing trading).
可以,但在5分钟-4小时图表效果最佳。推荐:15分钟(日内交易),1小时(波段交易)。
Q2: Do I need to enable all filters? / 需要启用所有过滤器吗?
A: No. Start with all enabled, then disable based on your risk tolerance. MTF filter is highly recommended.
不需要。从全部启用开始,然后根据风险承受能力禁用。强烈推荐MTF过滤器。
Q3: Can I automate this with IBKR? / 可以与IBKR自动化吗?
A: Yes! Use TradingView alerts + Webhook + Python script + IBKR API. See automation example above.
可以!使用TradingView警报 + Webhook + Python脚本 + IBKR API。参见上方自动化示例。
Q4: What's the difference between Strategy and Indicator version? / 策略版和指标版有什么区别?
A: Strategy = backtesting only. Indicator = real-time alerts + automation. Use both: backtest with strategy, trade with indicator.
策略版=仅回测。指标版=实时警报+自动化。两者结合使用:用策略版回测,用指标版交易。
Q5: Why does H2 appear but no trade? / 为什么出现H2但没有交易?
A: This is an indicator, not a strategy. You need to manually place orders or use automation via alerts.
这是指标,不是策略。你需要手动下单或通过警报使用自动化。
⚖️ 免责声明 / Disclaimer
IMPORTANT / 重要提示:
This indicator is for educational purposes only. Trading involves substantial risk of loss. Past performance does not guarantee future results. Always:
本指标仅供教育目的。交易涉及重大亏损风险。历史表现不保证未来结果。请务必:
✅ Test in paper trading first / 先在模拟账户测试
✅ Use proper risk management (1-2% max per trade) / 使用适当风险管理(每笔最多1-2%)
✅ Never risk more than you can afford to lose / 永远不要冒超出承受能力的风险
✅ Understand the strategy before using / 使用前理解策略原理
Not financial advice. Trade at your own risk.
非投资建议。交易风险自负。
FVG - MTF Confirmed Tracker [JP/EN]Indicator Description: FVG MTF Concluded Bar Tracker
This indicator is a highly functional tool that identifies FVG for the currently displayed bar or a higher-level bar (MTF) and determines its "resolution" when the candlestick is resolved.
Its most notable feature is that it only displays history (gray) on the chart and sends an alert when a "significant level that has been continuously observed for a certain period of time" is resolved.
1. Timeframe Settings
Base Timeframe: Select the timeframe on which to detect FVG. Select "Same as chart" to use the current bar, or select another bar (1-hour, 4-hour, etc.) to project the FVG of the higher-level bar onto the current chart.
2. Active FVG Settings
Sets the currently active support/resistance area that has not yet been filled by price.
Show Bull/Bear: Individually toggles whether to display bull (buy) and bear (sell) FVG.
Color: Specifies the color of the box for the unresolved state.
Extend Right (Active): When enabled, the box will continue to extend indefinitely toward the right edge of the chart until the FVG is resolved.
Max Active FVG: This sets the maximum number of unresolved boxes to display on the chart. When a new FVG is detected, the oldest unresolved box will be automatically deleted if it exceeds this limit, saving resources.
3. Filled FVG Settings (Resolved, Grayed Out, Determination Logic)
These are very important settings for displaying history when the price fills an FVG.
Show Filled: Select whether to leave resolved FVGs grayed out (default color) as "history."
Color: Specifies the color of boxes that have been resolved (Filled).
Extend Right (Filled): When this is turned off, the box extension will stop at the candlestick where the resolution is confirmed, making the resolution point clear.
Max Filled FVG: This sets the maximum number of grayed out boxes to display as history. When the limit is reached, the oldest history will be deleted.
Min Bars to Keep & Alert (Important): This is the threshold for the number of bars elapsed between the occurrence of an FVG and its resolution.
If the threshold is not met: The event is considered a temporary reaction, and no alert will be sounded. The event will also be deleted without being recorded in the history (gray).
If the threshold is met or exceeded: The event is considered a significant market event, and the box will turn gray and an alert will be sent.
4. Alert Settings (Alert Notification Logic)
Alerts are executed in perfect sync with the "resolution of significant levels (graying out)."
Alert when Bull / Bear turns Gray: A notification will be sent the moment a bullish or bearish FVG is resolved after meeting the threshold and turning gray.
Execution Timing: A notification will only be sent when the candlestick is confirmed. It will not be triggered if the candlestick is only momentarily touched by the wick midway through the candlestick. This allows you to know for sure that the event was resolved at the time of closing.
インジケーター解説:FVG MTF 確定足トラッカー
このインジケーターは、現在表示している足、または上位足(MTF)のFVGを特定し、その「解消」をローソク足の確定時に判定する高機能ツールです。
最大の特徴は、**「一定期間意識され続けた重要な水準」**が解消された時のみ、チャートに履歴(グレー)を残し、アラートを通知する設計にあります。
1. Timeframe Settings(時間足設定)
Base Timeframe / 基準にする時間足: FVGを検知する時間足を選択します。「Same as chart(チャートと同じ)」を選べば現在の足、それ以外(1時間足、4時間足など)を選べば上位足のFVGを現在のチャートに投影します。
2. Active FVG Settings(未解消時の設定ロジック)
まだ価格に埋められていない、現在有効なサポート・レジスタンス領域の設定です。
Show Bull / Bear: ブル(買い)およびベア(売り)のFVGを表示するかどうかを個別に切り替えます。
Color: 未解消状態のボックスの色を指定します。
Extend Right (Active): 有効にすると、FVGが解消されるまでボックスをチャートの右端に向かって無制限に延長し続けます。
Max Active FVG: チャート上に表示する未解消ボックスの最大数です。新しいFVGが検知された際、この上限を超えていると最も古い未解消ボックスが自動的に削除され、リソースを節約します。
3. Filled FVG Settings(解消済み・グレー化・判定本数ロジック)
価格がFVGを埋めた際の、履歴表示に関する非常に重要な設定項目です。
Show Filled: 解消されたFVGを「履歴」としてグレー表示(デフォルト色)で残すかどうかを選択します。
Color: 解消済み(Filled)状態になったボックスの色を指定します。
Extend Right (Filled): これをOFFにすると、解消が確定したローソク足の位置でボックスの延長が止まり、解消地点が明確になります。
Max Filled FVG: 履歴として残すグレーボックスの最大数です。上限に達すると、古い履歴から順に削除されます。
Min Bars to Keep & Alert (重要): FVGが発生してから解消されるまでの「経過本数」の閾値です。
判定本数に満たない場合: 一時的な反応とみなし、アラートを鳴らさず、履歴(グレー)にも残さず削除します。
判定本数以上の場合: 市場で十分に意識された「重要な水準」とみなし、ボックスをグレーに変更し、アラートを通知します。
4. Alert Settings(アラート通知ロジック)
アラートは「重要水準の解消(グレー化)」と完全に同期して実行されます。
Alert when Bull / Bear turns Grey: ブル/ベアそれぞれのFVGが、上記の「判定本数」を満たした状態で解消され、グレーに変化した瞬間に通知を送ります。
実行タイミング: ローソク足の確定時にのみ通知されます。足の途中のヒゲで一時的に触れただけでは鳴りません。これにより、クローズ時点で確実に解消されたことのみを把握できます。
SMI Trigger SystemSMI TRIGGER SYSTEM - DESCRIPTION
Overview
SMI Trigger System is a momentum oscillator that identifies trend changes and reversals using the Smoothed Stochastic Momentum Index (SMI). Features a color-changing line (green = bullish, red = bearish), cloud shading for momentum zones, and triangle markers that appear exactly when momentum flips.
What Makes It Unique:
Real-time color-changing momentum line
Cloud shading split at zero line
Triangle triggers at exact momentum flip points
Overbought/oversold limit lines
Built-in alerts for all key signals
Fully customizable appearance
Works on all timeframes
How to Use
THE DISPLAY
Green line/cloud: Bullish momentum
Red line/cloud: Bearish momentum
Above zero: Bulls in control
Below zero: Bears in control
Upper limit (+40): Overbought
Lower limit (-40): Oversold
SIGNALS
🟢 Green Triangle (▲) - Momentum flipping bullish. Buy signal, most powerful below zero.
🔴 Red Triangle (▼) - Momentum flipping bearish. Sell signal, most powerful above zero.
TRADING STRATEGIES
1. Trend Following
In uptrends: Only take green triangles, ignore red
In downtrends: Only take red triangles, ignore green
Use higher timeframe for trend, lower for entries
Example: Daily uptrend → trade green triangles on 1H chart
2. Limit Reversals
Red triangle at upper limit (+40) = strong reversal signal, go short
Green triangle at lower limit (-40) = strong reversal signal, go long
Wait for triangle AND price confirmation
Most reliable on 4H/Daily timeframes
3. Zero Line Trading
SMI crosses above zero → bullish bias, take green triangles
SMI crosses below zero → bearish bias, take red triangles
Zero acts as momentum baseline
4. Divergence Setups
Price higher high + SMI lower high = bearish divergence → take next red triangle
Price lower low + SMI higher low = bullish divergence → take next green triangle
Most powerful at overbought/oversold limits
ENTRIES & EXITS
Enter: On triangle appearance
Stop: Beyond recent opposite-color triangle
Target: Limit levels or opposite triangle
Add: Additional same-color triangles in strong trends
TIMEFRAME GUIDE
Scalping (1-5m): Lower %K to 3-4, take all trend-aligned triangles
Day trading (15-60m): Default settings (5/3), focus on limit reversals
Swing trading (4H-Daily): Higher %K to 7-10, trade only extreme readings
ADJUSTING SENSITIVITY
SMI %K Length (default: 5):
Lower (3-4) = More signals, faster - good for scalping
Higher (7-10) = Fewer signals, stronger - good for swing trading
SMI %D Length (default: 3):
Lower (1-2) = More responsive
Higher (5-7) = Smoother
ALERTS
Built-in alerts for:
Triangle appears (momentum flips)
SMI crosses zero (trend change)
SMI crosses limits (overbought/oversold)
Enable in settings, configure in TradingView alert dialog.
CUSTOMIZATION
Toggle cloud/triangles on/off
Adjust triangle size and positioning
Customize all colors
Triangle label cap prevents clutter
Key Settings
SMI %K Length (default: 5): Controls sensitivity and signal frequency
SMI %D Length (default: 3): Controls smoothing
SMI Limit (default: 40): Overbought/oversold threshold
Show SMI Cloud (default: ON): Cloud shading
Show SMI Flip Triangles (default: ON): Trigger markers
Triangle Size/Offset: Appearance customization
Enable Alerts (default: ON): Alert notifications
Key Features
✅ Color-changing momentum line
✅ Cloud shading for momentum zones
✅ Triangle triggers at exact flips
✅ Overbought/oversold limits
✅ Built-in alert system
✅ Fully customizable
✅ All timeframes
✅ Adjustable sensitivity
NPR21
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView.
Fractal Market Geometry [JOAT]
Fractal Market Geometry
Overview
Fractal Market Geometry is an open-source overlay indicator that combines fractal analysis with harmonic pattern detection, Fibonacci retracements and extensions, Elliott Wave concepts, and Wyckoff phase identification. It provides traders with a geometric framework for understanding market structure and identifying potential reversal patterns with multi-factor signal confirmation.
What This Indicator Does
The indicator calculates and displays:
Fractal Detection - Identifies fractal highs and lows using Williams-style pivot analysis with configurable period
Fractal Dimension - Calculates market complexity using range-based dimension estimation
Harmonic Patterns - Detects Gartley, Butterfly, Bat, Crab, Shark, Cypher, and ABCD patterns using Fibonacci ratios
Fibonacci Retracements - Key levels at 38.2%, 50%, and 61.8%
Fibonacci Extensions - Projection level at 161.8%
Elliott Wave Count - Simplified wave counting based on pivot detection (1-5)
Wyckoff Phase - Volume-based phase identification (Accumulation, Markup, Distribution, Neutral)
Golden Spiral Levels - ATR-based support and resistance levels using phi (1.618) ratio
Trend Detection - EMA crossover trend identification (20/50 EMA)
How It Works
Fractal detection uses a configurable period to identify swing points:
detectFractalHigh(simple int period) =>
bool result = true
float centerVal = high
for i = 0 to period - 1
if high >= centerVal or high >= centerVal
result := false
break
Harmonic pattern detection uses Fibonacci ratio analysis between swing points. Each pattern has specific ratio requirements:
Gartley: AB 0.382-0.618, BC 0.382-0.886, CD 1.27-1.618
Butterfly: AB 0.382-0.5, BC 0.382-0.886, CD 1.618-2.24
Bat: AB 0.5-0.618, BC 1.13-1.618, CD 1.618-2.24
Crab: AB 0.382-0.618, BC 0.382-0.886, CD 2.24-3.618
Shark: AB 0.382-0.618, BC 1.13-1.618, CD 1.618-2.24
Cypher: AB 0.382-0.618, BC 1.13-1.414, CD 0.786-0.886
Wyckoff phase detection analyzes volume relative to price movement:
wyckoffPhase(simple int period) =>
float avgVol = ta.sma(volume, period)
float priceChg = ta.change(close, period)
string phase = "NEUTRAL"
if volume > avgVol * 1.5 and math.abs(priceChg) < close * 0.02
phase := "ACCUMULATION"
else if volume > avgVol * 1.5 and math.abs(priceChg) > close * 0.05
phase := "MARKUP"
else if volume < avgVol * 0.7
phase := "DISTRIBUTION"
phase
Signal Generation
Signals use multi-factor confirmation for accuracy:
BUY Signal: Fractal low + Uptrend (EMA20 > EMA50) + RSI 30-55 + Bullish candle + Volume confirmation
SELL Signal: Fractal high + Downtrend (EMA20 < EMA50) + RSI 45-70 + Bearish candle + Volume confirmation
Pattern Detection: Label appears when harmonic pattern completes at current bar
Dashboard Panel (Top-Right)
Dimension - Fractal dimension value (market complexity measure)
Last High - Most recent fractal high price
Last Low - Most recent fractal low price
Pattern - Current harmonic pattern name or NONE
Elliott Wave - Current wave count (Wave 1-5) or OFF
Wyckoff - Current market phase or OFF
Trend - BULLISH, BEARISH, or NEUTRAL based on EMA crossover
Signal - BUY, SELL, or WAIT status
Visual Elements
Fractal Markers - Small triangles at fractal highs (down arrow) and lows (up arrow)
Geometry Lines - Dashed lines connecting the most recent fractal high and low
Fibonacci Levels - Clean horizontal lines at 38.2%, 50%, and 61.8% retracement levels
Fibonacci Extension - Horizontal line at 161.8% extension level
Golden Spiral Levels - Support and resistance lines based on ATR x 1.618
3D Fractal Field - Optional depth layers around swing levels (OFF by default)
Harmonic Pattern Markers - Small diamond shapes when Crab, Shark, or Cypher patterns detected
Pattern Labels - Text label showing pattern name when detected
Signal Labels - BUY/SELL labels on confirmed multi-factor signals
Input Parameters
Fractal Period (default: 5) - Bars on each side for fractal detection
Geometry Depth (default: 3) - Complexity of geometric calculations
Pattern Sensitivity (default: 0.8) - Tolerance for pattern ratio matching
Show Fibonacci Levels (default: true) - Display retracement levels
Show Fibonacci Extensions (default: true) - Display extension level
Elliott Wave Detection (default: true) - Enable wave counting
Wyckoff Analysis (default: true) - Enable phase detection
Golden Spiral Levels (default: true) - Display spiral support/resistance
Show Fractal Points (default: true) - Display fractal markers
Show Geometry Lines (default: true) - Display connecting lines
Show Pattern Labels (default: true) - Display pattern name labels
Show 3D Fractal Field (default: false) - Display depth layers
Show Harmonic Patterns (default: true) - Display pattern markers
Show Buy/Sell Signals (default: true) - Display signal labels
Suggested Use Cases
Identify potential reversal zones using harmonic pattern completion
Use Fibonacci levels for entry, stop-loss, and target planning
Monitor Wyckoff phases for accumulation/distribution awareness
Track Elliott Wave counts for trend structure analysis
Use fractal dimension to gauge market complexity
Wait for multi-factor signal confirmation before entering trades
Timeframe Recommendations
Best on 1H to Daily charts. Lower timeframes produce more fractals but with less significance. Higher timeframes provide stronger levels and more reliable signals.
Limitations
Harmonic pattern detection uses simplified ratio ranges and may not match all textbook definitions
Elliott Wave counting is basic and does not include all wave rules
Wyckoff phase detection is volume-based approximation
Fractal dimension calculation is simplified
Signals require fractal confirmation which has inherent lag equal to the fractal period
Open-Source and Disclaimer
This script is published as open-source under the Mozilla Public License 2.0 for educational purposes. It does not constitute financial advice. Past performance does not guarantee future results. Always use proper risk management.
- Made with passion by officialjackofalltrades






















