Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Highest Bar: Strategy Builder

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

    Highest Bar: Strategy Builder

    Why would the condition "if (HighestBar(Close, 8) > 20)" cause a back test not to run? If the "Numeric Value" I am testing against is greater than the "Period", it will not show results.

    Or am I wrong about what the expression means? It appears to mean that "if a bar which has a high, higher than the previous 9 (0-8) bars before it, is greater than 21 (0-20) bars back from the current bar" However, whenever I test with the "Period" as the lower number, it does not run a back test.

    Any help would be appreciated.
    Last edited by smcllr; 08-18-2021, 12:21 AM.

    #2
    Hello smcllr,

    Thanks for your post.

    With reference to the help guide, "Returns the number of bars ago the highest price value occurred within the specified look-back period." So that means you will get a value that is up to the length of the specified lookback, which in your example would be 0 to 8 which is not greater than 20.

    Reference: https://ninjatrader.com/support/help...highestbar.htm

    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Segwin, 05-07-2018, 02:15 PM
    14 responses
    1,789 views
    0 likes
    Last Post aligator  
    Started by Jimmyk, 01-26-2018, 05:19 AM
    6 responses
    837 views
    0 likes
    Last Post emuns
    by emuns
     
    Started by jxs_xrj, 01-12-2020, 09:49 AM
    6 responses
    3,293 views
    1 like
    Last Post jgualdronc  
    Started by Touch-Ups, Today, 10:36 AM
    0 responses
    13 views
    0 likes
    Last Post Touch-Ups  
    Started by geddyisodin, 04-25-2024, 05:20 AM
    11 responses
    63 views
    0 likes
    Last Post halgo_boulder  
    Working...
    X