Fractal EA Scalper - A little advice please.

 

Hello,

This is my first post, so please be gentle with me..

I am a beginner MT4 coder who needs some help. Luckily, it is not going to take too long to explain my problem.

I am trying to create a Fractal EA Scalper that takes 5 pips from every fractal that displays itself on the screen. But I cannot get the trading logic to work as I would like.

Here it is for a SELL trade:

if (iCustom(NULL, NULL, "Fractals[1]",0,0) > Ask)

And here it is for a BUY trade:

if (iCustom(NULL, NULL, "Fractals[1]",1,0) < Ask)

Because the Fractal[1] indicator is imported into the EA, I thought all I had to do was add the trading logic.

Can someone tell me where I am going wrong?

Thank you in advance.

peter_pipers_pips

 
Reason: