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 NullPointStrategies, Today, 05:17 AM
    0 responses
    25 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    121 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    64 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    41 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X