Hi guys,

I need to bug you all again for another help, hope you guys don't mind lol,

My intention is to get the bpat or spat >=2 to execute trade but somehow, it's still executing trade even with 1. I noticed that the previous programmer is not utilizing the 'lastbardpt', is this the reason?

                      if(UsePatternCheck)
                      {
                         bpatternM5=false;
                         spatternM5=false;
                         find=0;
                         bpat=0;
                         spat=0;
                         lastbardpt=0;
                         for(d=1;d<=100;d++)
                         {
                            if(CheckLongM5(pair,5,d))
                            {
                               bpat++;
                               find++;
                            }
                            if(CheckShortM5(pair,5,d))
                            {
                               spat++;
                               find++;
                            }
                            if(find==2) break;
                         }
                         if(bpat>=2) bpatternM5=true;
                         if(spat>=2) spatternM5=true;
                      }

Thanking you in advance for your time and kind assistance.

Warmest regards.