Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

help with indicator logic requested

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    help with indicator logic requested

    First, I am an admitted hack. But I have created an indicator for UniRenko charts to count the number of ticks that price continues after a breakout of the Donchian channel (with Donchian period being a user parameter), for better evaluating historic trade target performance. The code calculates the number of bars after the breakout, then uses another user parameter, Tick Trend (which should be set manually to the UniRenko data series setting), to calculate ticks (# bars x tick trend). After those values are determined, there are If and Else if statements that look at whether to print the number of ticks, and if so, how to number them, based on two boolean user parameter settings (ShowOddNumbers and ShowEveryNthNumber).

    When price breaks to the upside, and the ShowEveryNthNumber is set to True, the bar number​ing is correct. However, when price breaks to the downside, even though ShowEveryNthNumber is set to True and ShowOddNumbers is set to False, the bars are numbered according to the ShowOddNumbers Else If logic. This has been confirmed with Print output.

    I am at a loss to understand why that section of code is being invoked, and why only for downside breakouts. ScriptingSupport has told me I need to run debug, but that is beyond my skillset.

    Any help would be much appreciated. I've attached the code. At this point it's more of a puzzle and learning exercise than a necessity.

    Vicki

    Attached Files

    #2
    Hello vickisb,

    I am just replying here as you created a new post which creates a new case for our support. The script attached is a script that you have emailed in about however as mentioned in the email you will need to simplify the script and use prints to debug it if some part of the conditions are not working as expected. If any users have any capacity to assist with directly debugging the code I am sure they will post here. If debugging the code is outside of your comfort zone you can also look into using third party developer services to either have something created for you or to have what you made debugged for you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    670 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    379 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    111 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    575 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    582 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X