Tarea técnica
I have a signal I would like converted to MQL5 as an indicator .Inside this indicator (attached) is an RSI Signal Line and and an RSI Price Line. I would like that in MT5/MQL5 as an indicator. There is a lot to that indicator, but I am only concerned with the signals from the RSI Price Line and RSI Signal lines crossing
1. Uses DTI in MTF. So the trend being the higher timeframe greater than 0 is positive (up trend). Less than 0 is negative (down trend). All trades must go with the trend.
2. Use the RSI Signals you are working on (on the current timeframes) to ONLY trade with the higher timeframe DTI trend. If DTI is positive in the 1D or 1Month timeframe (or whatever) then the only Long RSI trades will take place. And vice-versa. When the DTI is less than 0 (negative) only short trades can be taken in the timeframe we are using for RSI Signals.
3. There is a filter. The trades will also only take place when the current DTI is -45 or less (-46, -47, etc.) AND the Long RSI signal is given. Conversely, a short trade is when the DTI is 45 or greater and the Short RSI Signal is given. Again, has to be with the higher timeframe DTI trend.
4. SL and TP. I would like that they can be a combination and I'll test to see what works best. One way is have SL and TP in pips. The other is an opposite when the current timeframe of DTI hits the opposite 45 or -45. So if it were entered as a long trade (-45 and an L), then when it hit 45 on the current DTI it would trigger to sell the position. I think what will happen is the SL will likely be the opposite 45 (or -45 DTI) and the TP will be a combo of either in pips or the opposite DTI (45 or -45).
The image is the same as one earlier except the Blue Box and Blue Arrow show to the TP (would also be a SL) in this example. In the example the higher timeframe is long. There were buys for long. It's the opposite signal (less or greater than 45 AND signal cross) as a TP or SL. In this case it's a Sell alert greater than 45.