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 sidlercom80, 10-28-2023, 08:49 AM
    168 responses
    2,262 views
    0 likes
    Last Post sidlercom80  
    Started by Barry Milan, Yesterday, 10:35 PM
    3 responses
    10 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by WeyldFalcon, 12-10-2020, 06:48 PM
    14 responses
    1,429 views
    0 likes
    Last Post Handclap0241  
    Started by DJ888, 04-16-2024, 06:09 PM
    2 responses
    9 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by jeronymite, 04-12-2024, 04:26 PM
    3 responses
    41 views
    0 likes
    Last Post jeronymite  
    Working...
    X