Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SMA when Cumulative Delta zeros at noon

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

    SMA when Cumulative Delta zeros at noon

    Hi,

    The Order Flow Cumulative Delta zeros at noon. I would like to draw SMA on its panel but to start calculating its values from noon no to have false calculations.
    How can I achieve it?
    Attached Files

    #2
    Hello iskier,

    Thanks for your post.

    We have received your inquiry and are currently researching this matter in order to provide you with the best information possible.

    We will reach back out to you and update this forum thread once we are finished researching this topic.

    Thanks for your patience.
    <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
      Hello iskier,

      Thanks for your patience.

      This would require that you come up with your own custom logic to accomplish what you have described.

      By default, the NinjaTrader SMA indicator plot is calculated by summing the closing prices of the security for a period of time and then dividing this total by the number of time periods. This indicator will plot from one session to the next, using historical bars from prior sessions for calculations. This means that the SMA indicator that comes with NinjaTrader could have a difference as seen in the screenshot you shared if the new session's data is less than or greater than the data at the previous session's close.

      The SMA uses its own plot for data points in its average so you would have to figure out exactly what to do and what logic to used when the session opens. You could likely check if the current bar is greater than the index of the session bar or not to delegate the calculation at that time.

      If you only want to cut off the SMA plot visually during those hours between sessions you could just not plot it by not assigning the SMA value to the plot within that timeframe. If you want that to also affect the SMA value, you would have to make a custom SMA indicator.
      Last edited by NinjaTrader_BrandonH; 08-28-2023, 08:26 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


        #4
        Hi, I edited and create my own indicator. The only thing is connecting last value of SMA of previous day to the first value of the new day. Is there a way to disconnect these plots? I don't want to see that line connecting both values only at the beginning of the session. Can I configure it somehow?
        Attached Files

        Comment


          #5
          Hello iskier,

          Thanks for your notes.

          To cut off the SMA plot visually during those hours between sessions you could just not plot it by not assigning the SMA value to the plot within that timeframe.

          For example, you could only assign the SMA value to the plot within a Time Filter condition. That way a plot will not be assigned to the plot outside of that Time Filter condition.

          Such as:

          if (time filter condition)
          {
          Value[0] = SMA(14)[0];
          }

          See the help guide documentation below for more information.

          'How to create time filters': https://ninjatrader.com/support/help...on_builder.htm
          AddPlot(): https://ninjatrader.com/support/help...t8/addplot.htm
          Value: https://ninjatrader.com/support/help.../nt8/value.htm
          SMA(): https://ninjatrader.com/support/help...simple_sma.htm
          <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

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          601 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          347 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          559 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          558 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X