Bactest multiple timeframe

General discussion about the Tickstory Lite software package.
Post Reply
ea.maxpro.vn
Posts: 6
Joined: Fri May 24, 2013 11:03 am

Bactest multiple timeframe

Post by ea.maxpro.vn »

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!
tickstory
Posts: 5166
Joined: Sun Jan 06, 2013 12:27 am

Re: Bactest multiple timeframe

Post by tickstory »

Hi Ea.maxpro.vn,

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));
Regards.
ea.maxpro.vn
Posts: 6
Joined: Fri May 24, 2013 11:03 am

Re: Bactest multiple timeframe

Post by ea.maxpro.vn »

Thanks!

It works for me now!
experienced_tester
Posts: 18
Joined: Wed Jul 03, 2013 12:38 pm

Re: Bactest multiple timeframe

Post by experienced_tester »

Hi

In what way should we use that code?
Should it be inserted into the EA code?
Thanks a lot.
tickstory
Posts: 5166
Joined: Sun Jan 06, 2013 12:27 am

Re: Bactest multiple timeframe

Post by tickstory »

Hi Experienced_tester,

Put the code into the main start() block of your EA.

Thanks.
Post Reply