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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    55 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    132 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    73 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X