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

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 rocketman7, Today, 01:00 AM
    0 responses
    1 view
    0 likes
    Last Post rocketman7  
    Started by wzgy0920, 04-20-2024, 06:09 PM
    2 responses
    27 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 02-22-2024, 01:11 AM
    5 responses
    32 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 04-23-2024, 09:53 PM
    2 responses
    74 views
    0 likes
    Last Post wzgy0920  
    Started by Kensonprib, 04-28-2021, 10:11 AM
    5 responses
    193 views
    0 likes
    Last Post Hasadafa  
    Working...
    X