Announcement

Collapse
No announcement yet.

Backtesting multiple ema using multiple intervals problems

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Backtesting multiple ema using multiple intervals problems

    I have problem while backtesting multiple moving averages using muitple intervals.

    The problem is backtesting execution of the lower interval moving average executes only for last few bars.

    For example i have a 60 min moving average and want to enter trade only 5 min moving average is in sync with 60 min. The code executes fine . But the result is limited. The trades are taken only for the last 25-65 bars of 60 minute. All the trades before that aren't showing up.
    This is the piece of code i am using to call multiple interval moving avg::

    Code:
    Var vSymbol = Symbol+","+15;
    Code:
    xMA = eval(ema)(5, eval("close")(sym(vSymbol)));
    Code:
     xMA1= eval(ema)(15, eval("high")(sym(vSymbol)));
    Then i use getseries(xMA)
    Code:
    cl5=getSeries(xMA);
    Code:
     hi5=getSeries(xMA1);
    The result is limited only for a few bars loaded.
    ALso the same code works with limited results on eSignal 11 but not on eSignal 10.6(it retrives bars but doesn't display backtest results).

    Please help.
    Last edited by manu82; 02-07-2012, 10:08 PM.

  • #2
    I think you need to post your entire script because, from the code sections posted, it looks like you're having fundamental problems with how to program in Javascript and how to call the EFS functions properly to get what you want.
    Last edited by SteveH; 02-07-2012, 11:39 PM.

    Comment

    Working...
    X