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 lightsun47, Today, 03:51 PM
        0 responses
        5 views
        0 likes
        Last Post lightsun47  
        Started by 00nevest, Today, 02:27 PM
        1 response
        9 views
        0 likes
        Last Post 00nevest  
        Started by futtrader, 04-21-2024, 01:50 AM
        4 responses
        45 views
        0 likes
        Last Post futtrader  
        Started by Option Whisperer, Today, 09:55 AM
        1 response
        14 views
        0 likes
        Last Post bltdavid  
        Started by port119, Today, 02:43 PM
        0 responses
        9 views
        0 likes
        Last Post port119
        by port119
         
        Working...
        X