Hi all, since I'm not good on MT4 programming (I'm not a programmer at all), could someone help me on building a custom indicator (let's call it Easy Trend) for the 60 second strategy discussed in this thread? This indicator could be helpful for any strategies since it's an easy way to represent the main trend with a simple logic.
Below what we could need with some examples.
We need an easy, minimal and a clean indicator like that one shown in top right angle of the pictures:
It's made by:
- pair we are observing;
- Triangle for trend direction;
- % of the strenght of trend;
- Text for explanation of the trend (SIDETREND, DOWNTREND, UPTREND);
- indication of n of bars used for calculation.
- n of bars to take in consideration in the current TimeFrame (minimum 3 bars, maximum 5000 bars)
- Uptrend color
- Super Uptrend color
- Downtrend color
- Super Downtrend color
- Sidetrend color
- Trendline color
- Trendline drawing (true, false)
- Position of the indicator in the main window (up or down left corner, up or down right corner)
- Font size
- Alarm for Super trend
Logic is described in the images below. Using the medium price of the candle n bars before the current candle and the current price, we can draw a line that defines the direction of our trend.
input representation.png 59.43KB 2 downloads
The tangent of the angle generated by this new line and the zero line (the zero line is the parallel one created starting from the medium price of the candle n bars before the current candle) we also have the strength of the trend. High values of tangent are strong values for trend (UP or DOWN).
Translating the tangent values in % we can show both informations: direction and how much strong the trend is.
At the currenct candle closure the indicator should recalculate the trend using the new current candle and a new n bars before current candle.
Here the logic used for the tangent identification and % conversion of tangent values:
Can anyone help me???
Thank you in advance!!