Backtesting shows orders that should not have triggered, why?

Forums ProRealTime English forum ProOrder support Backtesting shows orders that should not have triggered, why?

Viewing 3 posts - 1 through 3 (of 3 total)
  • #166141

    Hi everyone,

    I am just starting out learning how to code with very simple scripts. The code below should trigger a Long Order when the MA20 crosses above the MA50 and sell when the MA20 goes below the MA50. However when backtesting there are a lot of orders that where triggered that shouldn’t have been. Am I doing something obviously wrong?

     

    See attached image for trade that should not have been triggered.

    Any pointers really appreciated. Also I did not find a search on the forum, I am sure this was asked before. If there is a search please let me know.

     

    #166153

    Your code shows SMA and your image shows EMA.

    #166179

    oh.. thanks. Fixed it and now seems to be working fine.

    1 user thanked author for this post.
Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login