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

Creating Specific Bar Conditions and Storing for Later Recall

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

    Creating Specific Bar Conditions and Storing for Later Recall

    So I would like to store a specific bar condition, for example, range1<range2 where range is High[x] - Low[x], if this specific bool that range1 (i.e. High[0]-Low[0]) is less than range2 (i.e. High[1]-Low[1]) for later use. How can I do this?

    To clarify, if that bool is true, and then on then within 3 bars, I get another bool to be true (for example, volume1<volume2), I want a Dot to be plotted or something like that.

    Basically, how do I store that first bool so that I can set bools based on it? i.e. we'll call range1<range2 = lowrange.

    So if lowrange = true WITHIN 3 BARS, and now vol1<vol2, DO something.

    Sorry if there is confusion, I can try to be more clear, but its a bit hard to word and hopefully what i'm looking for makes some sense. In essence, storing a bool as true for a certain amount of time longer than just the bar it is true on.

    #2
    jmflukeiii, I'm not sure I follow your request - if you set a variable (for example a bool) it would only be set / reset if your specifically tell it to do so via your code, it would not have an expiration of values for example as you know from NT's default order entry handling for non market orders.
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by helpwanted, Today, 03:06 AM
    0 responses
    3 views
    0 likes
    Last Post helpwanted  
    Started by Brevo, Today, 01:45 AM
    0 responses
    7 views
    0 likes
    Last Post Brevo
    by Brevo
     
    Started by aussugardefender, Today, 01:07 AM
    0 responses
    5 views
    0 likes
    Last Post aussugardefender  
    Started by pvincent, 06-23-2022, 12:53 PM
    14 responses
    242 views
    0 likes
    Last Post Nyman
    by Nyman
     
    Started by TraderG23, 12-08-2023, 07:56 AM
    9 responses
    384 views
    1 like
    Last Post Gavini
    by Gavini
     
    Working...
    X