System works in backtest but crashes in real time

Forums ProRealTime English forum ProOrder support System works in backtest but crashes in real time

Viewing 4 posts - 1 through 4 (of 4 total)
  • #169401

    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.

    #169406

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

    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.

    1 user thanked author for this post.
    #169410

    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

    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)

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