TrendlineCrossAlert
This EA monitors horizontal and trendlines of a specified color on the chart and sends alerts (popup, push notification, or email) when price crosses them. Upon crossing, it changes the line color to a 'crossed' color to prevent duplicate notifications for the same line. It does not open or manage any trades.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
Not backtested yet — this EA could not be converted automatically.
Strategy analysis
This is a pure notification utility with no trading strategy logic whatsoever. Its core concept is monitoring user-drawn trendlines and horizontal lines, detecting price crossovers by comparing the current bar's open and close prices against the line's price value. Entry conditions are not applicable since this EA does not open positions; exit conditions are also not applicable. Position sizing and money management are entirely absent as this is a non-trading tool. The sole logic is checking on every tick whether price has crossed from one side of a line to the other, and sending notifications through multiple channels when a crossover occurs. It uses a color-change mechanism to avoid duplicate notifications, which is a simple but effective deduplication strategy.
Strengths
- Color-change deduplication mechanism is simple and effective, preventing duplicate notifications for the same line
- Supports multiple notification channels (alert, push, email), offering good flexibility
- Handles both horizontal lines and trendlines, covering common chart object types
- Uses sinput for parameters, preventing the optimizer from modifying these settings
- Clean code structure with OOP encapsulation, decent maintainability
Weaknesses
- Relies on manually drawn lines, cannot auto-generate monitoring objects, limiting efficiency
- Price crossover detection based on current bar open/close may cause false positives or missed detections on the first tick of a new bar
- No IsNewBar filter, performs full scan on every tick, potentially consuming excessive resources on high-frequency instruments
- Does not handle edge cases for ray-extended trendlines' right-side price calculation
- Missing exception handling for when line objects are deleted or modified mid-scan
Possible improvements
- Add IsNewBar filter to only perform detection on new bars, reducing unnecessary computational overhead
- Add support for OBJ_RAY (ray trendlines) to expand the range of monitorable chart objects
- Add event listeners for line deletion and modification (CHARTEVENT_OBJECT_DELETE/CHANGE) to improve robustness
- Add sound alert option with custom notification sound functionality
Risk assessment
Overall risk: Safe
- This EA does not execute any trading operations, posing no financial risk
- Frequent notification pushes may cause distraction during extreme market volatility
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MonitoringColor | clrYellow | Line color to monitor, only tracks this color |
CrossedColor | clrGreen | Color change after crossover to prevent repeat alerts |
EnableAlerts | true | Enable popup alert notifications |
EnableNotifications | false | Enable pushnotification |
EnableEmails | false | Enable emailnotification |
Similar Utility EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.