★Double top and Double bottom finder

 

Dear all sirs,

I have one imagination to find Double bottom and Double top.

Do you have any idea to caliculate how to find them by EA and Alert ??

If you could have some ideas, It will be so appreciate and glad to share

informations.

I have only a little programing skills but trying to find Breake through the way.

Thank you and best regards,

Yoshi

 
lastchancenow:

Dear all sirs,

I have one imagination to find Double bottom and Double top.

Do you have any idea to caliculate how to find them by EA and Alert ??

If you could have some ideas, It will be so appreciate and glad to share

informations.

I have only a little programing skills but trying to find Breake through the way.

Thank you and best regards,

Yoshi


i AM ALSO LOOKING FOR THE SAME. iF YOU FIND IT PLEASE LET ME KNOW.
 

The trick is to be able to convert what LOOKS like a double top/bottom to the eye, into a series of steps for a computer to decide.

For example, do 6 bars going up-down-up-down-up 10 pips each time count as a double top and bottom ?

One trick to remove small fluctuations is to check the path that a SMA takes, rather than the raw price.

I'm sure that someone somewhere has done a double-top/bottom algorithm (try searching); once you have that, it's relatively easy to code an indicator/EA/Alert

Bring some chunks of code or information or signs of you trying/spending some effort & I'm sure that others here would be more willing to assist.

 

I did it with the ZigZag function: if the next peak of the ZigZag is lower than the previous.

To get the zigzag values you can use the following routine:

double getExtreme(int ne)

{

   int k=iBars(Symbol(),0);

   int ke=0;

   for (int i=0; i<k; i++)

   {double zz=iCustom(Symbol(), 0, "ZigZag",ZigZagDepth,ZigZagDeviation,ZigZagBackStep, 0, i);

    if (zz!=0) {ke++; if (ke>ne) return(zz);}

   }

}  
Reason: