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 GussJ, 03-04-2020, 03:11 PM
    16 responses
    3,279 views
    0 likes
    Last Post Leafcutter  
    Started by WHICKED, Today, 12:45 PM
    2 responses
    19 views
    0 likes
    Last Post WHICKED
    by WHICKED
     
    Started by Tim-c, Today, 02:10 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Taddypole, Today, 02:47 PM
    0 responses
    5 views
    0 likes
    Last Post Taddypole  
    Started by chbruno, 04-24-2024, 04:10 PM
    4 responses
    51 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Working...
    X