Renko Automated trading

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #240345 quote
    neddyboy
    Participant
    New

    Hi everyone,

    Wondered if anyone could help me fix an error in the following code?  There seems to be an array index issue.

    Many thanks

    Jim

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    
    // Prevents the system from placing new orders on specified days of the week
    daysForbiddenEntry = OpenDayOfWeek = 6
    
    // Conditions to enter long positions
    ignored, ignored, ignored, indicator1 = CALL "[Hq_Renko]_v3"[5, 100, 150, 3, 1, 1, 1, 1, 1, 5, 0, 1, 1, 0, 0, 1, 1000, 0, 14, 1, 1, 7, 19, 0, 0.5, 1](close)
    c1 = (indicator1 = 1)
    
    IF c1 AND not daysForbiddenEntry THEN
    BUY 2 PERPOINT AT MARKET
    ENDIF
    
    // Conditions to enter short positions
    ignored, ignored, ignored, indicator2 = CALL "[Hq_Renko]_v3"[5, 100, 150, 3, 1, 1, 1, 1, 1, 5, 0, 1, 1, 0, 0, 1, 1000, 0, 14, 1, 1, 7, 19, 0, 0.5, 1](close)
    c2 = (indicator2 = -1)
    
    IF c2 AND not daysForbiddenEntry THEN
    SELLSHORT 2 PERPOINT AT MARKET
    ENDIF
    
    #240357 quote
    robertogozzi
    Moderator
    Master

    It can’t be an error related to arrays, as you are not using them.

    It must be somthing else. Can you post a screenshot of the reported error?

    #240358 quote
    robertogozzi
    Moderator
    Master

    Well… there might be an error in the indicator Hq_Renko, related to arrays, but we need the fully functional code to check it.

    #240367 quote
    Iván González
    Moderator
    Master

    Hi! Maybe I can help you if you share the [Hq_Renko]_v3 code

    #240369 quote
    neddyboy
    Participant
    New

    Thanks for the reply.  The following error is reported: The trading system was stopped because an indicator called in the code tries to :
    – define or access an invalid index in an array : Valid indexes are any strictly positive integer less than 1000000 : [1, 2 ,3, …, 1000000]
    – or access an index that has not been previously set in the array : You can check if an index has previously been set using the “IsSet” function : “IsSet($MyArray[MyIndex])”

    Strangely, it all works in pro backtest.

    Regards

    Jim

    #240370 quote
    neddyboy
    Participant
    New

    Unfortunately, I can’t post the code as it is locked as purchased on market.  I’ve attached a screenshot of the settings for what its worth…

    Screenshot-2024-11-14-at-11.50.25.png Screenshot-2024-11-14-at-11.50.25.png
    #240374 quote
    robertogozzi
    Moderator
    Master

    I can only suggest that you try changing some settings, one at atime, setting different values.

    The best solution is to ask the vendor, he should provide assistance for such cases.

    neddyboy and Iván González thanked this post
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

Renko Automated trading


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
neddyboy @neddyboy Participant
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by robertogozzi
1 year, 3 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/14/2024
Status: Active
Attachments: 1 files
Logo Logo
Loading...