Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot ema ahead of candle

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

    Plot ema ahead of candle

    Hello i am wanting to plot my ema ahead of the closing candle.

    example.
    if this makes sense a candle spikes to the high the following candle closes low.
    Where the ema spiked on the chart is inbetween the two candles not on the candles.

    how can i achieve this?

    #2
    Hello Christopher Leggit,

    Thanks for your post.

    A plot would only be able to be plotted up to the currently forming bar.

    If you set the indicator's Calculate mode to Calculate.OnBarClose the indicator plot will be displayed up to the most recently closed candle since the OnBarUpdate() logic would be processing only at the close of a bar.

    If you set the indicator's Calculate mode to Calculate.OnPriceChange or Calculate.OnEachTick the indicator plot will be displayed on the currently forming bar since the OnBarUpdate() logic would be processing intrabar.

    The Calculate property could be set in the Indicators window when adding the indicator to a chart or in the indicator's code in State.SetDefaults.

    See this help guide page for more information about Calculate: https://ninjatrader.com/support/help.../calculate.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


      #3
      I saw this indicator in a live trading room. The ema was moving with the candle as it was happening so it was calculating on each tick. But it was plotting the ema just infront of the candle it was quite obvious because you could see the ema spike inbetween the candles as the next candle opened

      Comment


        #4
        Set a displacement value in your Visual section of Parameters.
        eDanny
        NinjaTrader Ecosystem Vendor - Integrity Traders

        Comment


          #5
          Hello Christopher Leggit,

          Thanks for your notes.

          eDanny is correct, you could add displacement to the indicator in the 'Visual' section of the Indicators Properties.

          Adding displacement to the indicator would cause the indicator to plot past the currently forming bar.

          See the 'How to edit and Indicator's parameters' section of this help guide page for more information: https://ninjatrader.com/support/help...indicators.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


            #6
            Thankyou eDanny that was all it was

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            637 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            366 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            107 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            569 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            571 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X