TREND The name of the indicator should be TREND -------------------------------------------------- -------------------------------------------------- ---------------- Indicator objectives Its objective is to create alerts for trends detected by the indicator. The indicator will need to have a parameter for history size. To create alerts, it will use the price values of several candles. The alerts should be displayed in a second window, below the graph. The indicator should also display on the chart the current time, currency name, and spread. Finally, it will only display alerts located within a specific time range. -------------------------------------------------- -------------------------------------------------- ---------------- Lexicon The following denominations will be used in the calculation formulas. YO >> Calculation candle This is the candle from which the calculation must be made. Y1 >> Candle preceding the Y0 candle and having the same upward or downward trend. YO-low >> Lowest price of Y0 candle YO-high >> Highest price of Y0 candle Y1-low >> Lowest price of Y1 candle Y1-high >> Highest price of Y1 candle -------------------------------------------------- -------------------------------------------------- ---------------- Time filter This filter will always be activated (on/off activation unnecessary). The time filter will define a time range. Outside of this time range, the indicator should not display alerts. A first parameter will define the start of the time slot (7 hours by default). A second parameter will define the end of the time slot (20 hours by default). This time slot can be modified by the user. Thus, the indicator will create alerts only between these 2 times. -------------------------------------------------- -------------------------------------------------- ---------------- History size By default, the history size should be 1000 candles. -------------------------------------------------- -------------------------------------------------- ---------------- The displayed elements of the indicator The following elements should be displayed on the graph, one below the other. Coordinates will allow you to adjust its position on the graph (top left by default). >> A digital clock, which will display the exact time. The displayed time (hour/minute/second) must be that of the user's computer, and must operate continuously. >> The name of the currency >> And the Spread The spread value displayed must be the one that existed during the last update. By refreshing, I mean pressing the refresh button, changing timeframes, seeing a candle that has just closed, or adding or removing an indicator from the chart. -------------------------------------------------- -------------------------------------------------- ---------------- Second window As this exists for other indicators (Rsi, Stochastic, etc.), the indicator must be displayed in a second window, below the chart. -------------------------------------------------- -------------------------------------------------- ---------------- Alerts They should be displayed in the second window, below the graph. They must be displayed on a single line. They must be displayed under the warning candles, and in the form of a “Grass Arrow”. For a bullish alert, a bold blue arrow should be created under the relevant bullish candle. For a bearish alert, a bold yellow arrow must be created under the bearish candle concerned. -------------------------------------------------- -------------------------------------------------- ---------------- Formula for detecting trend alerts The indicator will use price values from multiple candles to create an alert. As defined above, the objective of the indicator is to detect upward or downward trends. To do this, the indicator will look for several consecutive candles, which will either be all bullish or all bearish. Algorithm - For the detection of a bearish alert: If Y0 is a Bearish candle. You will need to look for the previous Bearish candle, which will be called Y1. If between these 2 bearish candles, there are only bullish candles. If Y0-low > 200 points (default) > Y1-high. A bearish alert will need to be created. The alert will be created at the close of this Y0 candle. Detecting this alert will result in the creation of a bearish yellow arrow below the Y0 candle. An audible alert and an alert on the alert board must also be created. The indicator must also respect the following condition (parameter X): The value of this parameter will modify the calculation mode of the Y1-high value (for a bearish alert). Depending on the value of parameter X, the value of Y1-high will have to be calculated based on several candles. If the parameter X is 5, the indicator must search for the highest price of the 5 candles preceding candle Y1 (including Y1). And this value will be the new value of Y1-high. - For the detection of a bullish alert: If Y0 is a Bullish candle. You will need to look for the previous Bullish candle, which will be called Y1. If between these 2 Bullish candles, there are only bearish candles. If Y0-high > 200 points (default value) > Y1-low. A bullish alert will need to be created. The alert will be created at the close of this Y0 candle. Detecting this alert will result in the creation of a blue bullish arrow below the Y0 candle. An audible alert and an alert on the alert board must also be created. The indicator must also respect the following condition (parameter X): The value of this parameter will modify the method of calculating the Y1-low value (for a bullish alert). Depending on the value of parameter X, the value of Y1-low will have to be calculated based on several candles. If the parameter X is 5, the indicator must search for the lowest price of the 5 candles preceding candle Y1 (including Y1). And this value will be the new value of Y1-low. -------------------------------------------------- -------------------------------------------------- ---------------- Order of indicator settings I want the indicator settings to be positioned in this order, from top to bottom. I would like all the "on/off" parameters to be modifiable by double-clicking. 1) The size of the history (1000 candles by default) 2) Parameter X (5 candles by default) 3) Point difference (200 points by default) 4) Character type (drop-down menu): Arrow/Dot/Square/Triangle Other items displayed 5) The clock (On by default) 6) The name of the currency (On by default) 7) The spread (On by default) 8) Abscissa of the elements displayed (50 by default) 9) Ordering of the elements displayed (50 by default) The time filter 10) Start of the Time Filter (07:00) 11) End of Time filter (9:00 p.m.) Alerts 12) Sound alerts (on by default) 13) Arrow alerts (on by default) 14) Alerts to the alerts table (on by default) -------------------------------------------------- -------------------------------------------------- ---------------- Colors The colors must be configured in the “colors” tab. By default Blue bullish alert arrow / size 2 Bearish warning arrow Yellow / size 2 Texts White / size 14 If there are other colors to configure, I'll let you choose. Thank you in advance for your work. If you have any questions, don't hesitate to ask me.