Download MetaTrader 5

Different Indicator TimeFrame as Trigger signal in EA

To add comments, please log in or register
risaldeb
119
risaldeb 2014.03.02 13:43 
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;
whroeder1
14753
whroeder1 2014.03.02 14:49  
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.
To add comments, please log in or register