Kama and HMA trend followerThis strategy is meant to be used to follow trending markets. Use of other methodologies to define or anticipatetrends will greatly enhance profits. Enjoy!
ابحث في النصوص البرمجية عن "trend"
Ichimoku Cloud (Log-Space) - perfect trend areaLog space ichimoku cloud which display perfect bearish trend and perfect bullish trend.
Noro's Trend MAs Strategy v1.7Trade strategy which uses only 2 MA.
The slow MA (blue) is used for definition of a trend
The fast MA (red) is used for an entrance to the transaction
For:
- For H1
- For crypto/fiat
Recomended:
Long = true (if it is profitable as a result of backtests)
Short = true (if it is profitable as a result of backtests)
Stops = false
Stop, % = any
Type of slow MA = 7 (only for Crypto/Fiat)
Source of slow MA = close or OHLC4
Use Fast MA = true
Fast MA Period = 5
Slow MA Period = 20
Bars Q = (2 for "BitCoin/Fiat" or 1 for "Fork/Fiat")
In the new version 1.7
+ stoporders
+ entry arrow (black)
Types of slow MA:
1 = SMA = Simple Moving Average
2 = EMA = Exponential Moving Average
3 = VWMA = Volume-Weighted Moving Average
4 = DEMA = Double Exponential Moving Average
5 = TEMA = Triple Exponential Moving Average
6 = KAMA = Kaufman's Adaptive Moving Average
7 = Price Channel
Noro's Trend MAs Strategy 1.5Trade strategy which uses only 2 MA .
The slow MA (blue) is used for definition of a trend
The fast MA (red) is used for an entrance to the transaction
For:
- For H1
- For crypto/fiat
Recomended:
Long = true (if it is profitable as a result of backtests)
Short = true (if it is profitable as a result of backtests)
Type of slow MA = 7 (only for Crypto/Fiat)
Source of slow MA = clole or OHLC4
Use Fast MA = true
Fast MA Period = 5
Slow MA Period = 20
Bars Q = (2 for "BitCoin/Fiat" or 1 for "Fork/Fiat")
In the new version 1.5
+ Source
+ Types of slow MA
Types of slow MA:
1 = SMA = Simple Moving Average
2 = EMA = Exponential Moving Average
3 = VWMA = Volume-Weighted Moving Average
4 = DEMA = Double Exponential Moving Average
5 = TEMA = Triple Exponential Moving Average
6 = KAMA = Kaufman's Adaptive Moving Average
7 = Price Channel
PS: 100000000%, because of use of a piramiding have turned out
Noro's Trend SMA Strategy v1.4Trade strategy which uses only 2 SMA .
The slow SMA (blue) is used for definition of a trend
The fast SMA (red) is used for an entrance to the transaction
Recomended:
For H1
For crypto/fiat
Long = true (if it is profitable as a result of backtests)
Short = true (if it is profitable as a result of backtests)
Use Fast SMA = true
Fast SMA Period = 5
Slow SMA Period = 20
Bars = (2 for "BitCoin/Fiat" or 1 for "Fork/Fiat")
In the new version 1.4
- Parameters are added
Russian:
Перевожу на понятный. В новой версии 1.4 ничего не поменялось в логике, работает так же. Но добавлены новые параметры, можно поэкспериментировать с настройками, убедиться как что выгоднее.
Есть галка лонг и шорт. По умолчанию обе включены. Если убрать галку лонг, то исчезнут лонги вообще, если убрать шорт, то соответственно исчезнут шорты. По идее галку надо будет снимать если стратегия создает убыточные шорты, то их можно отключить. Смотреть в сводке показателей тестера стратегий профитны они или нет. По идее почти на всех парах крипто/фиат лучше ставить обе галки. Или убирайте галку шорт если не хотите шортить из религиозных соображений.
Добавлена галка отключающая быструю SMA. То есть если галку убрать то стратегия будет её игнорировать. Таким образом, параметр Fast SMA (который 5) перестанет влиять на результаты. Однако, скорее всего без этой галки станет только хуже. Но можете проверить. Позволяет убедиться что входить в сделку по быстрой SMA в среднем немного профитнее, чем входить где попало.
"Bars" - количество свечек одного цвета после после которых будет открываться сделка. По умолчанию 2. Можно от 0 до 3 ставить. Если 0 то цвет свечек игнорируется. Если 3, значит будет ждать 3 красных свечи подряд чтобы открыть лонг. Так же и с зелеными свечами для шорта. 2 - оптимально для пар типа биткойн/фиат. А для пар типа форк/фиат лучше ставить 1 свеча в параметре "Bars".
Angular Trend [DW]This is an experimental study designed to outline the trend of a security based on the average angular change of price.
New lines are drawn whenever the source's angle of change is equal to zero.
Trend Strength IndicatorThis indicator uses Heiken Ashi candle data to plot trend strength signals to your chart.
Bright Green: Heiken Ashi candle data is still putting in higher lows and higher highs, and the price closed above the previous low.
Dark Green: Heiken Ashi candle closed green, but had a lower low or lower high (trend weakening).
Bright Red: Heiken Ashi candle data is still putting in lower lows and lower highs, and the price closed below the previous high.
Dark Red: Heiken Ashi candle closed red, but had a higher low or higher high (trend weakening).
Optional: I included a setting for allowing high RSI values to overrule Heiken Ashi values (disabled by default).
This kind of indicator is best used for managing open positions rather than entering trades. It works on all timeframes and instruments.
Feel free to contact me if you have any questions :)
Regards,
- Matt
PS. Here's a snapshot of it against a Heiken Ashi chart for reference:
Weekly Stock Trend Trading Tool// Created by TheBullTrader, 2017.
// Hi everyone, welcome to my Weekly Trend Trading Tool with the 50 day and 200 day moving averages
// This indicator scores each stock/ index individually and scores them on a simple scale -1.5 to +1.5
// This indicator has 2 zones: green zone = bullish, and red zone = bearish
// There are 3 plots: green = 50 day sma, red = 200 day sma, and trend signal= teal
// Buying Signal is when the green plot crosses teal plot or AGGRESSIVE Buy = green plot beginning to curve up from bearish zone.
// Sell Signal is when the green plot enters the RED ZONE
// By using this indicator as described, it will help you pick stock bottoms and COULD GET YOU OUT OF A STOCK CRASH!
// Recommendations is to scan this indicator against the top 100 US stocks with a long stock history greater than 10 years.
// I usually find 5-10 really good deals every few months. Slow and Easy way to build wealth. **Thanks for reading**
HLC Trend IdentifierIdentifies trends based on a comparison of a High, Low, and Close moving average.
Optionable: By default the Moving Average type is set to EMA but is switchable to a SMA instead.
Optionable: By default it shows cloud coloring of Green or Red based on crossover points.
Optionable: By default it colors the indicator background:
- Green = uptrend
- Red = downtrend
- Yellow = neutral
Romi Trend and Momentum Oscillator
Great oscillator which determines trend and momentum. So accurate it could be used as a stand alone indicator.
Market Trend Strength (MTS) (by ChartArt)See the current trend strength of the market. An additional filter makes trend consolidation areas visible. The color changes there each bar back and forth between green and red.
This area was interesting. Would have been a better example:
If the filter is deactivated the indicator shows the last measured price trend (green for up and down for red).
Trend Trader Strategy This is plots the indicator developed by Andrew Abraham
in the Trading the Trend article of TASC September 1998
[PickMyTrade] Trendline Strategy# PickMyTrade Advanced Trend Following Strategy for Long Positions | Automated Trading Indicator
**Optimize Your Trading with PickMyTrade's Professional Trend Strategy - Auto-Execute Trades with Precision**
---
## Table of Contents
1. (#overview)
2. (#why-this-strategy-makes-money)
3. (#key-features)
4. (#how-it-works)
5. (#strategy-settings--configuration)
6. (#pickmytrade-integration)
7. (#advanced-features)
8. (#risk-management)
9. (#best-practices)
10. (#performance-optimization)
11. (#getting-started)
12. (#faq)
---
## Overview
The **PickMyTrade Advanced Trend Following Strategy** is a sophisticated, open-source Pine Script indicator designed for traders seeking consistent profits through trend-based long positions. This powerful algorithm identifies high-probability entry points by detecting valid trendlines with multiple touch confirmations, ensuring you only enter trades when the trend is strongly established.
### What Makes This Strategy Unique?
- **Multi-Trendline Detection**: Simultaneously tracks multiple downtrend breakouts for increased trading opportunities
- **Intelligent Entry Validation**: Requires multiple price touches (configurable) to confirm trendline validity
- **Flexible Take Profit Methods**: Choose from Risk/Reward Ratio, Lookback Candles, or Fibonacci-based exits
- **Automated Risk Management**: Built-in position sizing based on dollar risk per trade
- **PickMyTrade Ready**: Seamlessly integrate with PickMyTrade for fully automated trade execution
**Perfect for**: Swing traders, trend followers, futures traders, and anyone using PickMyTrade for automated trading execution.
---
## Why This Strategy Makes Money
### 1. **Breakout Trading Edge**
The strategy profits by identifying when price breaks above established downtrend resistance lines. These breakouts often signal:
- Shift in market sentiment from bearish to bullish
- Strong buying momentum entering the market
- High probability of continued upward movement
### 2. **Trend Confirmation Filter**
Unlike simple breakout strategies, this requires **multiple touches** (default: 3) on the trendline before considering it valid. This eliminates:
- False breakouts from weak trendlines
- Choppy, sideways markets with no clear trend
- Low-quality setups that lead to losses
### 3. **Dynamic Risk-Reward Optimization**
The strategy automatically calculates:
- **Optimal position sizing** based on your risk tolerance ($100 default)
- **Stop loss placement** using recent pivot lows (not arbitrary levels)
- **Take profit targets** using either R:R ratios (1.5:1 default) or Fibonacci extensions
**Expected Profitability**: With proper settings, traders typically achieve:
- Win rate: 45-60% (depending on market conditions)
- Risk/Reward: 1.5:1 to 2.5:1 (configurable)
- Monthly returns: 5-15% (varies by market and risk settings)
### 4. **Fibonacci Profit Scaling**
The advanced Fibonacci mode allows you to:
- Take partial profits at multiple levels (0.618, 1.0, 1.312, 1.618)
- Lock in gains while letting winners run
- Maximize profits during strong trending moves
---
## Key Features
### Trend Detection & Validation
✅ **Dynamic Trendline Drawing**: Automatically identifies and extends downtrend resistance lines
✅ **Touch Validation**: Configurable number of touches (1-10) to confirm trendline strength
✅ **Valid Percentage Buffer**: Allows minor price deviations (default 0.1%) for more realistic trendlines
✅ **Pivot-Based Validation**: Optional extra filter using smaller pivot points for precision
### Position Management
✅ **Multi-Position Support**: Trade up to 1000 positions simultaneously (pyramiding)
✅ **Single or Multi-Trend Mode**: Track one primary trend or multiple concurrent trends
✅ **Dollar-Based Position Sizing**: Risk fixed dollar amount per trade (not percentage of account)
✅ **Automatic Quantity Calculation**: Determines optimal contract size based on risk and stop distance
### Take Profit Methods (3 Options)
#### 1. **Risk/Reward Ratio** (Recommended for Beginners)
- Set desired R:R (default 1.5:1)
- Simple, consistent profit targets
- Works well in trending markets
#### 2. **Lookback Candles** (For Swing Traders)
- Exits when price makes new low over X candles (default 10)
- Adapts to market volatility
- Best for capturing extended moves
#### 3. **Fibonacci Extensions** (For Advanced Traders)
- Up to 4 profit targets: 61.8%, 100%, 131.2%, 161.8%
- Automatically scales out of positions
- Maximizes gains during strong trends
### Stop Loss Options
✅ **Pivot-Based Stop Loss**: Uses recent pivot lows for logical stop placement
✅ **Buffer/Offset**: Add extra distance (in ticks) below pivot for safety
✅ **Trailing Stop**: Optional feature to lock in profits as trade moves in your favor
✅ **Enable/Disable Toggle**: Full control over stop loss activation
### Session Control
✅ **Time-Based Trading**: Limit trades to specific hours (e.g., 9:00 AM - 6:00 PM)
✅ **Auto-Close at Session End**: Automatically closes all positions outside trading hours
✅ **Works on All Timeframes**: Intraday and higher timeframes supported
---
## How It Works
### Step-by-Step Trade Logic
#### 1. **Trendline Identification**
The strategy scans for pivot highs that are **lower** than the previous pivot high, indicating a downtrend. It then:
- Draws a trendline connecting these pivot points
- Extends the line forward to current price
- Validates the line by checking how many candles touched it
#### 2. **Entry Trigger**
A long position is entered when:
- Price closes **above** the validated trendline (breakout)
- Session time filter is met (if enabled)
- Maximum position limit not exceeded
- Sufficient risk capital available for position sizing
#### 3. **Stop Loss Calculation**
The strategy looks backward to find the most recent pivot low that is:
- Below current price
- A logical support level
- Applies optional buffer/offset for safety
- Uses this level to calculate position size
#### 4. **Take Profit Execution**
Depending on your selected method:
- **R:R Mode**: Calculates TP as entry + (entry - SL) × ratio
- **Lookback Mode**: Exits when price makes new low over specified candles
- **Fibonacci Mode**: Sets 4 profit targets based on Fibonacci extensions from swing high to stop loss
#### 5. **Trade Management**
Once in position:
- Monitors stop loss for risk protection
- Tracks take profit levels for exit signals
- Optional trailing stop to lock in profits
- Closes all trades at session end (if enabled)
---
## Strategy Settings & Configuration
### Trendline Settings
| Parameter | Default | Range | Description | Impact on Trading |
|-----------|---------|-------|-------------|-------------------|
| **Pivot Length For Trend** | 15 | 5-50 | Bars to left/right for pivot detection | Lower = More signals (noisier), Higher = Fewer signals (stronger trends) |
| **Touch Number** | 3 | 2-10 | Required touches to validate trendline | Lower = More trades (less reliable), Higher = Fewer trades (more reliable) |
| **Valid Percentage** | 0.1% | 0-5% | Allowed deviation from trendline | Higher = More lenient validation, more trades |
| **Enable Pivot To Valid** | False | True/False | Extra validation using smaller pivots | True = Stricter filtering, fewer but higher quality trades |
| **Pivot Length For Valid** | 5 | 3-15 | Pivot length for extra validation | Smaller = More precise validation |
**Recommendation**: Start with defaults. In choppy markets, increase touch number to 4-5. In strongly trending markets, reduce to 2.
### Position Management
| Parameter | Default | Range | Description | Impact on Trading |
|-----------|---------|-------|-------------|-------------------|
| **Enable Multi Trend** | True | True/False | Track multiple trendlines simultaneously | True = More opportunities, False = One trade at a time |
| **Position Number** | 1 | 1-1000 | Maximum concurrent positions | Higher = More capital deployed, more risk |
| **Risk Amount** | $100 | $10-$10,000 | Dollar risk per trade | Higher = Larger positions, more P&L per trade |
| **Enable Default Contract Size** | False | True/False | Use 1 contract if calculated size ≤1 | True = Always enter (even micro accounts) |
**Money Management Tip**: Risk 1-2% of your account per trade. If you have $10,000, set Risk Amount to $100-$200.
### Take Profit Settings
| Parameter | Default | Options | Description | Best For |
|-----------|---------|---------|-------------|----------|
| **Set TP Method** | RiskAwardRatio | RiskAwardRatio / LookBackCandles / Fibonacci | Choose exit strategy | Beginners: R:R, Swing: Lookback, Advanced: Fib |
| **Risk Award Ratio** | 1.5 | 1.0-5.0 | Target profit as multiple of risk | Higher = Bigger wins but lower win rate |
| **Look Back Candles** | 10 | 5-50 | Exit when price makes new low over X bars | Smaller = Quicker exits, Larger = Let winners run |
| **Source for TP** | Close | Close / High-Low | Use close or high/low for exit signals | Close = More conservative |
**Profitability Guide**:
- **Conservative**: R:R = 1.5, Lookback = 10
- **Balanced**: R:R = 2.0, Lookback = 15
- **Aggressive**: R:R = 2.5, Fibonacci mode with 1.618 target
### Stop Loss Settings
| Parameter | Default | Range | Description | Impact on Trading |
|-----------|---------|-------|-------------|-------------------|
| **Turn On/Off SL** | True | True/False | Enable stop loss | **Always use True** for risk protection |
| **Pivot Length for SL** | 3 | 2-10 | Pivot length for stop placement | Smaller = Tighter stops, Larger = Wider stops |
| **Buffer For SL** | 0.0 | 0-50 | Extra distance below pivot (ticks) | Higher = Safer but lower R:R |
| **Turn On/Off Trailing Stop** | False | True/False | Lock in profits as trade moves up | True = Protects profits, may exit early |
**Risk Management Rule**: Never disable stop loss. Use buffer in volatile markets (5-10 ticks).
### Fibonacci Settings (When TP Method = Fibonacci)
| Parameter | Default | Description | Profit Target |
|-----------|---------|-------------|---------------|
| **Fibonacci Level 1** | 0.618 | First profit target | 61.8% of swing range |
| **Fibonacci Level 2** | 1.0 | Second profit target | 100% of swing range |
| **Fibonacci Level 3** | 1.312 | Third profit target | 131.2% extension |
| **Fibonacci Level 4** | 1.618 | Fourth profit target | 161.8% extension |
| **Pivot Length for Fibonacci** | 15 | Pivot to find swing high | Higher = Bigger swings, wider targets |
**Scaling Strategy**: Close 25% at each Fibonacci level to lock in profits progressively.
### Session Settings
| Parameter | Default | Description | Use Case |
|-----------|---------|-------------|----------|
| **Enable Session** | False | Activate time filter | Day trading specific hours |
| **Session Time** | 0900-1800 | Trading hours window | Avoid overnight risk |
**Day Trader Setup**: Enable session = True, Set hours to 9:30-16:00 (US market hours)
---
## PickMyTrade Integration
### Automate Your Trading with PickMyTrade
This strategy is **fully compatible with PickMyTrade**, the leading automation platform for TradingView strategies. Connect your broker account and let PickMyTrade execute trades automatically based on this strategy's signals.
### Why Use PickMyTrade?
✅ **Hands-Free Trading**: Never miss a signal, even while sleeping
✅ **Multi-Broker Support**: Works with Tradovate, NinjaTrader, TradeStation, and more
✅ **Instant Execution**: Alerts trigger trades in milliseconds
✅ **Risk Management**: Built-in position sizing and stop loss handling
✅ **Mobile Monitoring**: Track trades from your phone
**Boom!** Your strategy is now fully automated. Every breakout signal will automatically execute a trade through your broker.
### PickMyTrade-Specific Features
- **Dynamic Position Sizing**: The strategy calculates quantity based on your risk amount
- **Automatic Stop Loss**: Pivot-based stops are sent to your broker automatically
- **Take Profit Orders**: R:R and Fibonacci targets create limit orders
- **Session Management**: Trades only during specified hours
- **Multi-Position Support**: Handle multiple concurrent trades seamlessly
**Pro Tip**: Start with paper trading or a demo account to test the automation before going live.
---
## Advanced Features
### 1. Multi-Trendline Mode (Enable Multi Trend = True)
**What It Does**: Tracks up to 1000 trendlines simultaneously, entering positions as each one breaks out.
**Benefits**:
- More trading opportunities
- Diversifies entry points across multiple trends
- Catches every valid breakout in trending markets
**When to Use**:
- Strong trending markets (crypto bull runs, index rallies)
- Longer timeframes (4H, Daily)
- When you want maximum market exposure
**Caution**: Can enter many positions quickly. Set appropriate Position Number limit and Risk Amount.
### 2. Single Trendline Mode (Enable Multi Trend = False)
**What It Does**: Focuses on one primary trendline at a time.
**Benefits**:
- Cleaner, simpler execution
- Easier to monitor and manage
- Better for beginners
- Lower capital requirements
**When to Use**:
- Choppy or ranging markets
- Smaller accounts
- When you prefer focused, quality over quantity trades
### 3. Fibonacci Profit Scaling
**How It Works**:
1. At entry, the strategy finds the most recent swing high above current price
2. Calculates the range from swing high to stop loss
3. Projects 4 Fibonacci extensions: 61.8%, 100%, 131.2%, 161.8%
4. Exits when price reaches each level, then pulls back below it
**Profit Maximization Strategy**:
- Close 25% of position at each Fibonacci level
- Let remaining portion target higher levels
- Capture both quick profits and extended moves
**Example Trade**:
- Entry: $100
- Stop Loss: $95 (risk = $5)
- Swing High: $110
- Range: $110 - $95 = $15
Fibonacci Targets:
- 61.8% = $95 + ($15 × 0.618) = $104.27 (+4.27%)
- 100% = $95 + ($15 × 1.0) = $110 (+10%)
- 131.2% = $95 + ($15 × 1.312) = $114.68 (+14.68%)
- 161.8% = $95 + ($15 × 1.618) = $119.27 (+19.27%)
**Result**: Even if only first two targets hit, you lock in +7% average gain vs. -5% risk = 1.4:1 R:R
### 4. Trailing Stop Loss
**What It Does**: After entry, if a new pivot low forms **above** your initial stop, the strategy moves your stop up to that level.
**Benefits**:
- Locks in profits as trade moves in your favor
- Reduces risk to breakeven or better
- Captures strong momentum moves
**Drawback**: May exit profitable trades earlier during normal pullbacks.
**Best Practice**: Use in strongly trending markets. Disable in choppy conditions.
### 5. Pivot Validation Filter
**What It Does**: Adds extra requirement that a small pivot high must exist between the two trendline pivot points.
**Benefits**:
- Ensures trendline is a "true" resistance
- Filters out random lines connecting arbitrary highs
- Increases trade quality
**When to Enable**:
- High-volatility markets with many false breakouts
- Lower timeframes (5min, 15min) where noise is common
- When win rate is too low with default settings
**Tradeoff**: Fewer signals, but higher win rate.
### 6. Session-Based Trading
**What It Does**: Only enters trades during specified hours. Auto-closes all positions outside session.
**Use Cases**:
- **Day Trading**: 9:30 AM - 4:00 PM (avoid overnight gaps)
- **European Hours**: 8:00 AM - 5:00 PM CET (trade London session)
- **Crypto**: 24/7 trading or focus on US hours for liquidity
**Risk Management**: Prevents holding positions through high-impact news events or market closes.
---
## Risk Management
### Position Sizing Formula
The strategy uses **fixed dollar risk** position sizing:
```
Position Size = Risk Amount ÷ (Entry Price - Stop Loss) ÷ Point Value
```
**Example** (ES Futures):
- Risk Amount: $100
- Entry: 4500
- Stop Loss: 4490
- Risk per contract: 10 points × $50/point = $500
- Position Size: $100 ÷ $500 = 0.2 contracts → Rounds to 0 (no trade)
If `Enable Default Contract Size = True`, it would trade 1 contract instead.
### Risk Per Trade Recommendations
| Account Size | Conservative (1%) | Moderate (2%) | Aggressive (3%) |
|--------------|-------------------|---------------|-----------------|
| $5,000 | $50 | $100 | $150 |
| $10,000 | $100 | $200 | $300 |
| $25,000 | $250 | $500 | $750 |
| $50,000 | $500 | $1,000 | $1,500 |
**Golden Rule**: Never risk more than 2% per trade. Even with 10 losses in a row, you'd only be down 20%.
### Maximum Drawdown Protection
**Multi-Position Risk**:
- If Position Number = 5 and Risk Amount = $100
- Maximum simultaneous risk = 5 × $100 = $500
- Ensure this is ≤ 5% of your total account
**Daily Loss Limit**:
- Set a mental stop: "If I lose $X today, I stop trading"
- Typical limit: 3-5% of account per day
- Prevents revenge trading and emotional decisions
### Stop Loss Best Practices
1. **Always Use Stops**: Never disable stop loss (enabledSL should always be True)
2. **Buffer in Volatile Markets**: Add 5-10 tick buffer to avoid stop hunts
3. **Respect Your Stops**: Don't manually override or move stops further away
4. **Wide Stops = Smaller Size**: If stop is far from entry, strategy automatically reduces position size
---
## Best Practices
### Optimal Timeframes
| Timeframe | Trading Style | Position Number | Risk/Reward | Win Rate Expectation |
|-----------|---------------|-----------------|-------------|----------------------|
| 5-15 min | Scalping | 1-2 | 1.5:1 | 50-55% |
| 30 min - 1H | Intraday | 2-3 | 2:1 | 55-60% |
| 4H | Swing Trading | 3-5 | 2.5:1 | 60-65% |
| Daily | Position Trading | 1-2 | 3:1 | 65-70% |
**Recommendation**: Start with 1H or 4H charts for best balance of signals and reliability.
### Ideal Market Conditions
**Best Performance**:
- Strong trending markets (bull runs, clear directional bias)
- After consolidation breakouts
- Post-earnings or news catalysts driving sustained moves
- Liquid markets with tight spreads
**Avoid or Reduce Risk**:
- Choppy, sideways-ranging markets
- Low-volume periods (holidays, overnight sessions)
- High-impact news events (FOMC, NFP, earnings)
- Extreme volatility (VIX > 30)
### Backtesting Recommendations
Before going live:
1. **Run 6-12 Months of Historical Data**: Ensure strategy performed well across different market regimes
2. **Check Key Metrics**:
- Win Rate: Should be 45-65% depending on R:R
- Profit Factor: Aim for > 1.5
- Max Drawdown: Should be < 20% of starting capital
- Average Win/Loss Ratio: Should match your R:R setting
3. **Stress Test**: Test during known volatile periods (March 2020, Jan 2022, etc.)
4. **Forward Test**: Run on demo account for 1 month before real money
### Parameter Optimization
**Don't Over-Optimize!** Avoid curve-fitting to past data. Instead:
1. **Start with Defaults**: Use recommended settings first
2. **Change One Parameter at a Time**: Isolate what improves performance
3. **Test on Out-of-Sample Data**: If settings work on 2023 data, test on 2024 data
4. **Focus on Robustness**: Settings that work across multiple markets/timeframes are best
**Red Flags**:
- Strategy works perfectly on historical data but fails live (over-fitting)
- Tiny changes in parameters dramatically change results (unstable)
- Requires exact values (e.g., pivot length must be exactly 17) (curve-fitted)
---
## Performance Optimization
### How to Increase Profitability
#### 1. Optimize Risk/Reward Ratio
- **Current**: 1.5:1 (default)
- **Test**: 2:1, 2.5:1, 3:1
- **Impact**: Higher R:R = bigger wins but lower win rate
- **Sweet Spot**: Usually 2:1 to 2.5:1 for trend strategies
#### 2. Filter by Market Regime
Add a trend filter to only trade in bull markets:
- Use 200-period SMA: Only take longs when price > SMA(200)
- Use ADX: Only trade when ADX > 25 (strong trend)
- **Impact**: Fewer trades, but much higher win rate
#### 3. Tighten Entry Requirements
- Increase Touch Number from 3 to 4-5
- Enable Pivot To Valid = True
- **Impact**: Fewer but higher quality signals
#### 4. Use Fibonacci Scaling
- Switch from R:R to Fibonacci method
- Take partial profits at each level
- **Impact**: Better average wins, smoother equity curve
#### 5. Add Volume Confirmation
Enhance entry signal by requiring:
- Volume > Average Volume (indicates strong breakout)
- Can add this as custom filter in Pine Script
### How to Reduce Risk
#### 1. Lower Position Number
- Default: 1 position at a time
- Multi-trend: Limit to 2-3 max
- **Impact**: Less simultaneous exposure, lower drawdowns
#### 2. Reduce Risk Amount
- Start with $50 per trade (0.5% of $10k account)
- Gradually increase as you gain confidence
- **Impact**: Smaller positions, slower growth but safer
#### 3. Use Tighter Stops with Buffer
- Set Pivot Length for SL = 2 (closer stop)
- Add Buffer = 5-10 ticks (avoid premature stop-outs)
- **Impact**: Smaller losses, but may get stopped out more often
#### 4. Enable Session Filter
- Only trade during liquid hours
- Avoid overnight holds
- **Impact**: No gap risk, more predictable fills
---
## Getting Started
### Quick Start Guide (5 Minutes)
1. **Copy the Strategy Code**
- Open the `.txt` file provided
- Copy all code to clipboard
2. **Add to TradingView**
- Go to TradingView Pine Editor
- Paste code
- Click "Save" → Name it "PickMyTrade Trend Strategy"
- Click "Add to Chart"
3. **Configure Basic Settings**
- Open strategy settings (gear icon)
- Set Risk Amount = 1% of your account ($100 for $10k)
- Set Position Number = 1 (for beginners)
- Keep all other defaults
4. **Backtest on Your Market**
- Choose your instrument (ES, NQ, AAPL, BTC, etc.)
- Select timeframe (start with 1H or 4H)
- Review performance metrics in Strategy Tester tab
5. **Optimize (Optional)**
- Adjust Touch Number (2-5) to balance signals vs. quality
- Try different TP methods (R:R vs. Fibonacci)
- Test on multiple timeframes
6. **Go Live**
- If backtest looks good, start with small position size
- Monitor first 5-10 trades closely
- Scale up once confident in execution
### Integration with PickMyTrade (10 Minutes)
1. **Sign Up for PickMyTrade**
- Visit (pickmytrade.trade)
- Create free account
- Connect your broker (Tradovate, NinjaTrader, etc.)
2. **Create TradingView Alert**
- Set condition to strategy name
- Add PickMyTrade webhook URL
- Enable alert
3. **Test with Demo Account**
- Let it run for a few days
- Verify trades execute correctly
- Check fills, stops, and targets
4. **Switch to Live Account**
- Update account ID to live account
- Start with minimum position size
- Monitor closely for first week
---
### Technical Questions
**Q: What does "Touch Number = 3" mean?**
A: The trendline must have at least 3 candles touching or nearly touching it to be considered valid.
**Q: Why am I getting no trades?**
A: Trendline requirements may be too strict. Try:
- Reduce Touch Number to 2
- Increase Valid Percentage to 0.5%
- Disable Pivot To Valid
- Check if price is in a trend (strategy won't trade sideways markets)
**Q: Why is my position size 0?**
A: Risk Amount is too small for the stop distance. Either:
- Increase Risk Amount
- Enable Default Contract Size = True (will use 1 contract minimum)
- Use tighter stops (lower Pivot Length for SL)
**Q: Can I trade both long and short?**
A: Current code is long-only. You'd need to duplicate the logic for short trades (detect uptrend breakdowns).
**Q: How do I change from TradingView strategy to indicator?**
A: Change line 5 from `strategy(...)` to `indicator(...)`. Replace `strategy.entry()` and `strategy.exit()` with `alert()` calls.
### Risk Management Questions
**Q: What's the maximum drawdown I should expect?**
A: Typically 10-20% depending on settings. If experiencing > 25%, reduce position size or tighten filters.
**Q: Should I risk more to make more money?**
A: No. Risking 2% vs. 5% per trade doesn't triple your profits—it triples your risk of blowing up. Stick to 1-2% per trade.
**Q: What if I hit 5 losses in a row?**
A: Normal. Even with 60% win rate, losing streaks happen. Don't increase position size to "win it back." Stick to your risk plan.
**Q: Do I need to watch the screen all day?**
A: No, especially with PickMyTrade automation. Check positions 1-2 times per day. Overtrading kills profits.
---
## Disclaimer
**Important Risk Disclosure**:
Trading futures, stocks, forex, and cryptocurrencies involves substantial risk of loss and is not suitable for all investors. Past performance is not indicative of future results. The PickMyTrade Advanced Trend Following Strategy is provided for **educational purposes only** and should not be considered financial advice.
**Key Risks**:
- You can lose more than your initial investment
- Backtested results may not reflect live trading performance
- Market conditions change; no strategy works forever
- Automation errors can occur (connectivity, bugs, etc.)
**Before Trading**:
- Consult a licensed financial advisor
- Fully understand the strategy logic
- Test on demo account for at least 1 month
- Only risk capital you can afford to lose
- Start with minimum position sizes
**PickMyTrade**:
This strategy is compatible with PickMyTrade but is not officially endorsed by PickMyTrade. The author is not affiliated with PickMyTrade. For PickMyTrade support, visit their official website.
**License**: This strategy is open-source under Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). You may modify and share, but not for commercial use.
---
**Ready to automate your trading with PickMyTrade? Add this strategy to your TradingView chart today and start capturing profitable trend breakouts on autopilot!**
BuyHighSellLow - Pivot pointsAnother version of buy-high sell-low strategy. This time using pivot points.
Strategy is simple:
Buy when price closes above R1 of pivot point level
Sell when price closes below S2 of pivot point level.
Use Resolution parameter to define pivot points. Higher the resolution, longer the trade time will be. If resolution is set to same as symbol, strategy will consider Higher Timeframe Multiplier to derive pivot point resolution.
Uncheck HideBands to see bands created from pivot points.
Another Buy-High Sell-Low strategy published is using donchian channel (Link below)
Historical Range (Using eStrategy library)⬜ The script is intended to cover few things.
▶ Strategy testing framework based on eStrategy library
▶ Using historicalrange of values for identifying better entry and exits.
This is also built on top of the Systematic Investment Plan script published here
⬜ Strategy testing framework
Strategy testing framework is different from tradingview default strategy testing from few ways to suit the needs of systematic investments.
▶ Supports recurring investment on top of initial investment to emulate adding further funds to the investment bucket on regular basis.
▶ Better calculation of drawdowns based on daily equity rather than drawdown calculated only on close of trade.
▶ Provides better control over how much strategy can reduce and reload
Having said that, this framework is not intended as replacement for tradingview strategy framework. It is not as comprehensive as tradingview strategy framework. But, created to address few specific styles of strategy.
▶ No detailed trade stats on individual trades. But, this can be implemented in future versions
▶ At present only facilitates long positions.
▶ UI features such as plotting trades on chart are not available.
▶ Does not take into consideration of slippage and brokerage - this is not an issue because the framework is not meant for short term trades. It is only made for daily timeframes.
▶ No pyramiding or leverage possible.
And many more...
Framework can be used for similar strategies based on market timing with few small changes.
⬜ Historical Range Strategy
Concept here is, instead of taking indicators such as oscillators as is, use historical percentile to derive better oversold and overbought conditions. Strategy provides different options to base historical range. This can either be based on
▶ Band percent
▶ Oscillator
Different choices of bands and oscillators are also available to chose. However, have not done extensive testing on all the combinations.
⬜ Settings
▶ Initial and recurring investment settings (As confirm inputs)
▶ Buy and hold and strategy specific settings to be used for stat calculation
▶ Band and oscillator parameters
These are straightforward parameters which is used for defining the base of either bands or oscillators.
▶ Percentile moving average parameter
Percentile MA is used with Percentile to find entry and exit signals based on crossover and crossunder.
Feedbacks and suggestions welcome.
Systematic Investment PlanTradingview default strategy tester has few limitations. To name some:
Tradingview default strategy tester does not have option for periodic investment.
Does not allow reduce and refill kind of operations.
Comparison to buy and hold equity does not take into consideration on number of days invested
Hence, I created this as base for my further experiments with respect to strategies involving market timing.
Settings are quite simple and self explanatory.
X-Mas TreeLet's play a game!! Find your Christmas Tree and post it in the comments.
How to use the script?
Open any instrument which best describes the Christmas Tree (Preferably on hourly timeframe).
Apply X-Mas Tree script on the chart.
Enjoy the snowfall, changes in lightings and other animations. Animations only happen if the instrument is in trading session. So, stocks and indexes do not work on weekends and holidays. Use crypto as they are traded 24X7.
Unfortunately cannot post moving charts. But, snapshot of chart will do :)
Well, Please don't ask these questions for this script (Also thanks to @Bjorgum for contributing to this section) 😃
Can you please add alerts?
Does it repaint?
Can we use this for crypto/stock/forex bla bla?
Can you convert this to strategy?
How can I access this indicator?
Can you please give access or how much does it cost?
Can you make it available for MTF?
Indicator is broken. Getting so and so error message etc.
Wish you all MERRY X-MAS and HAPPY NEW YEAR!!
Run TimerThis is a simple utility which counts the number of bars and time elapsed after starting the script. This can be used in time or bars based conditions to modify script behavior.
This particular script does the following:
Starts timer when script is added to chart
Timer is green when starting and continues to be in green if the right Auth key is used in input (Which is hardcoded as 1234 here)
If right auth key is not provided in the input, timer background turns red after trial bars.
Script can be modified to use elapsed time instead.
Thanks to @Bjorgum on assisting on few calculations :)
Percentile - Price vs FundamentalsThis is done in the same lines of below scripts
Drawdown-Price-vs-Fundamentals
Drawdown-Range
Instead of using drawdown, here we are only plotting percentile of drawdown. Also added few more fundamental stats to the indicator. Also using part of the code from Random-Color-Generator/ to automatically generate colors. This in turn uses code from @RicardoSantos for convering color based on HSL to RGB
This is how the study can be used:
Study plots percentile of price and each of the listed fundamentals based on history. History can be chose All time or particular window. If any fundamental or price is near 100 - which means it is nearer to its peak. And if something is near its bottom, it is nearer to its 0th percentile.
Price of the stock is considered undervalued based on historical levels when it is below most of the fundamentals. Price is considered overvalued based on historical levels when it is above all the fundamentals. Please note, being undervalued does not guarantee immediate mean reversion. Stocks can stay undervalued for prolonged time and can go further down. Similarly overvalued stock can stay overvalued for prolonged time before correcting itself or justifying the position. Hence, further discretion needs to be used while using this study.
Few examples:
AMZN seems to be trading in range and so are the fundamentals:
MSFT at peak along with half of the fundamentals. But, debt levels are going up along with margins reducing.
LPX is trading at 15% discount whereas most of the fundamentals are at the peak.
FLGT price seems to have gone down further whereas fundamentals look pretty healthy.
Random Color GeneratorThis script is developed on the basis of Function-HSL-color by @RicardoSantos
Aim of this script is to generate random colors. But, if we just do it based on random RGB values, the colors derived may not be suitable for the background. If you are using light background, lighter colors won't be visible and if you are using darker theme, darker colors will not be appropriate. To overcome this issue, function provided by Racardo converts color(H,S,L) to color(R,G,B). Based on the background present, we define min and max L (Light) range to avoid colors which are either too dark or too light.
Input also allows you to set your custom H,S,L range when Background is set as "Custom"
Drawdown RangeHello death eaters, presenting a unique script which can be used for fundamental analysis or mean reversion based trades.
Process of deriving this table is as below:
Find out ATH for given day
Calculate the drawdown from ATH for the day and drawdown percentage
Based on the drawdown percentage, increment the count of basket which is based on input iNumber of ranges . For example, if number of ranges is 5, then there will be 5 baskets. First basket will fit drawdown percentage 0-20% and each subsequent ones will accommodate next 20% range.
Repeat the process from start to last bar. Once done, table will plot how much percentage of days belong to which basket.
For example, from the below chart of NASDAQ:AAPL
We can deduce following,
Historically stock has traded within 1% drawdown from ATH for 6.59% of time. This is the max amount of time stock has stayed in specific range of drawdown from ATH.
Stock has traded at the drawdown range of 82-83% from ATH for 0.17% of time. This is the least amount of time the stock has stayed in specific range of drawdown from ATH.
At present, stock is trading 2-3% below ATH and this has happened for about 2.46% of total days in trade
Maximum drawdown the stock has suffered is 83%
Lets take another example of NASDAQ:TSLA
Stock is trading at 21-22% below ATH. But, historically the max drawdown range where stock has traded is within 0-1%. Now, if we make this range to show 20 divisions instead of 100, it will look something like this:
Table suggests that stock is trading about 20-25% below ATH - which is right. But, table also suggests that stock has spent most number of days within this drawdown range when we divide it by 20 baskets instad of 100. I would probably wait for price to break out of this range before going long or short. At present, it seems a stage ranging stage. I might think about selling PUTs or covered CALLs outside this range.
Similarly, if you look at AMEX:SPY , 36% of the time, price has stayed within 5% from ATH - makes it a compelling bull case!!
NYSE:BABA is trading at 50-55% below ATH - which is the most it has retraced so far. In general, it is used to be within 15-20% from ATH
NOW, Bit of explanation on input options.
Number of Ranges : Says how many baskets the drawdown map needs to be divided into.
Reference : You can take ATH as reference or chose a time window between which the highest need to be considered for drawdown. This can be useful for megacaps which has gone beyond initial phase of uncertainity. There is no point looking at 80% drawdown AAPL had during 1990s. More approriate to look at it post 2000s where it started making higher impact and growth.
Cumulative Percentage : When this is unchecked, percentage division shows 0-nth percentage instad of percentage ranges. For example this is how it looks on SPY:
We can see that SPY has remained within 6% from ATH for more than 50% of the time.
Hope this is helpful. Happy trading :)
PS: this can be used in conjunction with Drawdown-Price-vs-Fundamentals to pick value stocks at discounted price while also keeping an eye on range tendencies of it.
Thanks to @mattX5 for the ideas and discussion today :)
Drawdown - Price vs FundamentalsIn this study, we are trying to compare drawdown from ATH of price and fundamentals to understand if price drawdown is really justifyable or if this is the buying opportunity.
For example, NYSE:BABA in the chart below shows that price has come down by more than 50%. But, the fundamentals has not changed upto this extent.
This may be viewed as buying opportunity from the eyes of fundamental based trader.
Similarly NYSE:LPX is trading at 15% below ATH whereas fundamentals are at peak. This again can be considered as buying opportunity.
NASDAQ:AAPL on the other hand is trading almost near ATH whereas fundamentals are having higher drawdown.
Well, this is just one factor to consider. I am about to release another script which can demonstrate amount of time (in terms of percentage) instrument trades at certain drawdown range. This looks something like this:
These two scripts can be used in conjunction to define your fundamental based trade.
I can add more funcamentals to the list. But, the higher value of fundamental should correlate to better position. Hence we cannot use things such as PE (which inversely correlates to value). Also need to keep the factor which includes total number of shares in it so that it is not affected by share dilution. Hence, have considered Total Revenue per Share instead of Total Revenue in this script.
Thanks to @mattX5 for suggesting fundamental based ideas in this line :)






















