Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Settlement Price Indicator

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

    Settlement Price Indicator

    I have downloaded and installed an indicator to plot the settlement price (for the ES). Unfortunately, it only plots the closing price. Also a self programmed indicator drew me only the closing price when I access the closing price (Closes[1][0]) of the daily chart added via AddDataSeries. But when I open a chart window with the daily candlestick chart, the closing price of each candle corresponds to the settlement price.

    How can I access the settlement price or what data field does the chart access for the closing price for daily candles?

    I use the CQG data feed.



    #2
    Hello HGXTrader,

    Thanks for your post.

    You could add a 1 Day series to your script with AddDataSeries() which will have the settlement close.

    If you use Calculate.OnBarClose, you would need to reference Closes[1][0]. If you use Calculate.OnPriceChange or Calculate.OnEachTick and (the state is real-time or tickreplay is enabled), you could reference Closes[1][1].

    See the attached screenshot.

    And, see the help guide documentation below.
    AddDataSeries(): https://ninjatrader.com/support/help...dataseries.htm
    Closes: https://ninjatrader.com/support/help...nt8/closes.htm

    Please let me know if I may assist further.​
    Attached Files
    Last edited by NinjaTrader_BrandonH; 10-11-2022, 08:50 AM.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Hi Brandon,

      thank you very much for your information! I found that if I enable Tick Replay under Data Series then I get the closing price, if Tick Replay is disabled then my indicator gives me the settlement price. I use Calculate.OnBarClose and run the Code under OnBarUpdate.

      Since I want to display the settlement price in a chart with volume- anddelta profile, I need Tick Replay for these indicators - but apparently then the settlement price indicator does not work.... Is there a solution for this?

      Thank you and best regards,
      Chris​

      Click image for larger version  Name:	NT-SP003.png Views:	0 Size:	96.7 KB ID:	1219085Click image for larger version  Name:	NT-SP001.png Views:	0 Size:	195.2 KB ID:	1219086
      Click image for larger version  Name:	NT-SP002.png Views:	0 Size:	191.5 KB ID:	1219087
      Last edited by HGXTrader; 10-12-2022, 07:32 AM.

      Comment


        #4
        Hello HGXTrader,

        Thanks for your note.

        I see in the screenshots you shared that you are referencing Closes[1][0] and using Calculate.OnBarClose. This would only return the settlement price when Tick Replay is disabled.

        When using Tick Replay, you would need to use Calculate.OnPriceChange or Calculate.OnEachTick reference Closes[1][1] as stated in post # 2.

        "If you use Calculate.OnPriceChange or Calculate.OnEachTick and (the state is real-time or tick replay is enabled), you could reference Closes[1][1]."

        Please let me know if I may assist further.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          Click image for larger version

Name:	NT-SP012.png
Views:	557
Size:	91.9 KB
ID:	1219170Click image for larger version

Name:	NT-SP011.png
Views:	571
Size:	194.2 KB
ID:	1219169 Hi Brandon,

          thanks again for your help. Unfortunately, that only provides me the closing but not the settlement price. Any ideas, how I can fix that?

          Thank you very much,
          Chris

          Comment


            #6
            Hello HGXTrader,

            Thanks for your note.

            If you are using Tick Replay and Calculate.OnPriceChange, Closes[1][1] would get the settlement price.

            Note that when comparing the indicator prints to a Daily chart, you need to have Tick Replay enabled on both the Minute chart and the Daily chart.

            I have attached an example script that you could test on your end.

            To test this, open a 1-Minute chart and a Daily chart with Tick Replay enabled on both charts. Enable the indicator on the 1-Minute chart. Open a Data Box window, hover your mouse over the previously closed candle, and compare the NinjaScript Output window prints to the Data Box.

            See the attached screenshot demonstrating this.

            ​Let me know if I may assist further.
            Attached Files
            <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

            Comment


              #7
              settlement and close: are not the same!

              according to
              https://www.cmegroup.com/markets/equ...ttlements.html
              and
              https://www.cmegroup.com/education/c...ettlement.html

              "is calculated using a volume weighted average price (VWAP) based on the last 30 seconds of the trading day (...) between 15:14:30 to 15:15:00 Central Time."
              Last edited by danalec; 10-18-2022, 02:06 PM.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              649 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              370 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              109 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              574 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              576 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X