Different Indicator TimeFrame as Trigger signal in EA

 
I would like to use different indicator timeframe as trigger signal of an EA. For example I use indicator shown here with time frame of PERIOD_M1 as signal of an EA, then I attach the EA on a D1 period. Did I do it right? I tried this but the EA did not work properly. What is the missing code here so that the EA can recognize the M1 signal in a D1 chart. Please help.
 double StdD1=iStdDev(NULL,PERIOD_M1,StdPeriod,0,MODE_SMA,PRICE_CLOSE,0),
         StdD2=iStdDev(NULL,PERIOD_M1,StdPeriod,0,MODE_SMA,PRICE_CLOSE,1),
         OBV1=iOBV(NULL,PERIOD_M1,PRICE_CLOSE,0),
         OBV2=iOBV(NULL,PERIOD_M1,PRICE_CLOSE,1);
         
  double StdDR= StdD1/StdD2;
  
  double OBVRB= OBV1/OBV2;
  double OBVRS= OBV2/OBV1;
 
Zaldy: I tried this but the EA did not work properly. What is the missing code here
  1. "not work properly" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here.
  2. Perhaps what's missing is code that does something. Print out your variable values and track it down.
Reason: