MTF Bar Patterns

 

Is it possible to code a multi TF bar pattern if so how.

I have been working on this for a while but I can't find out how to do it.

I'm trying to code an ea that used various patterns and open position on 3 different Time frames

I have this for the 4hr bars

   double high240  = iHigh(NULL,240,0);
   double low240   = iLow(NULL,240,0);
   double close240 = iClose(NULL,240,0);
   double open240  = iOpen(NULL,240,0);
   double P240 = (high240+low240+close240)/3;
   
   double high241  = iHigh(NULL,240,1);
   double low241   = iLow(NULL,240,1);
   double close241 = iClose(NULL,240,1);
   double open241  = iOpen(NULL,240,1);
   double P241 = (high241+low241+close241)/3;

   double high242  = iHigh(NULL,240,2);
   double low242   = iLow(NULL,240,2);
   double close242 = iClose(NULL,240,2);
   double open242  = iOpen(NULL,240,2);
   double P242 = (high242+low242+close242)/3;

and

this for a couple of the patterns

      if (close242<open242 && close241>open241 && open240> open241)Long1 = true;
      if (close242>open242 && close241<open241 && open240< open241)Short1 = true;
      
      if (open241<close242 && close241>open241 && open240< close241)Long2 = true;

Any help would be great.

Reason: