How do I check for a double top or double bottom

 

In my EA, I wish to check to make sure that the current currency price is above the last 4 bars High before I enter a buy trade. How would I test for this in a MQ4 statement? Thanks in Advance!!

Dave <<<
 
iscuba11:
In my EA, I wish to check to make sure that the current currency price is above the last 4 bars High before I enter a buy trade. How would I test for this in a MQ4 statement? Thanks in Advance!!
Dave <<<

if(Ask > iHigh(NULL, 0, Highest(NULL,0,MODE_HIGH,4,1))

{

Ordersend.... etc...

}

I did not test it, so do your own debugging to make sure it works.

 

Thank you ever so kindly! Some times I cannot see the forest from the trees!

Dave <<

About a month ago, I started saving snipets of coding. I would love to see what someone has suggested, an encylopedia of snipets. This would help us weak programmers a bunch! I would gladly share my snipets to help others. Can the administrator of this site please do this for us soon!

With Appreciation for this dynamite forum! The best of the best!

Dave

<<<

 

Double-bottom, Double-top alert?

Is there any available indicator out there to identify double bottom and double top patterns and alert user?

If not, I am thinking to create one, but I can't think of the algorithm

 

I am not sure but look at the following threads:

https://www.mql5.com/en/forum/175252

https://www.mql5.com/en/forum/178496

https://www.mql5.com/en/forum/173783

And you may use ZUP indicators from this post https://www.mql5.com/en/forum/178120

 

Thanks everyone

Hi;

I am very new to FX trading, though i have suffered some big loss; I observed that the senior member have been very helpful.

To all the senior members i am saying thank you and God bless.

 

Double top indicator (by Alexander Gettinger)

The indicator finds single and double tops and bottoms.

In the indicator parameters are specified:

- minimum height/depth,

- the maximum distance between the tops/bottoms (for twin tops/bottoms),

- the minimum number of bars after the top/bottom.
Files:
Reason: