Tester in 2 time periods
Help please
Read article Simultaneous Displaying of the Signals of Several Indicators from the Four Timeframes. I suspect it helps you.
Thank you Rosh =)
I checked it but it will not work, because i know how to do ir in the terminal, but in the Tester i just can check the candles of 1 period (in this case 1 hour) so i want to make the EMA of the 4 hour with the 1 hour values, but now I'm yhinking that this is impossible because i need the Close price of the last bar in the 4 hour, Im not sure, help please
hello im creating an EA that work in 2 time periods (start working in 4 hour and after succesfull pattern it changes to 1 hour)
The problem is that the tester just admits 1 time period, and live testing it can take me up to months so im creating 4 hour indicators with 1 hour information just for testing purposes.
looks like this:
double hora=TimeHour(TimeCurrent()); //actual time
int diferencia=MathMod(hora,4); //difference between 4 hour and 1 hour
int last=(Bars-diferencia)/4;
double EMA8[] ;
EMA8[last]=iClose(NULL,PERIOD_H1,Bars-diferencia);
for ( int i=last-1; i>=1; i-- )
{
I wat to know if with this i get the real values of the EMA 8, or hot to know it (showing text or something).Close4=iClose(NULL,PERIOD_H1,i*4+diferencia); // This must be the Close price in 4 hour
EMA8[i]=Close4*2/9+EMA8[i+1]*7/9; // Crating an array with all prices of EMA 8
}
Help please. Thanks.