Short Only | EMA100 + MACD + Bearish Candle | Risk 3:1
This strategy is designed for short trades only on any market (crypto, forex, stocks).
It combines three simple but effective conditions:
Price below EMA100 – confirms downtrend.
MACD Line crosses below Signal Line and is bearish – momentum confirmation.
Bearish candle pattern – confirms entry timing.
Risk/Reward is set to 1:3, using ATR-based dynamic take profit and stop loss.
Works well on 30m to 1h timeframes.
Suitable for crypto pairs and volatile instruments.
指標和策略
Time Period Highlighter V2This indicator highlights custom time periods on any intraday chart in TradingView, making it easier to visualize your preferred trading sessions.
You can define up to three separate time ranges per day, each with precise start and end times down to the minute (e.g., 08:30 - 12:15, 14:00 - 16:45, and 20:00 - 22:30). The indicator shades the background of your chart during these periods, helping you quickly identify when you're most active or when specific market conditions occur.
Key Features:
Set start and end times (hours and minutes) for up to three trading sessions.
Automatically highlights these periods across any intraday timeframe.
Uses 24-hour time format aligned with your TradingView chart timezone.
Perfect for day traders, scalpers, or anyone needing clear visual cues for their trading windows.
This tool is especially useful for reviewing trading strategies, backtesting, or ensuring you're focusing on high-probability market hours.
Tip: Double-check that your chart timezone matches your desired session times for accurate highlighting.
Volume-Based Candle Colorindicates the increase in volume on the individual candles relative to the 20ma on the volume indicator.
ATR as % of Close (Daily)Sometimes, ATR is more comparable and meaningful when we express it in % rather than dollar. This is a quickly developed version (using ChatGPT), so review it and use it with caution, although the calculation is quite straightforward.
סשנים TARgive you al the sessions times in eazy way to see them very clean very helpful such a great indicator to start the life with it
Padre's FVG (Dynamic + Fill Shrink)a dynamic FVG fill up. Marks out FVGs and shrinks them as the gap is filled.
ICT Killzones & Pivots [TFO]Italian time: Traccia dei box per le tre time zone principali: Asia, Europa e America
Position Size Calculator with Fees# Position Size Calculator with Portfolio Management - Manual
## Overview
The Position Size Calculator with Portfolio Management is an advanced Pine Script indicator designed to help traders calculate optimal position sizes based on their total portfolio value and risk management strategy. This tool automatically calculates your risk amount based on portfolio allocation percentages and determines the exact position size needed while accounting for trading fees.
## Key Features
- **Portfolio-Based Risk Management**: Calculates risk based on total portfolio value
- **Tiered Risk Allocation**: Separates trading allocation from total portfolio
- **Automatic Trade Direction Detection**: Determines long/short based on entry vs stop loss
- **Fee Integration**: Accounts for trading fees in position size calculations
- **Risk Factor Adjustment**: Allows scaling of position size up or down
- **Visual Display**: Shows all calculations in a clear, color-coded table
- **Automatic Risk Calculation**: No need to manually input risk amount
## Input Parameters
### Total Portfolio ($)
- **Purpose**: The total value of your investment portfolio
- **Default**: 0.0
- **Range**: Any positive value
- **Step**: 0.01
- **Example**: If your total portfolio is worth $100,000, enter 100000
### Trading Portfolio Allocation (%)
- **Purpose**: The percentage of your total portfolio allocated to active trading
- **Default**: 20.0%
- **Range**: 0.0% to 100.0%
- **Step**: 0.01
- **Example**: If you allocate 20% of your portfolio to trading, enter 20
### Risk from Trading (%)
- **Purpose**: The percentage of your trading allocation you're willing to risk per trade
- **Default**: 0.1%
- **Range**: Any positive value
- **Step**: 0.01
- **Example**: If you risk 0.1% of your trading allocation per trade, enter 0.1
### Entry Price ($)
- **Purpose**: The price at which you plan to enter the trade
- **Default**: 0.0
- **Range**: Any positive value
- **Step**: 0.01
### Stop Loss ($)
- **Purpose**: The price at which you will exit if the trade goes against you
- **Default**: 0.0
- **Range**: Any positive value
- **Step**: 0.01
### Risk Factor
- **Purpose**: A multiplier to scale your position size up or down
- **Default**: 1.0 (no scaling)
- **Range**: 0.0 to 10.0
- **Step**: 0.1
- **Examples**:
- 1.0 = Normal position size
- 2.0 = Double the position size
- 0.5 = Half the position size
### Fee (%)
- **Purpose**: The percentage fee charged per transaction
- **Default**: 0.01% (0.01)
- **Range**: 0.0% to 1.0%
- **Step**: 0.001
## How Risk Amount is Calculated
The script automatically calculates your risk amount using this formula:
```
Risk Amount = Total Portfolio × Trading Allocation (%) × Risk % ÷ 10,000
```
### Example Calculation:
- Total Portfolio: $100,000
- Trading Allocation: 20%
- Risk per Trade: 0.1%
**Risk Amount = $100,000 × 20 × 0.1 ÷ 10,000 = $20**
This means you would risk $20 per trade, which is 0.1% of your $20,000 trading allocation.
## Portfolio Structure Example
Let's say you have a $100,000 portfolio:
### Allocation Structure:
- **Total Portfolio**: $100,000
- **Trading Allocation (20%)**: $20,000
- **Long-term Investments (80%)**: $80,000
### Risk Management:
- **Risk per Trade (0.1% of trading)**: $20
- **Maximum trades at risk**: Could theoretically have 1,000 trades before risking entire trading allocation
## How Position Size is Calculated
### Trade Direction Detection
- **Long Trade**: Entry price > Stop loss price
- **Short Trade**: Entry price < Stop loss price
### Position Size Formulas
#### For Long Trades:
```
Position Size = -Risk Factor × Risk Amount / (Stop Loss × (1 - Fee) - Entry Price × (1 + Fee))
```
#### For Short Trades:
```
Position Size = -Risk Factor × Risk Amount / (Entry Price × (1 - Fee) - Stop Loss × (1 + Fee))
```
## Output Display
The indicator displays a comprehensive table with color-coded sections:
### Portfolio Information (Light Blue Background)
- **Portfolio (USD)**: Your total portfolio value
- **Trading Portfolio Allocation (%)**: Percentage allocated to trading
- **Risk as % of Trading**: Risk percentage per trade
### Trade Setup (Gray Background)
- **Entry Price**: Your specified entry price
- **Stop Loss**: Your specified stop loss price
- **Fee (%)**: Trading fee percentage
- **Risk Factor**: Position size multiplier
### Risk Analysis (Red Background)
- **Risk Amount**: Automatically calculated dollar risk
- **Effective Entry**: Actual entry cost including fees
- **Effective Exit**: Actual exit value including fees
- **Expected Loss**: Calculated loss if stop loss is hit
- **Deviation from Risk %**: Accuracy of risk calculation
### Final Result (Blue Background)
- **Position Size**: Number of shares/units to trade
## Usage Examples
### Example 1: Conservative Long Trade
- **Total Portfolio**: $50,000
- **Trading Allocation**: 15%
- **Risk per Trade**: 0.05%
- **Entry Price**: $25.00
- **Stop Loss**: $24.00
- **Risk Factor**: 1.0
- **Fee**: 0.01%
**Calculated Risk Amount**: $50,000 × 15% × 0.05% ÷ 100 = $3.75
### Example 2: Aggressive Short Trade
- **Total Portfolio**: $200,000
- **Trading Allocation**: 30%
- **Risk per Trade**: 0.2%
- **Entry Price**: $150.00
- **Stop Loss**: $155.00
- **Risk Factor**: 2.0
- **Fee**: 0.01%
**Calculated Risk Amount**: $200,000 × 30% × 0.2% ÷ 100 = $120
**Actual Risk**: $120 × 2.0 = $240 (due to risk factor)
## Color Coding System
- **Green/Red Header**: Trade direction (Long/Short)
- **Light Blue**: Portfolio management parameters
- **Gray**: Trade setup parameters
- **Red**: Risk-related calculations and results
- **Blue**: Final position size result
## Best Practices
### Portfolio Management
1. **Keep trading allocation reasonable** (typically 10-30% of total portfolio)
2. **Use conservative risk percentages** (0.05-0.2% per trade)
3. **Don't risk more than you can afford to lose**
### Risk Management
1. **Start with small risk factors** (1.0 or less) until comfortable
2. **Monitor your total exposure** across all open positions
3. **Adjust risk based on market conditions**
### Trade Execution
1. **Always validate calculations** before placing trades
2. **Account for slippage** in volatile markets
3. **Consider position size relative to liquidity**
## Risk Management Guidelines
### Conservative Approach
- Trading Allocation: 10-20%
- Risk per Trade: 0.05-0.1%
- Risk Factor: 0.5-1.0
### Moderate Approach
- Trading Allocation: 20-30%
- Risk per Trade: 0.1-0.15%
- Risk Factor: 1.0-1.5
### Aggressive Approach
- Trading Allocation: 30-40%
- Risk per Trade: 0.15-0.25%
- Risk Factor: 1.5-2.0
## Troubleshooting
### Common Issues
1. **Position Size shows 0**
- Verify all portfolio inputs are greater than 0
- Check that entry price differs from stop loss
- Ensure calculated risk amount is positive
2. **Very small position sizes**
- Increase risk percentage or risk factor
- Check if your risk amount is too small for the price difference
3. **Large risk deviation**
- Normal for very small positions
- Consider adjusting entry/stop loss levels
### Validation Checklist
- Total portfolio value is realistic
- Trading allocation percentage makes sense
- Risk percentage is conservative
- Entry and stop loss prices are valid
- Trade direction matches your intention
## Advanced Features
### Risk Factor Usage
- **Scaling up**: Use risk factors > 1.0 for high-confidence trades
- **Scaling down**: Use risk factors < 1.0 for uncertain trades
- **Never exceed**: Risk factors that would risk more than your comfort level
### Multiple Timeframe Analysis
- Use different risk factors for different timeframes
- Consider correlation between positions
- Adjust trading allocation based on market conditions
## Disclaimer
This tool is for educational and planning purposes only. Always verify calculations manually and consider market conditions, liquidity, and correlation between positions. The automated risk calculation assumes you're comfortable with the mathematical relationship between portfolio allocation and individual trade risk. Past performance doesn't guarantee future results, and all trading involves risk of loss.
9 EMA Cross 21 EMA Strategy - 1H with 5% TPThe 21/9 EMA crossover strategy is a powerful trend-following method where a buy signal is triggered when the 9 EMA crosses above the 21 EMA, indicating bullish momentum. It works best in trending markets, especially when combined with filters like the 100 EMA to avoid choppy zones. Traders can enhance performance by entering on EMA retests, using a fixed 35-point stop-loss, and setting a 5–8% take profit. This strategy shines on 15-minute to 1-hour charts and can yield massive returns—sometimes up to 300%—when used with discipline and proper risk management. Follow me for more crazy setups!
Custom Time LinesMarks out London and Asia Session open times and close times to help when trading New York Session
CM SlingShot System (Customizable)//@version=5
indicator("CM SlingShot System (Customizable)", overlay=true, shorttitle="CM_SSS")
// ==== 📌 INPUT SETTINGS ====
group1 = "Entry Settings"
sae = input.bool(true, title="📍 Show Aggressive Entry (pullback)?", group=group1)
sce = input.bool(true, title="📍 Show Conservative Entry (confirmation)?", group=group1)
group2 = "Visual Settings"
st = input.bool(true, title="🔼 Show Trend Arrows (top/bottom)?", group=group2)
sl = input.bool(false, title="🅱🆂 Show 'B' & 'S' Letters Instead of Arrows", group=group2)
pa = input.bool(true, title="🡹🡻 Show Entry Arrows", group=group2)
group3 = "MA Settings"
fastLength = input.int(38, title="Fast EMA Period", group=group3)
slowLength = input.int(62, title="Slow EMA Period", group=group3)
timeframe = input.timeframe("D", title="Timeframe for EMAs", group=group3)
// ==== 📈 EMA CALCULATIONS ====
emaFast = request.security(syminfo.tickerid, timeframe, ta.ema(close, fastLength))
emaSlow = request.security(syminfo.tickerid, timeframe, ta.ema(close, slowLength))
col = emaFast > emaSlow ? color.lime : emaFast < emaSlow ? color.red : color.gray
// ==== ✅ SIGNAL CONDITIONS ====
pullbackUp = emaFast > emaSlow and close < emaFast
pullbackDn = emaFast < emaSlow and close > emaFast
entryUp = emaFast > emaSlow and close < emaFast and close > emaFast
entryDn = emaFast < emaSlow and close > emaFast and close < emaFast
// ==== 🌈 CHART PLOTS ====
plot(emaFast, title="Fast EMA", color=color.new(col, 0), linewidth=2)
plot(emaSlow, title="Slow EMA", color=color.new(col, 0), linewidth=4)
fill(plot(emaSlow, title="", color=color.new(col, 0)), plot(emaFast, title="", color=color.new(col, 0)), color=color.silver, transp=70)
// Highlight bars
barcolor(sae and (pullbackUp or pullbackDn) ? color.yellow : na)
barcolor(sce and (entryUp or entryDn) ? color.aqua : na)
// Trend arrows
upTrend = emaFast >= emaSlow
downTrend = emaFast < emaSlow
plotshape(st and upTrend, title="UpTrend", style=shape.triangleup, location=location.belowbar, color=color.green)
plotshape(st and downTrend, title="DownTrend", style=shape.triangledown, location=location.abovebar, color=color.red)
// Entry indicators
plotarrow(pa and entryUp ? 1 : na, colorup=color.green, offset=-1)
plotarrow(pa and entryDn ? -1 : na, colordown=color.red, offset=-1)
plotchar(sl and entryUp ? low - ta.tr : na, char="B", location=location.absolute, color=color.green)
plotchar(sl and entryDn ? high + ta.tr : na, char="S", location=location.absolute, color=color.red)
Daily MAs IntradayThis script overlays up to 6 customizable daily moving averages on any intraday chart. It’s designed for traders who want to see higher-timeframe trend levels while operating on lower timeframes (e.g., 5m, 15m, 1h).
Each line is calculated from daily candle data and projected forward into your intraday chart. This makes it ideal for intraday traders who rely on daily MA levels for trend confirmation, support/resistance, or bounce setups.
EMA Crossover with ArrowPlots two EMAs with a shape to indicate when the short EMA crosses over the long EMA.
Customizable settings
Short/Long EMA duration
Shape Type/Color/Position
Hidden Markov ModelOverview
This model uses a Hidden Markov Model to identify and predict market regimes in real-time. It is designed to probabilistically identify market regime changes and predict potential reversal point using a forward algorithm to calculate the probability of a state.
Unlike traditional technical indicators that rely on price patterns or moving averages, this HMM analyses the underlying statistical structure of market movements to detect when the market transitions between different behavioural states such as trending, ranging, or volatile periods
How it works
The HMM assumes that market behavior follows hidden states that aren't directly observable, but can be inferred from observable market data (emissions). The model uses a (somewhat simplified) Bayesian inference to estimate these probabilities.
State 0: (Normal Trading): Market continuation patterns, balanced buying/selling
State 1: (Top Formation): Exhaustion patterns at price highs
State 2: (Bottom Formation): Capitulation patterns at price lows
How to use
1) Identify the trend (you can also use it counter-trend)
2) For longing, look for a green arrow. The probability values should be red. For shorting, look for a red arrow. The probability values should be green
3) For added confluence, look for high probability values of above 25%.
Advantages and what makes it unique
Unlike moving averages or oscillators that react to price changes, the HMM proactively identifies the underlying market structure. This forward-looking approach can signal regime changes before they become apparent in price action, providing traders with an informational edge.
Multi-Coin Scanner (Part 4) · Bryce Style [BYBIT]ulls 15-minute OHLCV data for each symbol.
Flags bars that meet all of these conditions:
Price closes above the highest high of the previous len candles.
Current candle closes above its own open and above the previous candle’s high (bullish engulfing).
Volume ≥ 20-period SMA of volume (spike).
Candle body is at least bodyThreshold (30 %) of the candle’s total range.
When a bar qualifies, it places a red “💥” label and triggers an alert message (symbol breakout @ price).
Sector SPDR ETFsThis script automatically identifies the SPDR sector ETF that corresponds to the currently viewed US stock ticker. It maps over 500 US-listed stocks to their respective SPDR sector ETFs — such as XLK (Technology), XLF (Financials), XLY (Consumer Discretionary), and others — based on pre-defined symbol lists.
When applied to a chart, the script displays a label below the last candle showing the SPDR sector symbol (e.g., "XLE" for Energy stocks like XOM). This allows traders and investors to quickly understand the sector classification of any stock they analyze.
Key Features:
Maps tickers to SPDR sector ETFs: XLC, XLY, XLP, XLE, XLF, XLV, XLI, XLB, XLRE, XLK, and XLU.
Displays the corresponding sector label on the chart.
Helpful for sector rotation strategies, macro analysis, or thematic investing.
Buy High, Cry Later™ [v.1]🟢 Buy Signal Logic:
RSI > 200? Buy.
MACD crossing in the opposite direction? Buy harder.
A green candle appeared? That’s bullish af.
Elon tweeted something? YOLO all-in.
Signal confirmed by 2 pigeons landing on your window.
🔴 Sell Signal Logic:
Price down 0.1%? Panic sell.
Your neighbor just bought in? Dump it.
Wife walks in? Liquidate everything and pretend you're doing taxes.
Trade hit breakeven? Close immediately, you're not greedy.
💬 Alerts Include:
“Moon incoming 🚀🚀 (probably...)”
“Dump detected – but it might reverse. Or not. Who knows.”
“Just close the chart and go outside, man.”
🛠️ Features:
Ultra-premium “Repaint Mode” – only shows correct signals after they worked.
Martingale-enhanced entries: “Double down or cry trying.”
AI-enhanced backtest: 100% win rate on cherry-picked data from 2003.
⚠️ Disclaimer:
This tool may cause excessive optimism, overtrading, or spontaneous weeping. Not responsible for margin calls or emotional damage.
Opening Print Line (Customizable)📈 Opening Print Line (Customizable) is a simple yet powerful intraday tool that plots the opening price of the regular trading session (RTH) and keeps it visible across the entire chart—including during pre-market and extended hours.
💡 Key Features:
🕒 Configurable time zone selector (choose from Pacific, Mountain, Central, or Eastern)
🎯 Automatically detects and plots the 9:30 AM local opening price
🎨 Customizable line color
🏷️ Optional on-chart label with editable text
This indicator is especially useful for:
Identifying opening breakout or fade setups
Anchoring support/resistance levels to the session open
Building opening range strategies or scalp setups
🔧 Built with Pine Script v6. Fully compatible with stocks, ETFs, futures, or any instrument that follows a regular session open time.
⚠️ Note: The script assumes the regular trading session starts at 9:30 AM in the selected time zone. You can modify the time if using it for futures, crypto, or other markets.
SHMA Quantique – Schrödinger Moving AverageAn experimental moving average inspired by the Schrödinger model. Reacts to momentum and filters noise on small timeframes. Ideal for scalping. 1 minute and up.
RSI Pivot Markers + Breakout Alerts + Anchored VWAPMarks RSI high price with a dotted line and marks low Pivot and puts an anchored vwap to the last rsi low price.
Smart RSI Divergence PRO | Auto Lines + Alerts
Smart RSI Divergence PRO
This indicator automatically finds RSI divergences on price charts:
🔹 Detects both regular & hidden divergences
🔹 Draws auto trendlines connecting swing highs & lows
🔹 Clear triangle labels directly on the chart
🔹 Ready-to-use alerts for your strategy
Use it to spot potential trend reversals and hidden continuation signals.
How it works
Regular Divergence: Price makes a higher high (or lower low) while RSI does not — this can signal a possible trend reversal.
Hidden Divergence: Price makes a lower high (or higher low) while RSI makes a higher high (or lower low) — this can signal a possible trend continuation in the same direction.
Auto Lines & Labels
The script automatically detects local swing highs and lows and draws connecting trendlines on price.
Labels appear on the chart as colored triangles, so signals are easy to see at a glance:
🔻 Red triangle — Regular Bearish Divergence (potential short)
🟠 Orange triangle — Hidden Bearish Divergence (possible trend continuation down)
🟢 Green triangle — Regular Bullish Divergence (potential long)
🔵 Blue triangle — Hidden Bullish Divergence (possible trend continuation up)
Customization
You can adjust:
RSI length
Show/hide regular or hidden divergences
Show/hide auto lines and labels
Customize line width and transparency
Works on any market and any timeframe — crypto, forex, indices, stocks.
⚠️ Disclaimer: This script is for educational purposes only and does not constitute financial advice. Always test any strategy thoroughly and trade at your own risk.