Strategy stopped – Strategy failed.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #248055 quote
    RTR
    Participant
    New

    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 quote
    PeterSt
    Participant
    Master
    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 !
    RTR and robertogozzi thanked this post
    #248069 quote
    RTR
    Participant
    New
    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 quote
    JS
    Participant
    Senior
    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…
    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    DEFPARAM Preloadbars = 10000
    
    indicator1= CALL "PRC_SP Indicator"[60](close)
    indicator2, ignored, ignored, ignored = CALL "PRC_Rolling POC Volume profile"[40, 15, 30, 25, 1, 1, 1](close)
    indicator3, ignored, ignored, ignored = CALL "PRC_Purple cloud"[10, 3, 14, 0.7, 1.4, 1.4, 1, 0, 0, 1](close)
    
    // Conditions to enter long positions
    c1 = (close >= indicator1)
    c2 = (close >= indicator2)
    c3 = (close >= indicator3)
    
    IF c1 AND c2 AND c3 THEN
    BUY 1 SHARES AT MARKET
    ENDIF
    
    // Conditions to exit long positions
    c8 = (close < indicator1)
    c9 = (close < indicator2)
    c10 = (close <= indicator3)
    
    IF c8 OR c9 OR c10 THEN
    SELL AT MARKET
    ENDIF
    RTR, Iván González and robertogozzi thanked this post
    #248071 quote
    JS
    Participant
    Senior
    c10 = (Close < indicator3)
    #248072 quote
    RTR
    Participant
    New
    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.
    JS thanked this post
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Strategy stopped – Strategy failed.


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
RTR @rtr Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by RTR
8 months, 1 week ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/08/2025
Status: Active
Attachments: No files
Logo Logo
Loading...