Strategy stopped – Strategy failed.

Forums ProRealTime English forum ProOrder support Strategy stopped – Strategy failed.

  • This topic has 5 replies, 3 voices, and was last updated 1 month ago by avatarRTR.
Viewing 6 posts - 1 through 6 (of 6 total)
  • #248055
    RTR

    Every time I try to create a strategy using custom indicators and run it, it stops after about 1 minute and is marked as a failed strategy. I’ve checked that all the variables are correctly set (in fact, I use both methods of creating the system: by writing the code and by selecting each indicator and letting it generate the code), but it still keeps stopping. I use any intraday timeframe (I have real time data) and it always fails.

    For example, I take any of Ivan’s indicators (https://www.prorealcode.com/user/fbolsa/) , create the system, run it, and it always stops and the system fails.

    How can I solve this issue?

    Thanks. Best regards

    #248058

    Hi there,

    If you say that any of Ivan’s Indicators fail on you, then why not put up your code calling one of them and let us try ourselves ?
    That allows us to help you …

    Best regards !

    2 users thanked author for this post.
    #248069
    RTR

    Hi there,

    If you say that any of Ivan’s Indicators fail on you, then why not put up your code calling one of them and let us try ourselves ?

    That allows us to help you …

    Best regards !

    Hi there,

    For example this one (but it happens with several systems with many custom indicators)

     

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    DEFPARAM Preloadbars = 2000
    // Conditions to enter long positions

    indicator1= CALL “PRC_SP Indicator”[60](close)
    c1 = (close >= indicator1)

    indicator2, ignored, ignored, ignored = CALL “PRC_Rolling POC Volume profile”[40, 15, 30, 25, 1, 1, 1](close)
    c2 = (close >= indicator2)

    indicator3, ignored, ignored, ignored = CALL “PRC_Purple cloud”[10, 3, 14, 0.7, 1.4, 1.4, 1, 0, 0, 1](close)
    c3 = (close >= indicator3)

    IF c1 AND c2 AND c3 THEN
    BUY 1 SHARES AT MARKET
    ENDIF

    // Conditions to exit long positions

    indicator12 = CALL “PRC_SP Indicator”[60](close)
    c8 = (close <= indicator12)

    indicator13, ignored, ignored, ignored = CALL “PRC_Rolling POC Volume profile”[40, 15, 30, 25, 1, 1, 1](close)
    c9 = (close <= indicator13)

    indicator14, ignored, ignored, ignored = CALL “PRC_Purple cloud”[10, 3, 14, 0.7, 1.4, 1.4, 1, 0, 0, 1](close)
    c10 = (close <= indicator14)

    IF c8 OR c9 OR c10 THEN
    SELL AT MARKET
    ENDIF

     

    It does not give any error when building it then I go to execute it and after 1 minute it stops and the strategy fails. It also happens if I use the “CROSSES OVER” or “CROSSES UNDER” instead of “>” or “<“. It always says: “The trading system could not start because it encountered an internal error. Please send us a report to enable us to analyze the error using the “Send e-mail” button”

    Thank you!

    #248070
    JS

    Hi,
    I don’t think it’s allowed to use the same “Call” multiple times in the code, for example using “CALL “PRC_SP Indicator” twice…
    It’s not really necessary either — try the code below instead…

    3 users thanked author for this post.
    #248071
    JS

    c10 = (Close < indicator3)

    #248072
    RTR

    Hi again JS

    Hi,
    I don’t think it’s allowed to use the same “Call” multiple times in the code, for example using “CALL “PRC_SP Indicator” twice…
    It’s not really necessary either — try the code below instead…

    I believe that it works now. I have done what you said a few minutes ago and the strategy did not fail. So it seems this what the problem. Thank you very much.

    Best Regards.

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

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