Mis à jour
[blackcat] L1 ALMA Trend Scalper

Level: 1
Background
The Arnaud Legoux Moving Average (ALMA) indicator was recently added to the family of moving averages. It was developed in 2009 by Arnaud Legous and Dimitrios Kouzis Loukas. Since then, this indicator has gained huge popularity among traders.
ALMA works like any moving average work. However, the calculation of the ALMA is more perfect compared to the moving average. This indicator has minimal lag which makes it a leading indicator in the market. While the SMA, MA, EMA and SMMA signal line is often delayed. The ALMA was designed to address the two critical disadvantages of traditional moving averages, responsiveness and smoothness.
Function
[blackcat] L1 ALMA Trend Scalper is simple but powerful. This indicator makes full use of ALMA's rapid response advantage to provide buying and selling points by winding and crossing two short-term moving averages. A mid-term moving average can provide relatively effective support and pressure. Finally, the function of whale pump detection is simply realized through the characteristics of the moving average.
Key Signal
trendline --> mid term moving average for support and resistance
tradingline ---> basic element for fast line and slow line
fastline ---> fast line for short term
slowline --> slow line for short term
pumpstart ---> simple whale pump zone detection
Pros and Cons
Pros:
1. Simple but clear to see the trend reversals
2. Aux middle term moving average help just whether it is a true or fake breakout
Cons:
1. No advanced trading skill is incorporated
2. Need improvements on sideways.
Remarks
Just be simple but powerful
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Background
The Arnaud Legoux Moving Average (ALMA) indicator was recently added to the family of moving averages. It was developed in 2009 by Arnaud Legous and Dimitrios Kouzis Loukas. Since then, this indicator has gained huge popularity among traders.
ALMA works like any moving average work. However, the calculation of the ALMA is more perfect compared to the moving average. This indicator has minimal lag which makes it a leading indicator in the market. While the SMA, MA, EMA and SMMA signal line is often delayed. The ALMA was designed to address the two critical disadvantages of traditional moving averages, responsiveness and smoothness.
Function
[blackcat] L1 ALMA Trend Scalper is simple but powerful. This indicator makes full use of ALMA's rapid response advantage to provide buying and selling points by winding and crossing two short-term moving averages. A mid-term moving average can provide relatively effective support and pressure. Finally, the function of whale pump detection is simply realized through the characteristics of the moving average.
Key Signal
trendline --> mid term moving average for support and resistance
tradingline ---> basic element for fast line and slow line
fastline ---> fast line for short term
slowline --> slow line for short term
pumpstart ---> simple whale pump zone detection
Pros and Cons
Pros:
1. Simple but clear to see the trend reversals
2. Aux middle term moving average help just whether it is a true or fake breakout
Cons:
1. No advanced trading skill is incorporated
2. Need improvements on sideways.
Remarks
Just be simple but powerful
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Notes de version
█ OVERVIEWScript Name: [blackcat] L1 ALMA Trend Scalper
This script provides a comprehensive scalping tool based on Adaptive Linear Moving Average (ALMA) and Exponential Moving Average (EMA). It helps traders identify potential buying and selling opportunities within trending markets.
█ FEATURES
• Calculates Middle Term Trend Line using ALMA
• Generates Short Term Trading Line utilizing triple smoothed EMA
• Identifies Whale Pump Start Signals through Fast and Slow Lines comparison
• Visualizes trends via colored background highlights
• Marks Buy ("B") and Sell ("S") points directly on the chart
█ HOW TO USE
1 — Load the script onto any security of interest in TradingView
2 — Observe the plotted trend lines
3 — Look out for crossovers between Fast and Slow Lines for potential trades
– A green "B" indicates a suggested buy point
– A red "S" signifies a recommended sell moment
4 — Utilize the provided trend indicators alongside other analysis tools for more informed decisions
█ LIMITATIONS
• The effectiveness may vary depending on market conditions and asset volatility
• Requires manual confirmation from users before executing trades
• Not optimized for long-term positional trading; best suited for scalpable setups
█ NOTES
The script includes commented-out background coloring options which can be enabled by removing slashes at the beginning of respective lines. Feel free to customize parameters such as lengths and smoothing factors to better suit individual preferences and strategies.
Notes de version
█ OVERVIEWThe L1 ALMA Trend Scalper is a momentum oscillator that converts a triple-smoothed
price line into fast/slow crossover signals for short-term trend trading. V2 pairs
the original ALMA trend engine with a full position state machine, ATR-based
take-profit / stop-loss tracking, dedicated exit signals and ready-made alerts.
█ CONCEPTS
The indicator blends two smoothing families into one pane:
• Mid-Term Trend (blue line): ALMA applied to the detrended close — the percentage
deviation of price from its SMA — to expose the underlying swing direction.
• Trading Line: a triple EMA smoothing of the weighted price (2×close + high + low) / 4,
which reacts quickly while suppressing single-bar noise.
• Fast / Slow Momentum: the fast line is the rate of change of the Trading Line; the
slow line is its ALMA-smoothed counterpart. Their crossings drive all entries.
• Pump Zone: fast line below zero while holding above the slow line — the oscillator
version of a dip turning up. Available as an optional long-entry filter.
█ HOW TO USE
1 — Add the script to your chart; it renders in a separate pane below price.
2 — Read the B/S labels: B = fast crosses above slow (long bias), S = fast crosses
below slow (short bias). Background tint shows the tracked position state.
3 — Create alerts from the alert list (Long Entry, Short Entry, Long Exit, Short Exit,
Pump Zone) or use "Any alert() function call" for dynamic messages with prices.
4 — Tune the inputs below to your market and timeframe; defaults reproduce the
classic L1 behavior.
Input Parameters — Trend Lines
• Trend SMA Length (40): lookback of the SMA used to detrend the close.
• Trend ALMA Length / Offset / Sigma (21 / 0.85 / 6): shape of the mid-term trend ALMA.
• Trading Line EMA Length (4): base length of the triple EMA Trading Line.
• Slow Line SMA / ALMA Length / Offset / Sigma (2 / 3 / 0.85 / 6): smoothing of the
slow momentum line.
• Fast/Slow Scale (10.0): display multiplier of both momentum lines.
Input Parameters — Signal Governance
• Long Entry Only In Pump Zone (off): restrict long entries to the fast < 0 dip zone.
• Enable Short Signals (on): one-switch rollback to long-only behavior.
• Skip Entry When TP/SL Exits Same Bar (on): bank the profit and skip the flip when
a TP/SL exit fires on the same bar as an opposite entry.
• Cooldown Bars (3): minimum bar spacing between tracked signals; 0 disables.
Input Parameters — Risk (TP/SL)
• Enable TP/SL Tracking (on): tracks reference levels from each signal.
• ATR Length (14): volatility lookback.
• Stop Loss / Take Profit (2.0 / 3.0 × ATR): distance of the reference levels.
Input Parameters — Visual
• Show Signal Labels / Position Background / Fast-Slow Fill / Dashboard (all on):
individually switchable visual layers.
█ FEATURES
• Position state machine: signals are arbitrated against the tracked position, so
entries, reversals and exits never contradict each other.
• Exit signal family: XL / XS cross exits plus TP and SL touches, each labeled and
alerted with its reason.
• ATR-scaled TP/SL reference levels shown in the data window and dashboard.
• Status dashboard: position, momentum readings, trend direction, ATR, entry and
TP/SL levels at a glance.
• Five alertcondition channels plus dynamic alert() messages with live prices.
█ SIGNALS
Visual Elements
• B label (green, below the fast line): bullish momentum crossover — long bias.
• S label (red, above the fast line): bearish momentum crossover — short bias.
• XL / XS labels (orange cross): position closed by an opposite crossover.
• TP / SL labels (orange cross): reference take-profit or stop level touched.
• Yellow / fuchsia fill: fast above (yellow) or below (fuchsia) the slow line.
• Green / red background: tracked long / short state.
█ IMPLEMENTATION NOTES
• Built-ins used: ta.alma, ta.sma, ta.ema, ta.atr, ta.crossover / ta.crossunder.
• Pine Script v6. No request.security calls — no higher-timeframe repaint risk.
• All signals are crossover-driven (edge events), and alert() messages fire once per
bar close, so nothing repaints after confirmation.
• TP/SL levels are indicator reference values (entry close ± ATR multiples); the
script does not place orders.
█ LIMITATIONS
• A crossover scalper by design: expect whipsaws in flat, ranging markets.
• Momentum lines lag sharp V-turns; the cooldown suppresses rapid re-flips and may
skip very fast reversals.
• Best suited to liquid markets and short-to-intermediate timeframes (e.g. 5m—4h).
• Educational tool, not financial advice; always forward-test before risking capital.
█ NOTES
• Signal logic preserved from L1 by blackcat; V2 adds governance, risk tracking,
visualization and alerts without changing the core engine.
• Published under the Mozilla Public License 2.0.
════════════════════════════════════════════════════════════════════════
For questions or feedback, please use the comments section below.
Feel free to use and modify — attribution appreciated.
Don't miss out! The first and most important thing to do is to join my Discord chat now! Click here to start your adventure: discord.com/invite/ZTGpQJq My new github for more pine development soon: github.com/wxt-coder
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Don't miss out! The first and most important thing to do is to join my Discord chat now! Click here to start your adventure: discord.com/invite/ZTGpQJq My new github for more pine development soon: github.com/wxt-coder
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.