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 cmtjoancolmenero, Yesterday, 03:58 PM
    4 responses
    24 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Brevo, Today, 01:45 AM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by rjbtrade1, 11-30-2023, 04:38 PM
    2 responses
    74 views
    0 likes
    Last Post DavidHP
    by DavidHP
     
    Started by suroot, 04-10-2017, 02:18 AM
    5 responses
    3,022 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by Stanfillirenfro, Today, 07:23 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X