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 alifarahani, Today, 09:40 AM
    6 responses
    31 views
    0 likes
    Last Post alifarahani  
    Started by Waxavi, Today, 02:10 AM
    1 response
    17 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by Kaledus, Today, 01:29 PM
    5 responses
    14 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by Waxavi, Today, 02:00 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by gentlebenthebear, Today, 01:30 AM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X