MT4 iFractals replacement

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #40201 quote
    AVT
    Participant
    Senior

    I try to transscript a code from MT4 which is using the iFractals indicator. It’s an MT4 inline indicator and I cannot find any information what this indicator is calculating (just the usage syntax). Any ideas how to get around this?

    Thanks very much.

    #40203 quote
    GraHal
    Participant
    Master

    Put the code on here and some kind soul may be able to help?

    Without the code it’s a guessing game?

    #40204 quote
    Nicolas
    Keymaster
    Master

    This is the code you need, I made long time ago for someone in the French forum:

    cp = 2 
    
    if high[cp] >= highest[2*cp+1](high) then
    LH = 1
    else
    LH=0
    endif
    
    if low[cp] <= lowest[2*cp+1](low)  then
    LL= -1
    else
    LL=0
    endif
    
    if LH=1 then
    hil = high[cp]
    DRAWTEXT("▼",barindex[cp],hil,Dialog,Bold,12) coloured(100,100,100,100)
    endif
    
    if LL  = -1 then
    LOL=low[cp]
    DRAWTEXT("▲",barindex[cp],lol,Dialog,Bold,12) coloured(100,100,100,100)
    endif
    
    return
    AVT thanked this post
    #40220 quote
    AVT
    Participant
    Senior

    Thanks for your replies.

    @GraHal: Code is relatively simple (compare iFractals value to bars value), so I should get this going on my own. If I don’t try to do it on my own first instead of just asking “please can you code it for me”, I will never learn how to do it.


    @Nicolas
    : going to implement it and see what happens 🙂

    #40239 quote
    GraHal
    Participant
    Master

    Ah sorry AVT, you said in your op … I try to transscript a code from MT4 … so I was suggesting you add the MT4 code on here.

    Let us know how you get on?

    #40293 quote
    AVT
    Participant
    Senior

    Fractals part does now exactely what it should do, I limit the painting time. DF (words which you really should not say in public if you are civilized) – took me a whole day to understand it, but I think I got it now.


    @Nicolas
      Just to see that I really got it:

    cp = 2
    if high[cp] >= highest[2*cp+1](high) then
    //if high[cp] >= highest[cp*cp+1](high) then

    cp=2 must be a fixed value, because a valid fractal must be less than 4 – we count integers, so we count 3 (less than 4) -> makes us calculate with 3 candles back which is high[2] .

    The fractal formula which you use only works because 2*2 is the same as square of 2. If we would break the “valid” rule for a fractal and take iterations beyond 4, we must use the outcommented using the square. Correct?

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

MT4 iFractals replacement


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
AVT @avt Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by AVT
8 years, 7 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 07/10/2017
Status: Active
Attachments: 2 files
Logo Logo
Loading...