BTC and ETH Long strategy - version 1I will start with a small introduction about myself. I'm now trading cryto currencies manually for almost 2 years. I decided to start after watching a documentary on the TV showing people who made big money during the Bitcoin pump which happened at the end of 2017.
The next day, I asked myself "Why should I not give it a try and learn how to trade".
This was in February 2018 and the price of Bitcoin was around 11500USD.
I didn't know how to trade. In fact, I didn't know the trading industry at all.
So, my first step into trading was to open an account with a broken. Then I directly bought 200$ worst of BTC . At that time, I saw the graph and thought "This can only go back in the upward direction!" :)
I didn't know anything about Stop loss, Take profit and Risk management.
Today, almost 2 years after, I think that I know how to trade and can also confirm that I still hold this bag of 200$ of bitcoin from 2018 :)
I did spend the 2 last years to learn technical analysis , risk management and leverage trading.
Today (14/05/2020), I know what I'm doing and I'm happy to see that the 2 last years have been positive in terms of gains. Of course, I did not make crazy money with my saving but at least I made more than if I would have kept it in my bank account.
Even if I like trading, I have a full time job which requires my full energy and lots of focus, so, the biggest problem I had is that I didn't have enough time to look at the charts.
Also, I realized that sometimes, neither technical analysis , nor fundamentals worked with crypto currency (at least for short time trading). So, as I have a developer background I decided to try to have a look at algo trading.
The goal for me was neither to make complex algos nor to beat the market but just to automate my trading with simple bot catching the big waves.
I then started to take a look at TV pine script and played with it.
I did my first LONG script in February 2020 to Long the BTC Market. It has some limitations but works well enough for me for the time being. Even if the real trades will bring me half of what the back testing shows, this will still be a lot more than what I was used to win during the last 2 years with my manual trading.
So, here we are! Below you will find some details about my first LONG script. I'm happy to share it with you.
Feel free to play with it, give your comments and bring improvements to it.
But please note that it only works fine with the candle size and crypto pair that I have mentioned below. If you use other settings this algo might loose money!
- Crypto pairs : XBTUSD and ETHXBT
- Candle size: 2 Hours
- Indicator used: Volatility , MACD (12, 26, 7), SMA (100), SMA (200), EMA (20)
- Default StopLoss: -1.5%
- Entry in position if: Volatility < 2%
AND MACD moving up
AND AME (20) moving up
AND SMA (100) moving up
AND SMA (200) moving up
AND EMA (20) > SAM (100)
AND SMA (100) > SMA (200)
- Exit the postion if: Stoploss is reached
OR EMA (20) crossUnder SMA (100)
Here is a summary of the results for this script:
XBTUSD : 01/01/2019 --> 14/05/2020 = +107%
ETHXBT : 01/01/2019 --> 14/05/2020 = +39%
ETHUSD : 01/01/2019 --> 14/05/2020 = +112%
It is far away from being perfect. There are still plenty of things which can be done to improve it but I just wanted to share it :) .
Enjoy playing with it....
"黄金近20年走势" için komut dosyalarını ara
BO - Bar M15 2/3 SignalBO - Bar M15 2/3 Signal show the signal to trade Binary Option with rule below:
A. Indicator
* Bollinger Band (20,2): avoid waterfall
B. Rule of Signal
1. Rule1: Split Bar M15 to 3 part and load them on M5 chart (recommend use M5 IDC chart)
2. Rule 2: Delay 10' after bar M15 open => wait for price's pattern
3. Rule 3: Put Signal row 30-32
* Delay 10' after bar M15 open.
* Direction of 1/3 and 2/3 Bar M15 is upward
* close of 2/3 Bar M15 below upper band Bb(20,2) on M5 chart => avoid strong buy
4. Rule 4: Call Signal row 36-38
* Delay 10' after bar M15 open.
* Direction of 1/3 and 2/3 Bar M15 is downward
* close of 2/3 Bar M15 above lower band Bb(20,2) on M5 chart => avoid strong sell
C. Recommend Expiry time: Bar M15 close
* We try to catch the shadow of Bar M15 but dont trade when price run on the upper or lower band of BB(20,2,M5)
Average Candle Length 2.0This script will tell you the following:
• Average length of all the candles (wick to wick) for the last 20 candles
-- shown in blue
• Average length of bull (green) candles (wick to wick) for the last 20 candles
-- shown in green
• Average length of bear (red) candles (wick to wick) for the last 20 candles
-- shown in red
___________________________________________
Inputs:
• # of Candles to analyze (default = 20)
Pivot trend indicatorThis is a LAGGING indicator which can provide a good indication of trend. It require a certain (configurable) number of candles to have closed before it can determine whether a pivot has formed.
It provides a 20 period SMA for the timeframe of your choice which is color coded to show the trend according to confirmed pivots.
Anticipated usage:
Long / Short bias is determined by pivot trend
Trader seeks entries according to their strategy
Black consolidation areas may trigger a re-evaluation of the trade and can serve as good profit taking areas
The SMA colors:
Green -> Higher highs & Higher lows
Red -> Lower highs & Lowers lows
Black -> No clear trend from the pivots
Why the 20 SMA?
Feel free to adjust it for your purposes. I personally find that using a higher time frame 20 SMA is a better indication of trend than longer period MAs on shorter time frames. This can be seen from comparing the 20 daily SMA and 200 hourly SMA.
Pivot adjustment
The pivots use the selected time frame (not) the MA trend time frame. You can specify the left and right candles required to confirm a pivot
VIX reversion-Buschi
English:
A significant intraday reversion (commonly used: 3 points) on a high (over 20 points) S&P 500 Volatility Index (VIX) can be a sign of a market bottom, because there is the assumption that some of the "big guys" liquidated their options / insurances because the worst is over.
This indicator shows these reversions (3 points as default) when the VIX was over 20 points. The character "R" is then shown directly over the daily column, the VIX need not to be loaded explicitly.
Deutsch:
Eine deutliche Intraday-Umkehr (3 Punkte im Normalfall) bei einem hohen (über 20 Punkte) S&P 500 Volatility Index (VIX) kann ein Zeichen für eine Bodenbildung im Markt sein, weil möglicherweise einige "große Jungs" ihre Optionen / Versicherungen auflösen, weil das schlimmste vorbei ist.
Dieser Indikator zeigt diese Umkehr (Standardwert: 3 Punkte), wenn der VIX vorher über 20 Punkte lag. Der Buchstabe "R" wird dabei direkt über dem Tagesbalken angezeigt, wobei der VIX nicht explizit geladen werden muss.
Triple Moving Average HeatmapHi everyone
I didn't publish on Friday because I was working on an Expert Advisor in MT4. The day I don't publish, some scripts spamming guys published many (not useful) scripts the same to kick me out of the TOP #1 ranking.
So what I'm going to do about it? crying or sharing more quality scripts than before? :)
I guess you know the answer :) I'm gonna share a few quality scripts that I have in my library. I noticed that you guys tend to like more the scripts useful for your trading actually making you money rather than a copy-paste (of another copy-paste)
Alright, enough for the trolling now let's introduce the Three MA heatmap which is an upgrade of that script : MA-heatmap-Double-cross-edition/
The challenge was to keep the heatmap not rolling and to make it match with the MA cross. I did it using this
```
since_ma_buy = barssince(macrossover)
since_ma_sell = barssince(macrossunder)
heatmap_color() =>
since_ma_buy < since_ma_sell ? color.new(color.green, 20) : since_ma_buy > since_ma_sell ? color.new(color.red, 20) : na
```
This is a technique that I found after drinking three glasses of red wine (#french) to keep the heatmap stable and not rolling.
To get what I'm saying I invite you to replace the piece of code above by what everyone would normally do
```
heatmap_color() =>
macrossunder() ? color.new(color.green, 20) : macrossover() ? color.new(color.red, 20) : na
```
Ah and I'm not done sharing for the day, a few scripts are coming also after that one and tonight !!!!! I want to live in a world where you guys can enjoy quality scripts (mostly) :)
PS
____________________________________________________________
Feel free to hit the thumbs up as it shows me that I'm not doing this for nothing and will motivate to deliver more quality content in the future.
- I'm an officially approved PineEditor/LUA/MT4 approved mentor on codementor. You can request a coaching with me if you want and I'll teach you how to build kick-ass indicators and strategies
Jump on a 1 to 1 coaching with me
- You can also hire for a custom dev of your indicator/strategy/bot/chrome extension/python
Palex 2.0Atualização do SETUP do saudoso Professor Alexandre Fernandes "Palex"
- Bandas de Bolliger (Standard) =
*Banda Superior = Média Móvel Simples (20 dias) + (2 x Desvio Padrão de 20 dias)
*Banda Inferior = Média Móvel Simples (20 dias) – (2 x Desvio Padrão de 20 dias)
- EMA 9 (Média Móvel Exponencial)
- SMA 21 (Média Móvel Simples)
- SMA 200 (Média Móvel Simples) Clássica MA 200 períodos
- SMA 400 (Média Móvel Simples)
- EMA 400 (Média Móvel Exponencial)
- WILD (Média Móvel Welles Wilder)
O mesmo usado pelo nosso grande Mestre PALEX!
The 6 Line Death PunchIf you are looking to discover what trend you are in, you need to first what direction the price is going in...
I've been using and testing a mixture of EMA's and SMA's for a long time and I've found that these ones are by far the best.
EMA 3
EMA 8
MA 20
EMA 55
MA 100
MA 200
EMA 3 & 8 Crossover is a good method for confirming a coin going to the upside or to the downside.
EMA 8 is known as the Trigger Line (trademarked brand) as one of the fib numbers it shows good support or resistance of a trend.
MA 20 universal way of seeing trend direction in the stock market, works well with crypto too.
EMA 55, another trusty fib number. Works very well and could trade off that alone as support and resistance.
MA 100 and MA 200. Long ranged moving averages which govern the overall longer-term trend.
LONG ENTRY
Option 1 - 3/8 crossover
Option 2 - Candles above EMA 8
Option 3 - Candles above MA 20
Option 4 - Candles Above EMA 55.
SHORT ENTRY
Option 1 - 3/8 crossover
Option 2 - Candles below EMA 8
Option 3 - Candles below MA 20
Option 4 - Candles below EMA 55.
Signals for call and putSorry for the Google Translate English
Indicator for signals of call and put, using Bollinger bands (period 20, standard deviation 2.5), market trend of (sma, períod 100) and stochastic (period 20, %D 3).
I was overthrown but in pine scrip, the function "stoch()" no way to smooth (3). If anyone knows how to smooth inside the script, help me! Please.
With smoothed stochastic the hit rate grows a lot.
Português (Pt-Br)
Indicador de sinais de compra e venda, usando bandas de Bollinger (período de 20, desvio de 2,5), tendencia de mercado com (sma período 100) e estocástico (período 20, %D de 3).
Eu travei porque no pine script, a função "stoch()" não tem como aplicar a suavização (3). Se alguem souber como suavizar dentro do script, me ajude! Por favor.
MG - Multiple Moving Averages & Candle Wick Alerts - 1.0Features:
- Each moving average has customizable length, type and source
- The ability to change the source of all moving averages with one input (changing an individual MA source will override the general for that MA)
- At a glance comparison of 20 SMA and 20 VWMA to gauge volume trend
- Wick alerts which can be toggled for each moving average.
- Bullish wick alerts are when the wick is the only part of the candle to drop below the moving average
- Bearish wick alerts are when the wick is the only part of the candle to reach above the moving average
- Simple candle closed alert if you want a notification, for example each hour.
Defaults: Four SMAs (20, 50, 100, 200) and a 20 VWMA .
Recommended Usage:
- Set the general source (sets the source of all moving averages) to 'low' when in an uptrend and 'high' in a downtrend to maximize Risk : Reward.
- Use Fibonacci levels, oscillators .etc for confluence
NOTE: The moving average component of this indicator is the same as the previous indicator ()
Indicator - Multiple Moving Averages 1.0Features:
- Each moving average has customizable length, type and source
- The ability to change the source of all moving averages with one input (changing an individual MA source will override the general for that MA)
- At a glance comparison of 20 SMA and 20 VWMA to gauge volume trend
Defaults: Four SMAs (20, 50, 100, 200) and a 20 VWMA.
Usage:
- Use Fibonacci levels, pivots .etc for confluence
- Personally, I like to set overall source to low in uptrends, to high in downtrends and then set alerts for when the price crosses any of the averages. Then pay particular attention to the candlesticks and other indicators.
TODO:
- Add alerts option so that it send alert on crossing up or down any alert lines.
XPloRR MA-Trailing-Stop StrategyXPloRR MA-Trailing-Stop Strategy
Long term MA-Trailing-Stop strategy with Adjustable Signal Strength to beat Buy&Hold strategy
None of the strategies that I tested can beat the long term Buy&Hold strategy. That's the reason why I wrote this strategy.
Purpose: beat Buy&Hold strategy with around 10 trades. 100% capitalize sold trade into new trade.
My buy strategy is triggered by the fast buy EMA (blue) crossing over the slow buy SMA curve (orange) and the fast buy EMA has a certain up strength.
My sell strategy is triggered by either one of these conditions:
the EMA(6) of the close value is crossing under the trailing stop value (green) or
the fast sell EMA (navy) is crossing under the slow sell SMA curve (red) and the fast sell EMA has a certain down strength.
The trailing stop value (green) is set to a multiple of the ATR(15) value.
ATR(15) is the SMA(15) value of the difference between the high and low values.
The scripts shows a lot of graphical information:
The close value is shown in light-green. When the close value is lower then the buy value, the close value is shown in light-red. This way it is possible to evaluate the virtual losses during the trade.
the trailing stop value is shown in dark-green. When the sell value is lower then the buy value, the last color of the trade will be red (best viewed when zoomed)(in the example, there are 2 trades that end in gain and 2 in loss (red line at end))
the EMA and SMA values for both buy and sell signals are shown as a line
the buy and sell(close) signals are labeled in blue
How to use this strategy?
Every stock has it's own "DNA", so first thing to do is tune the right parameters to get the best strategy values voor EMA , SMA, Strength for both buy and sell and the Trailing Stop (#ATR).
Look in the strategy tester overview to optimize the values Percent Profitable and Net Profit (using the strategy settings icon, you can increase/decrease the parameters)
Then keep using these parameters for future buy/sell signals only for that particular stock.
Do the same for other stocks.
Important : optimizing these parameters is no guarantee for future winning trades!
Here are the parameters:
Fast EMA Buy: buy trigger when Fast EMA Buy crosses over the Slow SMA Buy value (use values between 10-20)
Slow SMA Buy: buy trigger when Fast EMA Buy crosses over the Slow SMA Buy value (use values between 30-100)
Minimum Buy Strength: minimum upward trend value of the Fast SMA Buy value (directional coefficient)(use values between 0-120)
Fast EMA Sell: sell trigger when Fast EMA Sell crosses under the Slow SMA Sell value (use values between 10-20)
Slow SMA Sell: sell trigger when Fast EMA Sell crosses under the Slow SMA Sell value (use values between 30-100)
Minimum Sell Strength: minimum downward trend value of the Fast SMA Sell value (directional coefficient)(use values between 0-120)
Trailing Stop (#ATR): the trailing stop value as a multiple of the ATR(15) value (use values between 2-20)
Example parameters for different stocks (Start capital: 1000, Order=100% of equity, Period 1/1/2005 to now) compared to the Buy&Hold Strategy(=do nothing):
BEKB(Bekaert): EMA-Buy=12, SMA-Buy=44, Strength-Buy=65, EMA-Sell=12, SMA-Sell=55, Strength-Sell=120, Stop#ATR=20
NetProfit: 996%, #Trades: 6, %Profitable: 83%, Buy&HoldProfit: 78%
BAR(Barco): EMA-Buy=16, SMA-Buy=80, Strength-Buy=44, EMA-Sell=12, SMA-Sell=45, Strength-Sell=82, Stop#ATR=9
NetProfit: 385%, #Trades: 7, %Profitable: 71%, Buy&HoldProfit: 55%
AAPL(Apple): EMA-Buy=12, SMA-Buy=45, Strength-Buy=40, EMA-Sell=19, SMA-Sell=45, Strength-Sell=106, Stop#ATR=8
NetProfit: 6900%, #Trades: 7, %Profitable: 71%, Buy&HoldProfit: 2938%
TNET(Telenet): EMA-Buy=12, SMA-Buy=45, Strength-Buy=27, EMA-Sell=19, SMA-Sell=45, Strength-Sell=70, Stop#ATR=14
NetProfit: 129%, #Trade
EMA Indicators with BUY sell SignalCombine 3 EMA indicators into 1. Buy and Sell signal is based on
- Buy signal based on 20 Days Highest High resistance
- Sell signal based on 10 Days Lowest Low support
Input :-
1 - Short EMA (20), Mid EMA (50) and Long EMA (200)
2 - Resistance (20) = 20 Days Highest High line
3 - Support (10) = 10 Days Lowest Low line
EvoTrend-X Indicator — Evolutionary Trend Learner ExperimentalEvoTrend-X Indicator — Evolutionary Trend Learner
NOTE: This is an experimental Pine Script v6 port of a Python prototype. Pine wasn’t the original research language, so there may be small quirks—your feedback and bug reports are very welcome. The model is non-repainting, MTF-safe (lookahead_off + gaps_on), and features an adaptive (fitness-based) candidate selector, confidence gating, and a volatility filter.
⸻
What it is
EvoTrend-X is adaptive trend indicator that learns which moving-average length best fits the current market. It maintains a small “population” of fast EMA candidates, rewards those that align with price momentum, and continuously selects the best performer. Signals are gated by a multi-factor Confidence score (fitness, strength vs. ATR, MTF agreement) and a volatility filter (ATR%). You get a clean Fast/Slow pair (for the currently best candidate), optional HTF filter, a fitness ribbon for transparency, and a themed info panel with a one-glance STATUS readout.
Core outputs
• Selected Fast/Slow EMAs (auto-chosen from candidates via fitness learning)
• Spread cross (Fast – Slow) → visual BUY/SELL markers + alert hooks
• Confidence % (0–100): Fitness ⊕ Distance vs. ATR ⊕ MTF agreement
• Gates: Trend regime (Kaufman ER), Volatility (ATR%), MTF filter (optional)
• Candidate Fitness Ribbon: shows which lengths the learner currently prefers
• Export plot: hidden series “EvoTrend-X Export (spread)” for downstream use
⸻
Why it’s different
• Evolutionary learning (on-chart): Each candidate EMA length gets rewarded if its slope matches price change and penalized otherwise, with a gentle decay so the model forgets stale regimes. The best fitness wins the right to define the displayed Fast/Slow pair.
• Confidence gate: Signals don’t light up unless multiple conditions concur: learned fitness, spread strength vs. volatility, and (optionally) higher-timeframe trend.
• Volatility awareness: ATR% filter blocks low-energy environments that cause death-by-a-thousand-whipsaws. Your “why no signal?” answer is always visible in the STATUS.
• Preset discipline, Custom freedom: Presets set reasonable baselines for FX, equities, and crypto; Custom exposes all knobs and honors your inputs one-to-one.
• Non-repainting rigor: All MTF calls use lookahead_off + gaps_on. Decisions use confirmed bars. No forward refs. No conditional ta.* pitfalls.
⸻
Presets (and what they do)
• FX 1H (Conservative): Medium candidates, slightly higher MinConf, modest ATR% floor. Good for macro sessions and cleaner swings.
• FX 15m (Active): Shorter candidates, looser MinConf, higher ATR% floor. Designed for intraday velocity and decisive sessions.
• Equities 1D: Longer candidates, gentler volatility floor. Suits index/large-cap trend waves.
• Crypto 1H: Mid-short candidates, higher ATR% floor for 24/7 chop, stronger MinConf to avoid noise.
• Custom: Your inputs are used directly (no override). Ideal for systematic tuning or bespoke assets.
⸻
How the learning works (at a glance)
1. Candidates: A small set of fast EMA lengths (e.g., 8/12/16/20/26/34). Slow = Fast × multiplier (default ×2.0).
2. Reward/decay: If price change and the candidate’s Fast slope agree (both up or both down), its fitness increases; otherwise decreases. A decay constant slowly forgets the distant past.
3. Selection: The candidate with highest fitness defines the displayed Fast/Slow pair.
4. Signal engine: Crosses of the spread (Fast − Slow) across zero mark potential regime shifts. A Confidence score and gates decide whether to surface them.
⸻
Controls & what they mean
Learning / Regime
• Slow length = Fast ×: scales the Slow EMA relative to each Fast candidate. Larger multiplier = smoother regime detection, fewer whipsaws.
• ER length / threshold: Kaufman Efficiency Ratio; above threshold = “Trending” background.
• Learning step, Decay: Larger step reacts faster to new behavior; decay sets how quickly the past is forgotten.
Confidence / Volatility gate
• Min Confidence (%): Minimum score to show signals (and fire alerts). Raising it filters noise; lowering it increases frequency.
• ATR length: The ATR window for both the ATR% filter and strength normalization. Shorter = faster, but choppier.
• Min ATR% (percent): ATR as a percentage of price. If ATR% < Min ATR% → status shows BLOCK: low vola.
MTF Trend Filter
• Use HTF filter / Timeframe / Fast & Slow: HTF Fast>Slow for longs, Fast threshold; exit when spread flips or Confidence decays below your comfort zone.
2) FX index/majors, 15m (active intraday)
• Preset: FX 15m (Active).
• Gate: MinConf 60–70; Min ATR% 0.15–0.30.
• Flow: Focus on session opens (LDN/NY). The ribbon should heat up on shorter candidates before valid crosses appear—good early warning.
3) SPY / Index futures, 1D (positioning)
• Preset: Equities 1D.
• Gate: MinConf 55–65; Min ATR% 0.05–0.12.
• Flow: Use spread crosses as regime flags; add timing from price structure. For adds, wait for ER to remain trending across several bars.
4) BTCUSD, 1H (24/7)
• Preset: Crypto 1H.
• Gate: MinConf 70–80; Min ATR% 0.20–0.35.
• Flow: Crypto chops—volatility filter is your friend. When ribbon and HTF OK agree, favor continuation entries; otherwise stand down.
⸻
Reading the Info Panel (and fixing “no signals”)
The panel is your self-diagnostic:
• HTF OK? False means the higher-timeframe EMAs disagree with your intended side.
• Regime: If “Chop”, ER < threshold. Consider raising the threshold or waiting.
• Confidence: Heat-colored; if below MinConf, the gate blocks signals.
• ATR% vs. Min ATR%: If ATR% < Min ATR%, status shows BLOCK: low vola.
• STATUS (composite):
• BLOCK: low vola → increase Min ATR% down (i.e., allow lower vol) or wait for expansion.
• BLOCK: HTF filter → disable HTF or align with the HTF tide.
• BLOCK: confidence → lower MinConf slightly or wait for stronger alignment.
• OK → you’ll see markers on valid crosses.
⸻
Alerts
Two static alert hooks:
• BUY cross — spread crosses up and all gates (ER, Vol, MTF, Confidence) are open.
• SELL cross — mirror of the above.
Create them once from “Add Alert” → choose the condition by name.
⸻
Exporting to other scripts
In your other Pine indicators/strategies, add an input.source and select EvoTrend-X → “EvoTrend-X Export (spread)”. Common uses:
• Build a rule: only trade when exported spread > 0 (trend filter).
• Combine with your oscillator: oscillator oversold and spread > 0 → buy bias.
⸻
Best practices
• Let it learn: Keep Learning step moderate (0.4–0.6) and Decay close to 1.0 (e.g., 0.99–0.997) for smooth regime memory.
• Respect volatility: Tune Min ATR% by asset and timeframe. FX 1H ≈ 0.10–0.20; crypto 1H ≈ 0.20–0.35; equities 1D ≈ 0.05–0.12.
• MTF discipline: HTF filter removes lots of “almost” trades. If you prefer aggressive entries, turn it off and rely more on Confidence.
• Confidence as throttle:
• 40–60%: exploratory; expect more signals.
• 60–75%: balanced; good daily driver.
• 75–90%: selective; catch the clean stuff.
• 90–100%: only A-setups; patient mode.
• Watch the ribbon: When shorter candidates heat up before a cross, momentum is forming. If long candidates dominate, you’re in a slower trend cycle.
⸻
Non-repainting & safety notes
• All request.security() calls use lookahead=barmerge.lookahead_off, gaps=barmerge.gaps_on.
• No forward references; decisions rely on confirmed bar data.
• EMA lengths are simple ints (no series-length errors).
• Confidence components are computed every bar (no conditional ta.* traps).
⸻
Limitations & tips
• Chop happens: ER helps, but sideways microstructure can still flicker—use Confidence + Vol filter as brakes.
• Presets ≠ oracle: They’re sensible baselines; always tune MinConf and Min ATR% to your venue and session.
• Theme “Auto”: Pine cannot read chart theme; “Auto” defaults to a Dark-friendly palette.
⸻
Publisher’s Screenshots Checklist
1) FX swing — EURUSD 1H
• Preset: FX 1H (Conservative)
• Params: MinConf=70, ATR Len=14, Min ATR%=0.12, MTF ON (TF=4H, 20/50)
• Show: Clear BUY cross, STATUS=OK, green regime background; Fitness Ribbon visible.
2) FX intraday — GBPUSD 15m
• Preset: FX 15m (Active)
• Params: MinConf=60, ATR Len=14, Min ATR%=0.20, MTF ON (TF=60m)
• Show: SELL cross near London session open. HTF lines enabled (translucent).
• Caption: “GBPUSD 15m • Active session sell with MTF alignment.”
3) Indices — SPY 1D
• Preset: Equities 1D
• Params: MinConf=60, ATR Len=14, Min ATR%=0.08, MTF ON (TF=1W, 20/50)
• Show: Longer trend run after BUY cross; regime shading shows persistence.
• Caption: “SPY 1D • Trend run after BUY cross; weekly filter aligned.”
4) Crypto — BINANCE:BTCUSDT 1H
• Preset: Crypto 1H
• Params: MinConf=75, ATR Len=14, Min ATR%=0.25, MTF ON (TF=4H)
• Show: BUY cross + quick follow-through; Ribbon warming (reds/yellows → greens).
• Caption: “BTCUSDT 1H • Momentum break with high confidence and ribbon turning.”
Z-Score Mean Reversion StrategyBased on Indicator "Rolling Z- Score trend" by QuantAlgo
The Z-Score Mean Reversion Strategy is a statistical trading approach that exploits price extremes and their tendency to return to average levels. It uses the Z-Score indicator to identify when an asset has deviated significantly from its statistical mean, creating high-probability reversal opportunities.
Core Concept:
Z-Score measures how many standard deviations price is from its moving average
When Z-Score reaches extreme levels (±1.5 or more), price is statistically "stretched"
The strategy trades the expected "snap back" to the mean
Works best in ranging or mean-reverting markets
How It Works:
LONG Entry: When price becomes oversold (Z-Score < -1.5), expect upward reversion
SHORT Entry: When price becomes overbought (Z-Score > +1.5), expect downward reversion
Exit: When price returns closer to the mean or reaches opposite extreme
Risk Management: Stop loss at -3% and take profit at +5% by default
🎯 Best Settings by Market & Timeframe
Cryptocurrency (High Volatility)
Preset: Scalping
Timeframe: 15m - 1H
Lookback: 10-15 periods
Entry Threshold: 1.0 - 1.5
Stop Loss: 2-3%
Take Profit: 3-5%
Notes: Crypto moves fast; use tighter parameters for quicker signals
Forex (Medium Volatility)
Preset: Default or Swing Trading
Timeframe: 1H - 4H
Lookback: 20-25 periods
Entry Threshold: 1.5 - 2.0
Stop Loss: 1-2%
Take Profit: 2-4%
Notes: Works well on major pairs during normal market conditions
Stocks (Lower Volatility)
Preset: Swing Trading
Timeframe: 4H - Daily
Lookback: 25-30 periods
Entry Threshold: 1.5 - 1.8
Stop Loss: 2-4%
Take Profit: 4-8%
Notes: Best on liquid stocks; avoid during earnings or major news
Indices (Trend + Ranging)
Preset: Trend Following
Timeframe: Daily - Weekly
Lookback: 35-50 periods
Entry Threshold: 2.0 - 2.5
Stop Loss: 3-5%
Take Profit: 5-10%
Notes: Higher threshold reduces false signals; captures major reversals
⚙️ Optimal Configuration Guide
Conservative (Lower Risk, Fewer Trades)
Lookback Period: 30-40
Entry Threshold: 2.0-2.5
Exit Threshold: 0.8-1.0
Stop Loss: 3-4%
Take Profit: 6-10%
Momentum Filter: ON
Balanced (Recommended Starting Point)
Lookback Period: 20-25
Entry Threshold: 1.5-1.8
Exit Threshold: 0.5-0.6
Stop Loss: 2-3%
Take Profit: 4-6%
Momentum Filter: OFF
Aggressive (Higher Risk, More Trades)
Lookback Period: 10-15
Entry Threshold: 1.0-1.2
Exit Threshold: 0.3-0.4
Stop Loss: 1-2%
Take Profit: 2-4%
Momentum Filter: OFF
💡 Pro Tips for Best Results
When the Strategy Works Best:
✅ Ranging markets with clear support/resistance
✅ High liquidity assets (major pairs, large-cap stocks)
✅ Normal market conditions (avoid during crashes or parabolic runs)
✅ Mean-reverting assets (avoid strong trending stocks)
When to Avoid:
❌ Strong trending markets (price won't revert)
❌ Low liquidity / low volume periods
❌ Major news events (earnings, FOMC, NFP)
❌ Market crashes or euphoria phases
Optimization Process:
Start with "Default" preset on your chosen timeframe
Backtest 6-12 months to see performance
Adjust Entry Threshold first (lower = more trades, higher = fewer but stronger signals)
Fine-tune Stop Loss/Take Profit based on average trade duration
Consider Momentum Filter if getting too many false signals
Key Metrics to Monitor:
Win Rate: Target 50-60% (mean reversion typically has moderate win rate)
Profit Factor: Aim for >1.5
Average Trade Duration: Should match your timeframe (scalping: minutes/hours, swing: days)
Max Drawdown: Keep under 20% of capital
📈 Quick Start Recommendation
For most traders, start here:
Timeframe: 1H or 4H
Preset: Default (Lookback 20, Threshold 1.5)
Stop Loss: 3%
Take Profit: 5%
Momentum Filter: OFF (turn ON if too many false entries)
Test on BTCUSD, EURUSD, or SPY first, then adapt to your preferred instruments!
JFC 21:52JFC 21:52 — Brief Description
Concept: Pure time/price rule, no indicators.
Reference: Close at 21:20 (chart/exchange timezone).
Entry (21:52):
– LONG if price is below the 21:20 close.
– SHORT if price is above the 21:20 close.
– Equal → no trade.
Exit: Force close at 22:13.
Frequency: Max one trade per day.
Note: Use 1-minute resolution and the correct chart timezone; market must be trading at those times.
EMA ± ATR Channel (True Range)EMA ± ATR Channel (True Range)
Tagline: Adaptive EMA channel with ATR-based volatility bands — perfect for swing trading, intraday setups, and managing risk on high-volatility stocks.
This script plots a dynamic price channel around a configurable EMA using the Average True Range (ATR, Wilder’s True Range) as a volatility buffer.
Upper band = EMA + (ATR × multiplier)
Lower band = EMA – (ATR × multiplier)
📊 Features:
Adjustable EMA length, ATR length, and ATR multiplier
Visual channel fill between upper and lower bands
Optional on-chart help panel with practical combos
⚡ Practical Combos for Volatile Stocks:
EMA 20 + ATR 14 × 2.0 → most common swing trading setup
EMA 10 + ATR 14 × 1.5 → very responsive, good for intraday/high-beta names
EMA 20 + ATR 20 × 2.5 → smoother, wider channel, avoids whipsaws in chaotic stocks
✅ Use cases:
Identify dynamic support/resistance zones
Volatility-based stop-loss & take-profit placement
Spot overextensions from the trend midline
🔖 Tags:
ema, atr, channel, volatility, trend, support resistance, stop loss, swing trading, intraday, risk management, indicator
Supertrend DashboardOverview
This dashboard is a multi-timeframe technical indicator dashboard based on Supertrend. It combines:
Trend detection via Supertrend
Momentum via RSI and OBV (volume)
Volatility via a basic candle-based metric (bs)
Trend strength via ADX
Multi-timeframe analysis to see whether the trend is bullish across different timeframes
It then displays this info in a table on the chart with colors for quick visual interpretation.
2️⃣ Inputs
Dashboard settings:
enableDashboard: Toggle the dashboard on/off
locationDashboard: Where the table appears (Top right, Bottom left, etc.)
sizeDashboard: Text size in the table
strategyName: Custom name for the strategy
Indicator settings:
factor (Supertrend factor): Controls how far the Supertrend lines are from price
atrLength: ATR period for Supertrend calculation
rsiLength: Period for RSI calculation
Visual settings:
colorBackground, colorFrame, colorBorder: Control dashboard style
3️⃣ Core Calculations
a) Supertrend
Supertrend is a trend-following indicator that generates bullish or bearish signals.
Logic:
Compute ATR (atr = ta.atr(atrLength))
Compute preliminary bands:
upperBand = src + factor * atr
lowerBand = src - factor * atr
Smooth bands to avoid false flips:
lowerBand := lowerBand > prevLower or close < prevLower ? lowerBand : prevLower
upperBand := upperBand < prevUpper or close > prevUpper ? upperBand : prevUpper
Determine direction (bullish / bearish):
dir = 1 → bullish
dir = -1 → bearish
Supertrend line = lowerBand if bullish, upperBand if bearish
Output:
st → line to plot
bull → boolean (true = bullish)
b) Buy / Sell Trigger
Logic:
bull = ta.crossover(close, supertrend) → close crosses above Supertrend → buy signal
bear = ta.crossunder(close, supertrend) → close crosses below Supertrend → sell signal
trigger → checks which signal was most recent:
trigger = ta.barssince(bull) < ta.barssince(bear) ? 1 : 0
1 → Buy
0 → Sell
c) RSI (Momentum)
rsi = ta.rsi(close, rsiLength)
Logic:
RSI > 50 → bullish
RSI < 50 → bearish
d) OBV / Volume Trend (vosc)
OBV tracks whether volume is pushing price up or down.
Manual calculation (safe for all Pine versions):
obv = ta.cum( math.sign( nz(ta.change(close), 0) ) * volume )
vosc = obv - ta.ema(obv, 20)
Logic:
vosc > 0 → bullish
vosc < 0 → bearish
e) Volatility (bs)
Measures how “volatile” the current candle is:
bs = ta.ema(math.abs((open - close) / math.max(high - low, syminfo.mintick) * 100), 3)
Higher % → stronger candle moves
Displayed on dashboard as a number
f) ADX (Trend Strength)
= ta.dmi(14, 14)
Logic:
adx > 20 → Trending
adx < 20 → Ranging
g) Multi-Timeframe Supertrend
Timeframes: 1m, 3m, 5m, 10m, 15m, 30m, 1H, 2H, 4H, 12H, 1D
Logic:
for tf in timeframes
= request.security(syminfo.tickerid, tf, f_supertrend(ohlc4, factor, atrLength))
array.push(tf_bulls, bull_tf ? 1.0 : 0.0)
bull_tf ? 1.0 : 0.0 → converts boolean to number
Then we calculate user rating:
userRating = (sum of bullish timeframes / total timeframes) * 10
0 → Strong Sell, 10 → Strong Buy
4️⃣ Dashboard Table Layout
Row Column 0 (Label) Column 1 (Value)
0 Strategy strategyName
1 Technical Rating textFromRating(userRating) (color-coded)
2 Current Signal Buy / Sell (based on last Supertrend crossover)
3 Current Trend Bullish / Bearish (based on Supertrend)
4 Trend Strength bs %
5 Volume vosc → Bullish/Bearish
6 Volatility adx → Trending/Ranging
7 Momentum RSI → Bullish/Bearish
8 Timeframe Trends 📶 Merged cell
9-19 1m → Daily Bullish/Bearish for each timeframe (green/red)
5️⃣ Color Logic
Green shades → bullish / trending / buy
Red / orange → bearish / weak / sell
Yellow → neutral / ranging
Example:
dashboard_cell_bg(1, 1, colorFromRating(userRating))
dashboard_cell_bg(1, 2, trigger ? color.green : color.red)
dashboard_cell_bg(1, 3, superBull ? color.green : color.red)
Makes the dashboard visually intuitive
6️⃣ Key Logic Flow
Calculate Supertrend on current timeframe
Detect buy/sell triggers based on crossover
Calculate RSI, OBV, Volatility, ADX
Request Supertrend on multiple timeframes → convert to 1/0
Compute user rating (percentage of bullish timeframes)
Populate dashboard table with colors and values
✅ The result: You get a compact, fast, multi-timeframe trend dashboard that shows:
Current signal (Buy/Sell)
Current trend (Bullish/Bearish)
Momentum, volatility, and volume cues
Trend across multiple timeframes
Overall technical rating
It’s essentially a full trend-strength scanner directly on your chart.
SATHYA SMA SignalThis indicator overlays 20, 50, and 200 Simple Moving Averages (SMAs) on the chart. It generates bullish signals when the 20 SMA crosses above the 200 SMA before the 50 SMA, with both above 200 SMA. Bearish signals occur when the 20 SMA crosses below the 200 SMA before the 50 SMA, with both below 200 SMA. Signals appear as distinct triangles on the chart, helping traders identify trend reversals based on systematic SMA crossovers and order of crossing.
SATHYA SMA Signal)This indicator overlays 20, 50, and 200 Simple Moving Averages (SMAs) on the chart. It generates bullish signals when the 20 SMA crosses above the 200 SMA before the 50 SMA, with both above 200 SMA. Bearish signals occur when the 20 SMA crosses below the 200 SMA before the 50 SMA, with both below 200 SMA. Signals appear as distinct triangles on the chart, helping traders identify trend reversals based on systematic SMA crossovers and order of crossing.
DrFX Reversal Algo - MACD-RSI System with Dynamic Zone Filtering**DrFX Reversal Algo** is a sophisticated reversal detection system that combines MACD momentum analysis with RSI confirmation and dynamic support/resistance zone filtering. This indicator employs advanced mathematical filtering techniques to identify high-probability reversal points while minimizing false signals through intelligent zone-based filtering.
**Core Innovation & Originality**
This system uniquely integrates four key analytical components:
1. **Enhanced MACD Engine** - Customizable fast (20), slow (50), and signal (12) lengths with crossover/crossunder detection optimized for reversal identification
2. **RSI Power Classification** - 14-period RSI used to classify signal strength and trend bias, distinguishing between "Strong" and regular signals
3. **Kalman-Filtered Dynamic Zones** - Advanced mathematical smoothing of support/resistance levels using Kalman filter algorithms for noise reduction
4. **Gradient-Based Visual System** - Power-weighted bar coloring that visualizes trend strength using MACD histogram and RSI signal intensity
**System Architecture & Functionality**
**Signal Generation Methodology:**
The core algorithm detects MACD line crossovers above and below the signal line, then applies RSI-based classification. When RSI signal (RSI-50) is positive during bullish MACD crossovers, the system generates "Strong Buy" signals. When RSI signal is negative or neutral, it produces regular "Buy" signals. The inverse logic applies for sell signals.
**Dynamic Zone Calculation:**
Support and resistance zones are calculated using a multi-step process:
1. **Volatility Bands**: ATR-based upper/lower bands using (high+low)/2 ± ATR * multiplier
2. **Precise Zone Definition**: Integration of 20-period highest/lowest calculations with volatility bands
3. **Kalman Filter Smoothing**: Advanced noise reduction using configurable Q (0.01) and R (0.1) parameters
4. **Zone Validation**: Real-time adjustment based on price action and volatility changes
**Kalman Filter Implementation:**
The system employs a custom Kalman filter function for zone smoothing:
```
kf_k = kf_p / (kf_p + kf_r)
kf_x = kf_k * input + (1 - kf_k) * previous_estimate
kf_p = (1 - kf_k) * kf_p + kf_q
```
This mathematical approach reduces zone boundary noise while maintaining responsiveness to genuine support/resistance level changes.
**Unique Visual Features**
**Power-Based Gradient System:**
Bar coloring utilizes a sophisticated gradient calculation based on MACD histogram power (absolute value) and RSI signal strength. The system creates dynamic color transitions:
- **Bullish Gradient**: Green spectrum (0-255 intensity) based on histogram power
- **Bearish Gradient**: Red spectrum (0-255 intensity) based on histogram power
- **Consolidation**: Mixed gradient indicating uncertain market conditions
**Dynamic Zone Visualization:**
- **Support Zones**: Blue-filled areas between smoothed support boundaries
- **Resistance Zones**: Red-filled areas between smoothed resistance boundaries
- **Zone Adaptation**: Real-time boundary adjustment based on volatility and price action
**Signal Classification System**
**Signal Strength Hierarchy:**
1. **Strong Buy**: MACD bullish crossover + RSI signal > 0 (above 50-line)
2. **Regular Buy**: MACD bullish crossover + RSI signal ≤ 0 (below 50-line)
3. **Strong Sell**: MACD bearish crossover + RSI signal < 0 (below 50-line)
4. **Regular Sell**: MACD bearish crossover + RSI signal ≥ 0 (above 50-line)
**Optional Zone Filtering:**
When enabled, the system only displays signals when:
- Buy signals: Price above smoothed support zone end
- Sell signals: Price below smoothed resistance zone start
**Usage Instructions**
**Primary Signal Interpretation:**
- **Large Green Triangles**: Strong buy signals with RSI confirmation above 50
- **Small Green Triangles**: Regular buy signals with RSI below 50
- **Large Red Triangles**: Strong sell signals with RSI confirmation below 50
- **Small Red Triangles**: Regular sell signals with RSI above 50
**Zone Analysis:**
- **Blue Zones**: Dynamic support areas where buying interest may emerge
- **Red Zones**: Dynamic resistance areas where selling pressure may increase
- **Zone Breaks**: Price movement outside zones indicates potential trend continuation
**Bar Color Interpretation:**
- **Bright Green**: Strong bullish momentum (high MACD histogram power + positive RSI)
- **Dark Green**: Moderate bullish momentum
- **Bright Red**: Strong bearish momentum (high MACD histogram power + negative RSI)
- **Dark Red**: Moderate bearish momentum
- **Mixed Colors**: Consolidation or uncertain trend direction
**Optimal Usage Strategies:**
1. **Reversal Trading**: Focus on signals occurring near zone boundaries
2. **Confirmation Trading**: Use zone filter to reduce false signals in trending markets
3. **Momentum Trading**: Prioritize "Strong" signals with bright gradient bar coloring
4. **Multi-Timeframe**: Combine with higher timeframe trend analysis for context
**Parameter Customization**
**MACD Settings:**
- **Fast Length (20)**: Shorter periods increase sensitivity
- **Slow Length (50)**: Longer periods reduce noise
- **Signal Smoothing (12)**: Affects crossover signal timing
**Support/Resistance Settings:**
- **Volatility Period (10)**: ATR calculation period for zone width
- **Multiplier (5.0)**: Zone expansion factor based on volatility
**Visual Settings:**
- **Gradient Range (2000)**: Controls color intensity scaling
- **Zone Filtering**: Enables/disables signal filtering based on zone position
**Advanced Features**
**Alert System:**
Comprehensive alert functionality with detailed messages including symbol, timeframe, current price, and signal type. Separate enable/disable options for long and short alerts.
**Mathematical Precision:**
The Kalman filter implementation provides superior noise reduction compared to simple moving averages while maintaining responsiveness to genuine market structure changes.
**Important Considerations**
This system works optimally in markets with clear support/resistance levels and moderate volatility. The Kalman filter smoothing may introduce slight lag during rapid market movements. Strong signals generally provide higher probability setups but may be less frequent than regular signals.
The algorithm combines established techniques (MACD, RSI) with advanced filtering and zone detection methodologies. The integration of multiple confirmation methods helps reduce false signals while maintaining sensitivity to genuine reversal opportunities.
**Disclaimer**: This indicator is designed for educational and analytical purposes. Past performance does not guarantee future results. The system's effectiveness varies across different market conditions and timeframes. Always implement proper risk management and consider multiple confirmation methods before making trading decisions.
Candle Suite PRO – Engulf + Pin + Regime Filters + Trigger//@version=5
indicator("Candle Suite PRO – Engulf + Pin + Regime Filters + Trigger", overlay=true, max_labels_count=500)
//===================== Inputs =====================
grpPtn = "Patterns"
useEngulf = input.bool(true, "Enable Engulfing", group=grpPtn)
usePin = input.bool(true, "Enable Pin Bar", group=grpPtn)
pinRatio = input.float(2.0, "PinBar shadow >= body ×", group=grpPtn, step=0.1, minval=1)
minBodyP = input.float(0.15, "Min Body% of Range (0~1)", group=grpPtn, step=0.01, minval=0, maxval=1)
coolBars = input.int(3, "Cooldown bars", group=grpPtn, minval=0)
grpReg = "Regime Filters"
useHTF = input.bool(true, "Use HTF EMA50 Filter", group=grpReg)
htfTF = input.timeframe("60", "HTF timeframe", group=grpReg) // 5m/15m → 60 권장
useADX = input.bool(true, "Use ADX Trend Filter", group=grpReg)
adxLen = input.int(14, "ADX Length", group=grpReg, minval=5)
adxMin = input.int(18, "ADX Min Threshold", group=grpReg, minval=5)
useVOL = input.bool(true, "Use Volume Filter (> SMA×k)",group=grpReg)
volMult = input.float(1.10, "k for Volume", group=grpReg, step=0.05)
emaPinchPc = input.float(0.15, "No-Trade if |EMA20-50| < %", group=grpReg, step=0.05)/100.0
maxDistATR = input.float(1.5, "No-Trade if |Close-EMA20| > ATR×", group=grpReg, step=0.1)
useVWAP = input.bool(true, "Require close above/below VWAP", group=grpReg)
//===================== Helpers ====================
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
atr14 = ta.atr(14)
vwap = ta.vwap(hlc3)
rng = high - low
body = math.abs(close - open)
upper = high - math.max(open, close)
lower = math.min(open, close) - low
bull = close > open
bear = close < open
bodyOK = rng > 0 ? (body / rng) >= minBodyP : false
//===================== Patterns ===================
prevOpen = open
prevClose = close
prevBull = prevClose > prevOpen
prevBear = prevClose < prevOpen
bullEngulf_raw = useEngulf and prevBear and bull and (open <= prevClose) and (close >= prevOpen) and bodyOK
bearEngulf_raw = useEngulf and prevBull and bear and (open >= prevClose) and (close <= prevOpen) and bodyOK
bullPin_raw = usePin and (lower >= pinRatio * body) and (upper <= body) and bodyOK // Hammer
bearPin_raw = usePin and (upper >= pinRatio * body) and (lower <= body) and bodyOK // Shooting Star
//================= Regime & No-trade ===============
// HTF trend (EMA50 on higher TF)
emaHTF50 = request.security(syminfo.tickerid, htfTF, ta.ema(close, 50))
htfLong = not useHTF or close > emaHTF50
htfShort = not useHTF or close < emaHTF50
// ADX (manual, version-safe)
len = adxLen
upMove = high - high
downMove = low - low
plusDM = (upMove > downMove and upMove > 0) ? upMove : 0.0
minusDM = (downMove > upMove and downMove > 0) ? downMove : 0.0
trur = ta.rma(ta.tr(true), len)
plusDI = 100 * ta.rma(plusDM, len) / trur
minusDI = 100 * ta.rma(minusDM, len) / trur
dx = 100 * math.abs(plusDI - minusDI) / math.max(plusDI + minusDI, 1e-10)
adxVal = ta.rma(dx, len)
trendOK = not useADX or adxVal >= adxMin
// Volume
volOK = not useVOL or (volume >= ta.sma(volume, 20) * volMult)
// Alignment & slope
slopeUp = ema20 > ema20
slopeDown = ema20 < ema20
alignLong = ema20 > ema50 and slopeUp
alignShort = ema20 < ema50 and slopeDown
// Chop / distance / VWAP
pinch = math.abs(ema20 - ema50) / close < emaPinchPc
tooFar = math.abs(close - ema20) / atr14 > maxDistATR
vwapOKL = not useVWAP or close > vwap
vwapOKS = not useVWAP or close < vwap
//================= Final Setups ====================
longSetup_raw = bullEngulf_raw or bullPin_raw
shortSetup_raw = bearEngulf_raw or bearPin_raw
longSetup = longSetup_raw and alignLong and htfLong and trendOK and volOK and not pinch and not tooFar and vwapOKL
shortSetup = shortSetup_raw and alignShort and htfShort and trendOK and volOK and not pinch and not tooFar and vwapOKS
// Trigger: 다음 봉이 전봉의 고/저 돌파 + 종가 확인
longTrig = longSetup and high > high and close > ema20
shortTrig = shortSetup and low < low and close < ema20
// Cooldown & final signals
var int lastLong = na
var int lastShort = na
canLong = na(lastLong) or (bar_index - lastLong > coolBars)
canShort = na(lastShort) or (bar_index - lastShort > coolBars)
finalLong = longTrig and canLong
finalShort = shortTrig and canShort
if finalLong
lastLong := bar_index
if finalShort
lastShort := bar_index
//==================== Plots ========================
plot(ema20, "EMA 20", color=color.new(color.orange, 0))
plot(ema50, "EMA 50", color=color.new(color.blue, 0))
plot(useVWAP ? vwap : na, "VWAP", color=color.new(color.purple, 0))
plotshape(finalLong, title="LONG ▶", style=shape.labelup, location=location.belowbar, text="Long▶", color=color.new(color.blue, 0), size=size.tiny)
plotshape(finalShort, title="SHORT ▶", style=shape.labeldown, location=location.abovebar, text="Short▶", color=color.new(color.red, 0), size=size.tiny)
// Alerts
alertcondition(finalLong, "LONG ▶", "Long trigger")
alertcondition(finalShort, "SHORT ▶", "Short trigger")
// 시각적 노트레이드 힌트
bgcolor(pinch ? color.new(color.gray, 92) : na)
Tape Speed Pulse (Pace + Direction) [v6 + Climax]Tape Speed Pulse (Pace + Direction)
One-liner:
A lightweight “tape pulse” that turns intraday bursts of buying/selling into an easy-to-read histogram, with surge, slowdown, and climax (exhaustion) markers for fast decision-making. Use on sec and min charts.
What it measures
Pace (RVOL): current bar volume vs the recent average (smoothed).
Direction proxy: uptick/downtick by comparing close to close .
Pulse (histogram): direction × pace, so you see who’s pushing and how fast.
Colors
- Lime = Buy surge (pace ≥ threshold & upticking)
- Red = Sell surge (pace ≥ threshold & downticking)
- Teal = Buy pressure, sub-threshold
- Orange = Sell pressure, sub-threshold
- Faded/gray = Near-neutral pace (below the Neutral Band)
Lines (toggleable)
-White = Pace (RVOL)
- Yellow = Slowdown line = a drop of X% from the last 30-bar peak pace
Background tint mirrors the current state so you can glance risk: greenish for buy pressure, reddish for sell pressure.
Signals & alerts
- BUY surge – fires when pace crosses above the surge threshold with uptick direction (optional acceleration & uptick streak filters; cooldown prevents spam).
- SELL surge – mirror logic to downside.
- Slowdown – fires when pace crosses below the yellow slowdown line while direction ≤ 0 (early fade warning).
Climax (exhaustion)
- Buy Climax: previous bar was a buy surge with a large upper wick; current bar slows (below slowdown line) and direction ≤ 0.
- Sell Climax: mirror (large lower wick → slowdown → direction ≥ 0).
- Great for trimming/tight stops or fade setups at obvious spikes.
- Create alerts via Add alert → Condition: this indicator → choose the specific alert (BUY surge, SELL surge, Slowdown, Buy Climax, Sell Climax).
How to use it (playbook)
- Longs (e.g., VWAP reclaim / micro pullback)
- Only take entries when the pulse is teal→lime (buy pressure to buy surge).
- Into prior highs/VWAP bands, take partials on lime spikes.
- If you get a Slowdown dot and bars turn orange/red, tighten or exit.
Shorts (failed reclaim / lower-high)
- Look for teal→orange→red with rising pace at a level.
- Add confidence if a Buy Climax printed right before (exhaustion).
- Risk above the spike; don’t fight true ignitions out of bases.
Simple guardrails
- Avoid new longs when the histogram is orange/red; avoid new shorts when teal/lime.
- Use with VWAP + 9/20 EMA or your levels. The pulse is confirmation, not the whole thesis.
Inputs (what they do & when to tweak)
- Pace lookback (bars) – window for average volume. Lower = faster; higher = steadier.
Too jumpy? raise it. Missing quick bursts? lower it.
- Smoothing EMA (bars) – smooths pace. Higher = calmer.
Use 4–6 during the open; 3–4 midday.
- Surge threshold (× RVOL) – how fast counts as a surge.
Too many surges? raise it. Too late? lower it slightly.
- Slowdown drop from 30-bar max (%) – how far below the recent peak pace to call a slowdown.
Higher % = later slowdown; lower % = earlier warning.
- Neutral band (× RVOL) – paces below this fade to gray.
Raise to clean up noise; lower to see subtle pressure.
- Min seconds between signals – cooldown to prevent spam.
Increase in chop; reduce if you want more pings.
- BUY/SELL: min consecutive upticks/downticks – tiny streak filter.
Raise to avoid wiggles; lower for earlier signals.
Require pace accelerating into signal – ON = avoid stall breakouts; OFF = earlier pings.
Climax options: wick % threshold & “require slowdown cross”.
Raise wick% / require cross to be stricter; lower to catch more fades.
Quick presets
- Low-float runner, 5–10s chart
- Lookback 20, Smoothing 3–4, Surge 2.2–2.8, Slowdown 35–45, Neutral 1.0–1.2, Cooldown 15–25s, Streaks 2–3, Accel ON.
- Thick large-cap, 1-min
- Lookback 20–30, Smoothing 5–7, Surge 1.5–1.9, Slowdown 25–35, Neutral 0.8–1.0, Cooldown 30–60s, Streaks 2, Accel ON.
- Open vs Midday vs Power Hour
- Open: higher Surge, more Smoothing, longer Cooldown.
- Midday: lower Surge, less Smoothing to catch subtler pushes.
- Power hour: moderate Surge; keep Slowdown on for exits.
Reading common patterns
- Ignition (likely continuation): lime spike out of a base that holds above a level while pace stays above yellow.
- Exhaustion (likely fade): lime spike late in a run with upper wick → Slowdown → orange/red. The Buy Climax diamond is your tell.
Limits / notes
This is an OHLCV-based proxy (TradingView Pine can’t read raw tape/DOM). It won’t match Bookmap/Jigsaw tick-for-tick, but it’s fast and objective.
Use with levels and a risk plan. Past performance ≠ future results. Educational only.