Announcement

Collapse
No announcement yet.

strange MA behavior

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

  • strange MA behavior

    When I run backtest, I seem to be getting different results for a particular MA for a given time than what I see on the chart. I figure I am doing something wrong, but I can not pinpoint what.
    Heres an example of what I mean:

    formula output:

    thisBar_MA: 81.08624999999992 day: 4 time 12:05
    thisBar_MA: 81.09874999999992 day: 4 time 12:0
    thisBar_MA: 81.10874999999993 day: 4 time 11:55

    Heres the part of my code that generates the output:

    var study1 = new MAStudy(8, 0, "C", "MAStudy.EXPONENTIAL");

    function main(){

    var thisBar = study1.getValue(MAStudy.MA);
    debugPrint("\nthisBar_MA: "+thisBar+" day: "+getDay()+" time "+getHour()+":"+getMinute()); ...



    And finally I am attacking the chart for that time period with the chart's MA. Any help would be appreciated!
    Attached Files

  • #2
    I am also able to duplicate this. I'll research this further with our QA Team to try to get to the bottom of it.
    Regards,
    Jay F.
    Product Manager
    _____________________________________
    Have a suggestion to improve our products?
    Click Support --> Request a Feature in eSignal 11

    Comment


    • #3
      Take off the quotes around MAStudy.EXPONENTIAL. This was causing the MA to be a simple MA.
      Regards,
      Jay F.
      Product Manager
      _____________________________________
      Have a suggestion to improve our products?
      Click Support --> Request a Feature in eSignal 11

      Comment


      • #4
        Ahh, that was it! Thanks a bunch.. had a feeling it would be something dumb I overlooked..

        Comment

        Working...
        X