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

Condition that compares a range

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

    Condition that compares a range

    I'm trying to set up a range comparison. Something to this effect:

    If High[0] is within (+/-) 10 ticks of the Bollinger Band Middle.. do something, else do nothing.

    I also want to do something like this:

    If the distance between the upper band and lower band is 20 ticks or less, do something, else do nothing (checking for consolidated market here).

    How can I set these types of comparisons up in Strategy Builder?

    Thanks.

    #2
    Hello chaddweston,

    In the builder on the conditions and actions page, you would create a new condition>Indicator>Bollinger and set the Value Plot to Middle, then under properties you’ll add an offset of 10 ticks. You could then set the operator to < and on the right side of the condition select High in the price folder. Then add another condition, set up like the one above, except subtract 10 ticks. When this condition is true, the do the following will be ran, if its not true, nothing will be done.

    To check if the upper and lower band distance is less than 20 ticks, you could select Bollinger Band upper plot as explained above, subtract 10 tick offset, then set an operator of <, and on the right side of the condition builder select Bollinger and lower plot.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by f.saeidi, Today, 12:14 PM
    7 responses
    16 views
    0 likes
    Last Post f.saeidi  
    Started by Russ Moreland, Today, 12:54 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by philmg, Today, 12:55 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChristopherJ  
    Started by TradeForge, 04-19-2024, 02:09 AM
    2 responses
    32 views
    0 likes
    Last Post TradeForge  
    Started by aprilfool, 12-03-2022, 03:01 PM
    3 responses
    329 views
    0 likes
    Last Post NinjaTrader_Adrian  
    Working...
    X