PROTECTED SOURCE SCRIPT
Güncellendi Another EMA trend indicator

"Another EMA Trend Indicator" is a dynamic trend-following tool. Blending customizable Moving Averages (EMA or SMA) with an automated, visualized trade management system. It identifies bullish and bearish trend shifts based on short- and long-term MA crossovers, dynamically calculates optimal entry points, stop-losses, and take-profits, and visually manages trades on the chart with optional clouds, lines, and labels.
Main Features:
Moving Average Trend Detection:
Choice between EMA (Exponential Moving Average) or SMA (Simple Moving Average).
Two customizable lengths: a short MA and a long MA.
Detects bullish and bearish switches based on MA crossover events.
Entry, SL, and TP Calculation:
Entries are calculated dynamically after a signal using a combination of historical candle high/low analysis and a risk divider.
Stop-loss and take-profit levels are automatically set based on the trend's recent volatility and user-defined risk parameters.
Supports fixed or dynamic profit targets.
Risk Management Settings:
Define minimum and maximum acceptable profit percentages.
Set maximum stop-loss distance and apply a stop-loss multiplier for added flexibility.
Limit maximum trade duration to avoid endless open trades.
Trade Visualization:
Optional debug mode to display:
Entry, stop-loss, and take-profit lines.
Buy/sell signals via shapes on the chart.
Trend cloud between short and long MAs.
Historical trend levels for better visualization.
Dynamic Statistics Panel:
Real-time display of:
First trade date.
Total number of trades.
Number of profitable and losing trades.
Average and maximum trade duration.
Win rate and average profit/loss percentages.
Inputs:
MA Type: Choose between "EMA" or "SMA."
Short/Long MA Length: Customize lengths to control sensitivity.
Source: Apply to typical price values like hl2.
Risk Settings:
Minimum, maximum, and fixed profit percentages.
Stop-loss settings and risk dividers.
Trade Behavior Settings:
Max trade length.
Visualization Toggles:
Show/hide debug labels, lines, clouds.
Use Case:
This indicator is ideal for trend-following traders who prefer a semi-automated trading framework. It helps maintain consistency in entries and exits while visualizing important trend dynamics and trade health directly on the chart.
Best suited for swing trading crypto coins.
Main Features:
Moving Average Trend Detection:
Choice between EMA (Exponential Moving Average) or SMA (Simple Moving Average).
Two customizable lengths: a short MA and a long MA.
Detects bullish and bearish switches based on MA crossover events.
Entry, SL, and TP Calculation:
Entries are calculated dynamically after a signal using a combination of historical candle high/low analysis and a risk divider.
Stop-loss and take-profit levels are automatically set based on the trend's recent volatility and user-defined risk parameters.
Supports fixed or dynamic profit targets.
Risk Management Settings:
Define minimum and maximum acceptable profit percentages.
Set maximum stop-loss distance and apply a stop-loss multiplier for added flexibility.
Limit maximum trade duration to avoid endless open trades.
Trade Visualization:
Optional debug mode to display:
Entry, stop-loss, and take-profit lines.
Buy/sell signals via shapes on the chart.
Trend cloud between short and long MAs.
Historical trend levels for better visualization.
Dynamic Statistics Panel:
Real-time display of:
First trade date.
Total number of trades.
Number of profitable and losing trades.
Average and maximum trade duration.
Win rate and average profit/loss percentages.
Inputs:
MA Type: Choose between "EMA" or "SMA."
Short/Long MA Length: Customize lengths to control sensitivity.
Source: Apply to typical price values like hl2.
Risk Settings:
Minimum, maximum, and fixed profit percentages.
Stop-loss settings and risk dividers.
Trade Behavior Settings:
Max trade length.
Visualization Toggles:
Show/hide debug labels, lines, clouds.
Use Case:
This indicator is ideal for trend-following traders who prefer a semi-automated trading framework. It helps maintain consistency in entries and exits while visualizing important trend dynamics and trade health directly on the chart.
Best suited for swing trading crypto coins.
Sürüm Notları
"Error on bar {bar_index}: The requested historical offset ({num1}) is beyond the historical buffer's limit ({num2})." error fixSürüm Notları
Signals now seem to be more accurate but every crypto coin tends to have its sweet spot for minimum profit and trend offsetImprovements
- Trend detection
- Trade entry/profit/loss logic
- Trend lines (improved start of trend display)
New inputs
- Max entry length - candle amount to start entry or cancel signal
- Minimum trend offset - dynamic offset, changes a lot for signal accuracy
TODO:
- Option to automatically adjust inputs for best signal accuracy
- Performance improvements
Sürüm Notları
Improvements- Start time - input for more accurate trade statistics
- Added statistics for long and short trades
- Small change for signal entry accuracy
Sürüm Notları
Updated signal entry value logicSürüm Notları
- Minimum trend offset renamed to Default trend offset
- New option - Use automatic trend offset
- Small improvement on signal entry value
Sürüm Notları
- Renamed "Use automatic trend offset" to "Use automatic trend inputs"
- "Use automatic trend inputs" now checks offset and fixed profit inputs for optimal signals
Sürüm Notları
- Dropped automatic trend offset input/feature due to performance issues
- Rewrote indicator logic
Sürüm Notları
Option to debug eventsDefault is enabled. When enabled shows labels to catch up on events
- Entry(blue) - candle where entry was hit
- TP(green) - candle where take profit was hit
- SL(red) - candle where stop loss was hit
- Stopped(yellow) - entry was hit and TP or SL was not hit but algorithm decided to stop it gaining profit or taking a loss into statistics
- Cancelled(orange) - entry was not hit and signal disappeared
Sürüm Notları
Updated signal logicKorumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Korumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.