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

BarsSinceExit on Secondary Data

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

    BarsSinceExit on Secondary Data

    When using BarsSinceExitExecutiion(0,",0)>0

    which 0 changes to secondary data series in strategy, I have a secondary 1 minute and 2 minute inputs

    please show with example i.e. BarsSinceExitExecutiion(1,",0)>0 <------ assuming the 1 would represent the FIRST additional data series in the strategy

    I AM USING STRATEGY BUILDER
    thanks
    Last edited by DTSSTS; 09-27-2021, 07:33 AM.

    #2
    Hello DTSSTS,

    Thanks for your post.

    The BarsSinceExitExecution() method defines the first parameter (1 in your example) as: "The index of the Bars object the entry order was submitted against."

    Reference: https://ninjatrader.com/support/help...texecution.htm

    The Strategy Builder can only submit orders to the Chart bars (BarsInProgress 0).

    Therefore we cannot provide an example, in the Strategy Builder.

    If you wish to submit an order to a secondary data series and then use BarsSinceExitExecution on that added data series, you would need to unlock the script and work directly in Ninjascript.





    Paul H.NinjaTrader Customer Service

    Comment


      #3
      SO THIS IS NOT CORRECT

      BarsSinceExitExecutiion(1,",0)>0 with the 1 representing the secondary data?

      I AM USING THIS for a rule/condition

      Comment


        #4
        Hello DTSSTS,

        Thanks for your reply.

        Correct, you cannot place an order to an added data series in the Strategy Builder, therefore using BarsSinceExitExecution() using 1 as the barsInprogress in that method will not work in the Strategy Builder.

        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by helpwanted, Today, 03:06 AM
        0 responses
        3 views
        0 likes
        Last Post helpwanted  
        Started by Brevo, Today, 01:45 AM
        0 responses
        6 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        5 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        242 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        384 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X