ultra_trend_alarm
Download scriptThis script is designed as an automated monitoring tool for your trading platform. Its primary purpose is to act as a real-time alert system that notifies you the exact moment specific market conditions are met based on a custom trend indicator.
How it Works
The script continuously observes the data provided by a specialized tool called "ULTRA_TREND." Rather than looking at every single price movement, it focuses on a specific numerical threshold (the "Level Value") that you can define in the settings.
The Logic Breakdown
The script monitors two specific timeframes simultaneously to ensure you don't miss an opportunity:
- Current Live Action: It watches the most recent price action. If the trend value climbs above your designated level from a previous position below it, the script triggers an immediate audio alert.
- Previous Candle Completion: It also checks the data from the candle that just closed. If that specific finished period showed the trend breaking upward past your threshold, it triggers the same alert.
Key Features for the User
- Instant Notifications: By using an audio alarm, the script ensures that you are notified immediately of a trend shift without having to constantly stare at the charts.
- Customizable Thresholds: You have the flexibility to set your own "Level Value," allowing you to tailor the sensitivity of the alerts to your specific trading strategy.
- Dual-Layer Detection: By checking both the live price and the recently closed candle, the script provides a more comprehensive coverage of market entries, catching trends as they happen and confirming them as they close.
In simple terms, this script acts like a digital security sensor: it sits in the background and "rings a bell" the moment the market trend crosses your preferred boundary line.
//+------------------------------------------------------------------+
//| |
//| Copyright © 2009, --Id-- |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "--Id--"
extern string AlarmSound = "alert.wav";
extern double LevelValue = 20;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start()
{
if (
(iCustom(NULL, Period(),"ULTRA_TREND",0,0) > LevelValue)
&& (iCustom(NULL, Period(),"ULTRA_TREND",0,1) < LevelValue)
)
PlaySound(AlarmSound);
if (
(iCustom(NULL, Period(),"ULTRA_TREND",1,0) > LevelValue)
&& (iCustom(NULL, Period(),"ULTRA_TREND",1,1) < LevelValue)
)
PlaySound(AlarmSound);
return(0);
}
Comments