Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Newbie...can this be done in Strategy Builder...wait two bars after XO for entry

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

    Newbie...can this be done in Strategy Builder...wait two bars after XO for entry

    I've tested basic 2 signal SMA crossover successfully in Strategy Builder. Now I'd like to add a time delay to the entry based on a public variable. That is, when FASTMA crosses SLOWMA, enter on the Open TIMEDELAY days later. TIMEDELAY is an user variable.

    Referencing this previous post, https://ninjatrader.com/support/foru...wait+crossover

    Can this be programmed in Strategy Builder (NT8)? I've tested various variables for counting or waiting without luck. Just curious if this is possible in Strategy builder.

    Thanks,
    Kevin

    #2
    Kevinkr,

    Thank you for your note.

    This does not appear possible in the builder due to not being able to save the CurrentBar to a variable and have a value (bar delay int) added to it, to then compare to future CurrentBar value. I will submit a feature request for this.

    I have attached a strategy I modified in the editor which will do this for your reference. This takes a bar delay user input, will draw a arrow on the cross and execute x bars later.

    Another option with the builder may be to hard code the LookBackPeriod with the delay you’d like, for example, did the MA’s cross 5 bars ago, if so, enter long. I circled this in the screen shot of the builder.

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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    81 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    66 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    55 views
    0 likes
    Last Post CarlTrading  
    Working...
    X