Confirmation of reversal patterns

 

Hi, i wanted to confirm all my reversal patterns for small bar. Also has anyone come up with a algo to tune oscillators like stochastic to bottoms on a trend, i've looked around but haven't found anything.


      //  AN INSIDE BAR
      if((High[2]-Low[2])/point >= 70 && Low[1] > Low[2] &&
         (Open[2]+Close[2])/2 >= Open[1] && Close[1] > Open[2] && Open[1] > Close[1] && Open[2] < Close[2])
      
         //AN ii PATTERN
         if((High[2]-Low[2])/point >= 70 && Low[1] > Low[2] &&
            (Open[2]+Close[2])/2 >= Open[1] && Close[1] > Open[2] && Open[1] > Close[1] && Open[2] < Close[2]
            &&  Open[2] >= Open[1] && Close[2] <= Close[1])
       
            //AN iii PATTERN
            if((High[3]-Low[3])/point >= 70 && Low[2] > Low[3] &&
               (Open[3]+Close[3])/2 >= Open[2] && Close[2] > Open[3] && Open[2] > Close[2] && Open[3] < Close[3]
               &&  Open[3] >= Open[2] && Close[3] <= Close[2]
               &&  Open[2] >= Open[1] && Close[2] <= Close[1])
             
               //AN ioi PATTERN
               if((High[3]-Low[3])/point >= 30 && Low[2] < Low[3] && High[2] > High[3] &&
                  Close[2] < Open[3] && Open[2] > Close[2] && Open[3] < Close[3]
                  && Low[1] > Low[2] && High[1] < High[2]
                  && Open[2] >= Open[1] && Close[2] <= Close[1])
                       
                  //AN OUTSIDE BAR
                  if((High[2]-Low[2])/point >= 70 && Close[1] < Low[2] &&
                     (High[1]+Close[1])/2 <= High[2] && Close[2] < Open[1] && Open[1] > Close[1] && Open[2] < Close[2]
                     && Open[0]>Close[0])
                         
                     //THREE-BAR REVERSAL
                     if((High[3]-Low[3])/point >= 70 && Low[2] > Low[3] && High[3] <= High[2] &&
                        (Open[3]+Close[3])/2 <= Close[2] && Close[2] > Open[3] && Open[2] > Close[2] && Open[3] < Close[3]
                        && Open[1] > Close[1] && Close[1] <= Open[3]+30*_Point)
                     
 

Good topic, IMO you need a much larger code to find reversals. 

Key questions.

Are you trying to find reversals every hour, day, week, monthly? The longer the timeseries, the longer the code.

Are you trying to find reversals for both bearish and bullish signals ?

Tip. Your algorithms output is constantly going to change, there is no fixed input to actually spot a reversal.  

 
Adj007 #:

Good topic, IMO you need a much larger code to find reversals. 

Key questions.

Are you trying to find reversals every hour, day, week, monthly? The longer the timeseries, the longer the code.

Are you trying to find reversals for both bearish and bullish signals ?

Tip. Your algorithms output is constantly going to change, there is no fixed input to actually spot a reversal.  

thanks Adj007, I've used reversals on the 1min and 5min chart, these reversals were only looking for bearish signals. Would you say forex markets have individual reversals that occur regularly? or is there some thing else?

 
Sanjay Rathore #:

thanks Adj007, I've used reversals on the 1min and 5min chart, these reversals were only looking for bearish signals. Would you say forex markets have individual reversals that occur regularly? or is there some thing else?

This entirely depends on your reversals conditions. You can write all this code but then what happens when price is below a spotted reversal ? How long are the reversals ? Using 1 min and 5 min I’m assuming these are scalp reversals. There is a more mathematical solution than simply requesting close prices and ordering them into conditions.