Download MetaTrader 5

correcting acode with fractals for indicator

To add comments, please log in or register
Abdullah Alrai
Abdullah Alrai  






iam making an indicator it has acode above

iwant to draw ablue line when the price below the lower fractal at daily on my viewed chart like 15m 5 m etc

but the result is wrong it draws unusually lines!!

note b1 is the buffer for blue line 

Oksana Berenko
Oksana Berenko  
show the whole code of the indicator
Lorentzos Roussos
Lorentzos Roussos  

The fractals call returns zero .
You have to :

A. Double check if there is a fractal present at every bar .
    UP Fractal       -> frac0up==High[i]

    DOWN Fractal -> frac0dn==Low[i] 


B. Or you have to propagate the value of the last up and down fractal within your buffers so
you have a reference to compare price to. 

To add comments, please log in or register