Adding alerts to a MTF Fractals indicator

#1
Hello all,

I am wondering about the feasibility of adding alerts to a free MTF Fractals indicator from TrueTL. Most fractal indicators I have encountered will only alert price breaks of the current support and resistances fractals. If the fractals are not broke they disappear once new fractals are formed. However, I would like to have alerts for when price touches any of the previous 'unbroken' fractals too like the picture below.

From what I can gather from the code, the price is stored in the two draw arrow buffers for the first three candles of the fractal after which the buffer is set to EMPTY_VALUE and a horizontal line object is drawn from the subsequent candle until the price is broken.

So I guess my first question is: is what I want to do possible? I figured I could store the time and price of when the previous support fractal is formed so that when it is broken I could simply use iBarShift to fetch those values but the previous support fractal is not always the next lower fractal once the current one is broken.

Anyone have any ideas?

Thanks!
fractals.png
MTF_Fractal.mq4
(6.1 KiB) Downloaded 1209 times


Re: Adding alerts to a MTF Fractals indicator

#3
Hello mladen, I am very much enjoying your new site

Yes, in a strong trend, a lot of signals would be generated. I should probably describe more about my intended use. I plan on using the alerts for trading rejections instead of breakouts.

As an example, if the low of the current bar is lower than a relatively recent higher TF fractal but still closes above it an alert would be triggered.

if(Open > downBuffer && Close > downBuffer && Low < downBuffer) then an alert is triggered

I however would not want an alert triggered when the close is lower then the support fractal buffer. So in a strong trend price will likely break multiple fractal levels but no alerts would be triggered.

 
If you don't have the time or desire to code it don't worry about it. I obviously don't want to waste your time. I was just wondering if it could be done in a relatively easy manner as my programming skills aren't the greatest.
Screen_Shot_2017-02-14_at_4.04.47_AM.png

Re: Adding alerts to a MTF Fractals indicator

#4
slava wrote:Hello mladen, I am very much enjoying your new site

Yes, in a strong trend, a lot of signals would be generated. I should probably describe more about my intended use. I plan on using the alerts for trading rejections instead of breakouts.
I think that this type is perfectly clear when we use it in our manual trading, but when we try to automate it, it is not so any more


Attachments 3
  1. Similar Topics

    1. Adding Divergence to indicator

      14 Replies 2706 Views

      by Cybran, Thu May 28, 2020 4:02 am in MT4 Indicators

      14 Replies
      2706 Views
    2. Fractals Pivots setup by Vere

      5 Replies 1765 Views

      by Antonio, Sun Nov 24, 2019 1:49 am in MT4 Indicators

      5 Replies
      1765 Views

Return to “Coding Help”