Hi all,
I want to backtest Multiple timeframe with tickdata.
My EA for backtest tries to get RSI on M5, M15 and M30 at a time.
It's ok for value of RSI M5. But result is 0 for all RSI of other timeframe M15 and M30.
I already exported data of M5, M15 and M30 to Mt4.
Please support! Thanks!
Bactest multiple timeframe
Re: Bactest multiple timeframe
Hi Ea.maxpro.vn,
We have tried the following code and it works fine:
Regards.
We have tried the following code and it works fine:
Code: Select all
double rsi5;
double rsi15;
double rsi60;
rsi5 = iRSI(NULL,5,14,PRICE_CLOSE,0);
rsi15 = iRSI(NULL,15,14,PRICE_CLOSE,0);
rsi60 = iRSI(NULL,60,14,PRICE_CLOSE,0);
Print("RSI 5m: " + DoubleToStr(rsi5, 4) + ", RSI 15m: " + DoubleToStr(rsi15, 4) + ", RSI 60m: " + DoubleToStr(rsi60, 4));
-
- Posts: 6
- Joined: Fri May 24, 2013 11:03 am
Re: Bactest multiple timeframe
Thanks!
It works for me now!
It works for me now!
-
- Posts: 18
- Joined: Wed Jul 03, 2013 12:38 pm
Re: Bactest multiple timeframe
Hi
In what way should we use that code?
Should it be inserted into the EA code?
Thanks a lot.
In what way should we use that code?
Should it be inserted into the EA code?
Thanks a lot.
Re: Bactest multiple timeframe
Hi Experienced_tester,
Put the code into the main start() block of your EA.
Thanks.
Put the code into the main start() block of your EA.
Thanks.