Cari skrip untuk "西班牙人VS奥萨苏纳"
Range: OHLC vs Previous OHLC - Version 2Version 1 here -
This is essentially the same as version 1 with one update. You have the freedom to independently choose OHLC for current candle and prior candle.
To elaborate further, Version 1 had 1 choice. For example, Close; you could only compare the close of prior candle to the current candle.
Version 2; you can compare close of the current candle to the low of the prior candle.
stock gain% vs index gain %This shows the relative strength or weakness of a stock vs an index on any given candle price movement.
Negative stock candle and relative strength shows accumulation
Positive stock candle and relative weakness shows distribution
accumulation will plot an 'A'
distribution will plot a 'D'
Range: OHLC vs Previous OHLCThis will plot your choice of OHLC (or any of the averaging choices) of the current candle compared to the previous candle.
For example if you choose "high" for the input and set the chart to daily, you'll see the currently daily high vs the previous daily high.
Green candle represent a higher high and the length of the candle represents how much higher.
Red candles represent a lower high than the previous day and the length is by how much lower.
This indicator is pretty straight forward, look for me to build on this with something a little more elaborate in the near future.
200/100 vs 190/80 EMA [jarederaj]Track the 200/100 EMA cross Vs the 180/90 EMA cross. Also, see the dates when these periods start on the chart.
Bitfinex Long vs Short RatiosWas impressed with the 'Longs vs Shorts Ratio' idea from the tweet below so I coded an indicator, enjoy.
twitter.com
Compare - Oscillator vs BTC momentumI've made a simple indicator to compare the momentum of a trading pair against the momentum of BTC to the dollar. I use it to see how a pair is affected by BTC's momentum... I wouldnt use it to trade off alone, but it can be a useful tool alongside other indicators.
The time range can be adjusted, but I wouldnt reccomend setting it to anything over 12M, or under 1W.... as I'm not sure if it would work.
Any feedback is welcome!
This is an idea I had after looking at a wonderful visualisation made by BarclayJames, link below:
www.tradingview.com
비트코인 한국 프리미엄 캔들 차트 (Bithumb vs Bitfinex) by 호재박스 슈퍼스타지표명: 비트코인 한국 프리미엄 캔들 차트 (Bithumb vs Bitfinex)
제작자: 호재박스 슈퍼스타
홈페이지: hozaebox.com
BTCUSD long vs short ratio+rsiJust a script I want to share with friends on a discord
orange/green line : longs vs short ratio (100 = only longs, 0 = only shorts)
purple line : RSI of (longs-shorts)
Bitcoin Exchanges Premium (Incl Int & GBTC) vs GdaxShows the exchange premiums internationally (Hong Kong, Luxembourg, Korea, Japan, China) vs Gdax. Also includes GBTC Trust price (adjusted).
Index Vs Futures v4.0 (dashed edition)Generalized script of
Originally designed for bitcoin, but can be used to compare between futures and index (or any two symbol expressions).
Conventions:
- green background := futures deviates 'way above' index
- red background := futures deviates 'way below' index
VS Score [SpiritualHealer117]An experimental indicator that uses historical prices and readings of technical indicators to give the probability that stock and crypto prices will be in a certain range on the next close. This indicator may be helpful for options traders or for traders who want to see the probability of a move.
It classifies returns into five categories:
Extreme Rise - Over 2 standard deviations above normal returns
Rise - Between 0.5 standard deviations and 2 standard deviations above normal returns
Flat - Falling in the range of +/- 0.5 standard deviations of normal returns
Fall - Between 0.5 standard deviations and 2 standard deviations below normal returns
Extreme Fall - Over 2 standard deviations below normal returns
It is an adaptive probability model, which trains on the previous 1000 data points, and is calculated by creating probability vectors for the current reading of the PPO, MA, volume histogram, and previous return, and combining them into one probability vector.
Price vs Moving Average Difference1. Price – MA distance (points)
Shows how many dollars/pips price is above/below the MA.
2. Price – MA distance (%)
Shows the percentage deviation.
Both lines update historically so you can analyze stretch/mean reversion over time.
MA SMART Angle
### 📊 WHAT IS MA SMART ANGLE?
**MA SMART Angle** is an advanced momentum and trend detection indicator that analyzes the angles (slopes) of multiple moving averages to generate clear, non-repainting BUY and SELL signals.
**Original Concept Credit:** This indicator builds upon the "MA Angles" concept originally created by **JD** (also known as Duyck). The core angle calculation methodology and Jurik Moving Average (JMA) implementation by **Everget** are preserved from the original open-source work. The angle calculation formula was contributed by **KyJ**. This enhanced version is published with respect to the open-source nature of the original indicator.
Original indicator reference: "ma angles - JD" by Duyck
---
## 🎯 ORIGINALITY & VALUE PROPOSITION
### **What Makes This Different from the Original:**
While the original "MA Angles" by **JD** provided excellent angle visualization, it lacked actionable entry signals. **MA SMART Angle** addresses this by adding:
**1. Clear Entry/Exit Signals**
- Explicit BUY/SELL arrows based on angle crossovers, momentum confirmation, and MA alignment
- No guessing when to enter trades - the indicator tells you exactly when conditions align
**2. Non-Repainting Logic**
- All signals use confirmed historical data (shifted by 2 bars minimum)
- Critical for backtesting reliability and live trading confidence
- Original indicator could repaint signals on current bar
**3. Dual Signal System**
- **Simple Mode:** More frequent signals based on angle crossovers + momentum (for active traders)
- **Strict Mode:** Requires full multi-MA alignment + momentum confirmation (for conservative traders)
- Adaptable to different trading styles and risk tolerances
**4. Smart Signal Filtering**
- **Anti-spam cooldown:** Prevents duplicate signals within configurable bar count
- **No-trade zone detection:** Filters out low-conviction sideways markets automatically
- **Multi-timeframe MA alignment:** Ensures all moving averages agree on direction before signaling
**5. Enhanced Visualization**
- Large, clear BUY/SELL arrows with descriptive labels
- Color-coded backgrounds for market states (trending vs. ranging)
- Momentum histogram showing acceleration/deceleration in real-time
- Live status table displaying trend strength, angle value, momentum, and MA alignment
**6. Professional Alert System**
- Four distinct alert conditions: BUY Signal, SELL Signal, Strong BUY, Strong SELL
- Enables automated trade notifications and strategy integration
**7. Modified MA Periods**
- Original used EMA(27), EMA(83), EMA(278)
- Enhanced version uses faster EMA(3), EMA(8), EMA(13) for more responsive signals
- Better suited for modern volatile markets and shorter timeframes
---
## 📐 HOW IT WORKS - TECHNICAL EXPLANATION
### **Core Methodology:**
The indicator calculates angles (slopes) for five key moving averages:
- **JMA (Jurik Moving Average)** - Smooth, lag-reduced trend line (original implementation by **Everget**)
- **JMA Fast** - Responsive momentum indicator with higher power parameter
- **MA27 (EMA 3)** - Primary fast-moving average for signal generation
- **MA83 (EMA 8)** - Medium-term trend confirmation
- **MA278 (EMA 13)** - Slower trend filter
### **Angle Calculation Formula (by KyJ):**
```
angle = arctan((MA - MA ) / ATR(14)) × (180 / π)
```
**Why ATR normalization?**
- Makes angles comparable across different instruments (forex, stocks, crypto)
- Makes angles comparable across different timeframes
- Accounts for volatility - a 10-point move in different assets has different significance
**Angle Interpretation:**
- **> 15°** = Strong trend (momentum accelerating)
- **0° to 15°** = Weak trend (momentum present but moderate)
- **-2° to +2°** = No-trade zone (sideways/choppy market)
- **< -15°** = Strong downtrend
### **Signal Generation Logic:**
#### **BUY Signal Conditions:**
1. MA27 angle crosses above 0° (upward momentum initiates)
2. All three EMAs (3, 8, 13) pointing upward (trend alignment confirmed)
3. Momentum is positive for 2+ bars (acceleration, not deceleration)
4. Angle exceeds minimum threshold (not in no-trade zone)
5. Cooldown period passed (prevents signal spam)
#### **SELL Signal Conditions:**
1. MA27 angle crosses below 0° (downward momentum initiates)
2. All three EMAs pointing downward (downtrend alignment)
3. Momentum is negative for 2+ bars
4. Angle below negative threshold (not in no-trade zone)
5. Cooldown period passed
#### **Strong BUY+ / SELL+ Signals:**
Additional entry opportunities when JMA Fast crosses JMA Slow while maintaining strong directional angle - indicates momentum acceleration within established trend.
---
## 🔧 HOW TO USE
### **Recommended Settings by Trading Style:**
**Scalpers / Day Traders:**
- Signal Type: **Simple**
- Minimum Angle: **3-5°**
- Cooldown Bars: **3-5 bars**
- Timeframes: 1m, 5m, 15m
**Swing Traders:**
- Signal Type: **Strict**
- Minimum Angle: **7-10°**
- Cooldown Bars: **8-12 bars**
- Timeframes: 1H, 4H, Daily
**Position Traders:**
- Signal Type: **Strict**
- Minimum Angle: **10-15°**
- Cooldown Bars: **15-20 bars**
- Timeframes: Daily, Weekly
### **Parameter Descriptions:**
**1. Source** (default: OHLC4)
- Price data used for MA calculations
- OHLC4 provides smoothest angles
- Close is more responsive but noisier
**2. Threshold for No-Trade Zones** (default: 2°)
- Angles below this are considered sideways/ranging
- Increase for stricter filtering of choppy markets
- Decrease to allow signals in quieter trending periods
**3. Signal Type** (Simple vs. Strict)
- **Simple:** Angle crossover OR (trend + momentum)
- **Strict:** Angle crossover AND all MAs aligned AND momentum confirmed
- Start with Simple, switch to Strict if too many false signals
**4. Minimum Angle for Signal** (default: 5°)
- Only generate signals when angle exceeds this threshold
- Higher values = stronger trends required
- Lower values = more sensitive to momentum changes
**5. Cooldown Bars** (default: 5)
- Minimum bars between consecutive signals
- Prevents spam during volatile chop
- Scale with your timeframe (higher TF = more bars)
**6. Color Bars** (default: true)
- Colors chart bars based on signal state
- Green = bullish conditions, Red = bearish conditions
- Can disable if you prefer clean price bars
**7. Background Colors**
- **Yellow background** = No-trade zone (low angle, ranging market)
- **Green flash** = BUY signal generated
- **Red flash** = SELL signal generated
- All customizable or can be disabled
---
## 📊 INTERPRETING THE INDICATOR
### **Visual Elements:**
**Main Chart Window:**
- **Thick Lime/Fuchsia Line** = MA27 angle (primary signal line)
- **Medium Green/Red Line** = MA83 angle (trend confirmation)
- **Thin Green/Red Line** = MA278 angle (slow trend filter)
- **Aqua/Orange Line** = JMA Fast (momentum detector)
- **Green/Red Area** = JMA slope (overall trend context)
- **Blue/Purple Histogram** = Momentum (angle acceleration/deceleration)
**Signal Arrows:**
- **Large Green ▲ "BUY"** = Primary buy signal (all conditions met)
- **Small Green ▲ "BUY+"** = Strong momentum buy (JMA fast cross)
- **Large Red ▼ "SELL"** = Primary sell signal (all conditions met)
- **Small Red ▼ "SELL+"** = Strong momentum sell (JMA fast cross)
**Status Table (Top Right):**
- **Angle:** Current MA27 angle in degrees
- **Trend:** Classification (STRONG UP/DOWN, UP/DOWN, FLAT)
- **Momentum:** Acceleration state (ACCEL UP/DN, Up/Down)
- **MAs:** Alignment status (ALL UP/DOWN, Mixed)
- **Zone:** Trading zone status (ACTIVE vs. NO TRADE)
- **Last:** Bars since last signal
### **Trading Strategies:**
**Strategy 1: Pure Signal Following**
- Enter LONG on BUY signal
- Exit on SELL signal
- Use stop-loss at recent swing low/high
- Works best on trending instruments
**Strategy 2: Confirmation with Price Action**
- Wait for BUY signal + bullish candlestick pattern
- Wait for SELL signal + bearish candlestick pattern
- Increases win rate by filtering premature signals
- Recommended for beginners
**Strategy 3: Momentum Acceleration**
- Use BUY+/SELL+ signals for adding to positions
- Only take these in direction of primary signal
- Scalp quick moves during momentum spikes
- For experienced traders
**Strategy 4: Mean Reversion in No-Trade Zones**
- When status shows "NO TRADE", fade extremes
- Wait for angle to exit no-trade zone for reversal
- Contrarian approach for range-bound markets
- Requires tight stops
---
## ⚠️ LIMITATIONS & DISCLAIMERS
**What This Indicator DOES:**
✅ Measures momentum direction and strength via angle analysis
✅ Generates signals when multiple conditions align
✅ Filters out low-conviction sideways markets
✅ Provides visual clarity on trend state
**What This Indicator DOES NOT:**
❌ Predict future price movements with certainty
❌ Guarantee profitable trades (no indicator can)
❌ Work equally well on all instruments/timeframes
❌ Replace proper risk management and position sizing
**Known Limitations:**
- **Lagging Nature:** Like all moving averages, signals occur after momentum begins
- **Whipsaw Risk:** Can generate false signals in volatile, directionless markets
- **Optimization Required:** Parameters need adjustment for different assets
- **Not a Complete System:** Should be combined with risk management, position sizing, and other analysis
**Best Performance Conditions:**
- Strong trending markets (crypto bull runs, stock breakouts)
- Liquid instruments (major forex pairs, large-cap stocks)
- Appropriate timeframe selection (match to trading style)
- Used alongside support/resistance and volume analysis
---
## 🔔 ALERT SETUP
The indicator includes four alert conditions:
**1. BUY SIGNAL**
- Message: "MA SMART Angle: BUY SIGNAL! Angle crossed up with momentum"
- Use for: Primary long entries
**2. SELL SIGNAL**
- Message: "MA SMART Angle: SELL SIGNAL! Angle crossed down with momentum"
- Use for: Primary short entries or long exits
**3. Strong BUY**
- Message: "MA SMART Angle: Strong BUY momentum - JMA fast crossed up"
- Use for: Adding to longs or aggressive entries
**4. Strong SELL**
- Message: "MA SMART Angle: Strong SELL momentum - JMA fast crossed down"
- Use for: Adding to shorts or aggressive exits
**Setting Up Alerts:**
1. Right-click indicator → "Add Alert on MA SMART Angle"
2. Select desired condition from dropdown
3. Choose notification method (popup, email, webhook)
4. Set alert expiration (typically "Once Per Bar Close")
---
## 📚 EDUCATIONAL VALUE
This indicator serves as an excellent learning tool for understanding:
**1. Angle-Based Momentum Analysis**
- Traditional indicators show MA crossovers
- This shows the *rate of change* (velocity) of MAs
- Teaches traders to think in terms of momentum acceleration
**2. Multi-Timeframe Confirmation**
- Shows how fast, medium, and slow MAs interact
- Demonstrates importance of trend alignment
- Helps develop patience for high-probability setups
**3. Signal Quality vs. Quantity Tradeoff**
- Simple mode = more signals, more noise
- Strict mode = fewer signals, higher quality
- Teaches discretionary filtering skills
**4. Market State Recognition**
- Visual distinction between trending and ranging markets
- Helps traders avoid trading choppy conditions
- Develops "market context" awareness
---
## 🔄 DIFFERENCES FROM OTHER MA INDICATORS
**vs. Traditional MA Crossovers:**
- Measures momentum (angle) rather than just price crossing MA
- Provides earlier signals as angles change before price crosses
- Filters better for sideways markets using no-trade zones
**vs. MACD:**
- Uses multiple MAs instead of just two
- ATR normalization makes it universal across instruments
- Visual angle representation more intuitive than histogram
**vs. Supertrend:**
- Not based on ATR bands but on MA slope analysis
- Provides graduated strength indication (not just binary trend)
- Less prone to whipsaw in low volatility
**vs. Original "MA Angles" by JD:**
- Adds explicit entry/exit signals (original had none)
- Implements no-repaint logic for reliability
- Includes signal filtering and quality controls
- Provides dual signal systems (Simple/Strict)
- Enhanced visualization and status monitoring
- Uses faster MA periods (3/8/13 vs 27/83/278) for modern markets
---
## 📖 CODE STRUCTURE (for Pine Script learners)
This indicator demonstrates:
**Advanced Pine Script Techniques:**
- Custom function implementation (JMA, angle calculation)
- Var declarations for stateful tracking
- Table creation for HUD display
- Multi-condition signal logic
- Alert system integration
- Proper use of historical references for no-repaint
**Code Organization:**
- Modular function definitions (JMA, angle)
- Clear separation of concerns (inputs, calculations, plotting, alerts)
- Extensive commenting for maintainability
- Best practices for Pine Script v5
**Learning Resources:**
- Study the JMA function to understand adaptive smoothing
- Examine angle calculation for ATR normalization technique
- Review signal logic for multi-condition confirmation patterns
- Analyze anti-spam filtering for state management
The code is open-source - feel free to study, modify, and improve upon it!
---
## 🙏 CREDITS & ATTRIBUTION
**Original Concepts:**
- **"ma angles - JD" by JD (Duyck)** - Core angle calculation methodology and indicator concept
Original open-source indicator on TradingView Community Scripts
- **JMA (Jurik Moving Average) implementation by Everget** - Smooth, low-lag moving average function
Acknowledged in original JD indicator code
- **Angle Calculation formula by KyJ** - Mathematical formula for converting MA slope to degrees using ATR normalization
Acknowledged in original JD indicator code comments
**Enhancements in This Version:**
- Signal generation logic - Original implementation for this indicator
- No-repaint confirmation system - Original implementation
- Dual signal modes (Simple/Strict) - Original implementation
- Visual enhancements and status table - Original implementation
- Alert system and signal filtering - Original implementation
- Modified MA periods (3/8/13 instead of 27/83/278) - Optimization for modern markets
**Open Source Philosophy:**
This indicator follows the open-source spirit of TradingView and the Pine Script community. The original "ma angles - JD" by JD (Duyck) was published as open-source, enabling this enhanced version. Similarly, this code is published as open-source to allow further community improvements.
---
## ⚡ QUICK START GUIDE
**For New Users:**
1. Add indicator to chart
2. Start with default settings (Simple mode)
3. Wait for BUY signal (green arrow)
4. Observe how price behaves after signal
5. Check status table to understand market state
6. Adjust parameters based on your instrument/timeframe
**For Experienced Traders:**
1. Switch to Strict mode for higher quality signals
2. Increase cooldown bars to reduce frequency
3. Raise minimum angle threshold for stronger trends
4. Combine with your existing strategy for confirmation
5. Set up alerts for desired signal types
6. Backtest on your preferred instruments
---
## 🎓 RECOMMENDED COMBINATIONS
**Works Well With:**
- **Volume Analysis:** Confirm signals with volume spikes
- **Support/Resistance:** Take signals near key levels
- **RSI/Stochastic:** Avoid overbought/oversold extremes
- **ATR:** Size positions based on volatility
- **Price Action:** Wait for candlestick confirmation
**Complementary Indicators:**
- Order Flow / Footprint (for institutional confirmation)
- Volume Profile (for identifying value areas)
- VWAP (for intraday mean reversion reference)
- Fibonacci Retracements (for target setting)
---
## 📈 PERFORMANCE EXPECTATIONS
**Realistic Win Rates:**
- Simple Mode: 45-55% (higher frequency, moderate accuracy)
- Strict Mode: 55-65% (lower frequency, higher accuracy)
- Combined with price action: 60-70%
**Best Asset Classes:**
1. **Cryptocurrencies** (strong trends, clear signals)
2. **Forex Major Pairs** (smooth price action, good angles)
3. **Large-Cap Stocks** (trending behavior, liquid)
4. **Index Futures** (trending instruments)
**Challenging Conditions:**
- Low volatility consolidation periods
- News-driven erratic movements
- Thin/illiquid instruments
- Counter-trending markets
---
## 🛡️ RISK DISCLAIMER
**IMPORTANT LEGAL NOTICE:**
This indicator is for **educational and informational purposes only**. It is **NOT financial advice** and does not constitute a recommendation to buy or sell any financial instrument.
**Trading Risks:**
- Trading carries substantial risk of loss
- Past performance does not guarantee future results
- No indicator can predict market movements with certainty
- You can lose more than your initial investment (especially with leverage)
**User Responsibilities:**
- Conduct your own research and due diligence
- Understand the instruments you trade
- Never risk more than you can afford to lose
- Use proper position sizing and risk management
- Consider consulting a licensed financial advisor
**Indicator Limitations:**
- Signals are based on historical data only
- No guarantee of accuracy or profitability
- Parameters must be optimized for your specific use case
- Results vary significantly by market conditions
By using this indicator, you acknowledge and accept all trading risks. The author is not responsible for any financial losses incurred through use of this indicator.
---
## 📧 SUPPORT & FEEDBACK
**Found a bug?** Please report it in the comments with:
- Chart symbol and timeframe
- Parameter settings used
- Description of unexpected behavior
- Screenshot if possible
**Have suggestions?** Share your ideas for improvements!
**Enjoying the indicator?** Leave a like and follow for updates!






















