System works in backtest but crashes in real time

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #169401 quote
    CrocogotterCrocogotter
    Participant
    New

    Hi

    I’ve used a few different codes to try to run my system, but the latest one works fine for backtesting, loads up OK for Pro-Order, but then crashes and I get an error message advising me to modify it and backtest  it. My problem is that the current coding backtests fine, but crashes in use, so I wonder if there’s anywhere in particular I should be looking at given the error message (eg does the “ex:(-10)” relate to anything specific or is it a generic error code?).

    Obviously I’ve read what it says, but I’m confused as to why a parameter can’t equal zero; if we define a parameter why wouldn’t it be allowed to equal zero?

    Many thanks in advance.

    Trading-system-crash.png Trading-system-crash.png
    #169406 quote
    NicolasNicolas
    Keymaster
    Legend

    That error message is talking about the way you have set a period for an indicator, example:

    var = average[myPeriod](close)

    If for any reason, “myPeriod” equal 0 or a negative value, then the program will crash. As it is not really a problem while backtesting, it could devastating in real time situation with real money. So just check all of your indicators period first.

    Crocogotter thanked this post
    #169410 quote
    CrocogotterCrocogotter
    Participant
    New

    Ah, OK, great, many thanks, I know where to start looking. Thanks for explaining, that makes sense, and I have included a time period bit of coding in this version so that’s very likely to be the problem.

    #169421 quote
    CrocogotterCrocogotter
    Participant
    New

    Thanks again, I made a very small modification (added +1 so the parameter can’t be zero) and the code has successfully executed a (winning :-)) trade this afternoon and is still running. Much appreciated.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

System works in backtest but crashes in real time


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by CrocogotterCrocogotter
5 years, 4 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/11/2021
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...