Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to create a New Data Series based on the Close data series?

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

    How to create a New Data Series based on the Close data series?

    Hello,

    I am new to NinjaTrader and I am trying to understand how to create a New Data Series called Close-HOD that is based on the values of the Close Data Series.

    1. I would like like to test the Close-Price for each Day candle:

    IF the candle Close-Price establishes a new high,

    THEN I would like to assign the Close-Price to the New Close-HOD data series,

    ELSE I would like to assign the previous close candle to the Close-HOD data series.

    2. I would like to start this on the Market Open.

    #2
    Hello nedstrader,

    Thanks for your post and welcome to the Ninjatrader forums.

    Here is a link to the help guide section for creating a dataseries: https://ninjatrader.com/support/help...8/?seriest.htm The help guide provides examples of declaring a custom series of the <double> type that you will need for a price based series. It then shows initializing it in State.DataLoaded and then using the series in the OnBarUpdate(0 method. The custom data series will be aligned with the charts data series.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    168 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    324 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    250 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    350 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    180 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X