EA Forex Academy – Algorithmic & Manual Trading Courses Forums Forex Trading Forum Fractals.. Here code compiles without Error but it is NOT opening trade…

Tagged: , ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #65357
    Ahmed Hussain
    Participant

    Hi, I am new to MQL4 programming. I am trying to add code to my EA using fractal. The condition is if there is NOT Up Fractal in last 4 bars , it should open BUY trade..Here code compiles without Error but it is NOT opening trade…Regards..

    here’s the code:

    bool Upfractal()
    {
    int a;
    for(a=1;a<5;a++)
    {
    if(iFractals(NULL,0,MODE_UPPER,a)!=0)
    return(true);
    }
    return(false);
    }

    void ManageOpen()
    {
    if(Upfractal()==false)
    {
    OpenPosition(OP_BUY);
    }
    }

    #65574

    Hey Ahmed,

    I am not sure if anyone here will be able to help you with that. It is more of a trading forum instead of programming…

    We use the strategy builders EA Studio and FSB Pro to automate the strategies so we do not program by ourselves.

    Check ur FSB Pro, it has the Fractal as an indicator.

    Cheers,

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