• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Series use

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

    Multi Series use

    Hi guys,

    My Strategy is loaded on a 5-min chart and I have a second 1-min dataseries I have just added and I can use things like: Times

    I’m wondering how do I do this for the 1-min chart:
    if (IsFirstTickOfBar) {}

    I want to be able to process something on the first tick of the 1-min dataseries and not the 5-min

    #2
    Hello Bluebeep,

    Thanks for your post.

    If you wish to use IsFirstTickOfBar, your strategy would need to run with Calculate.OnEachTick, or Calculate.OnPriceChange, on real time data.

    Then, you can check both BarsInProgress and IsFirstTickOfBar like this:

    if (BarsInProgress == 1 && IsFirstTickOfBar) // first tick of the added 1 minute data series
    {
    // do something
    }


    Please note that this would be applicable to real-time data only, not on historical bars, as on historical bars there is only 1 tick which is the close of the bar so, in that case, IsFirstTickOfBar = Close of bar.

    References:
    https://ninjatrader.com/support/help...inprogress.htm
    https://ninjatrader.com/support/help...ttickofbar.htm
    https://ninjatrader.com/support/help...nstruments.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks NinjaTrader_PaulH!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by vpzdcv, Today, 02:31 AM
      0 responses
      5 views
      0 likes
      Last Post vpzdcv
      by vpzdcv
       
      Started by YevhenShynkarenko, Today, 01:22 AM
      0 responses
      10 views
      0 likes
      Last Post YevhenShynkarenko  
      Started by ttodua, Today, 12:52 AM
      0 responses
      6 views
      0 likes
      Last Post ttodua
      by ttodua
       
      Started by ttodua, Today, 12:50 AM
      0 responses
      5 views
      0 likes
      Last Post ttodua
      by ttodua
       
      Started by mulshah, Yesterday, 11:12 PM
      0 responses
      6 views
      0 likes
      Last Post mulshah
      by mulshah
       
      Working...
      X