Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
    Brandon H.NinjaTrader Customer Service

    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
          Brandon H.NinjaTrader Customer Service

          Comment


            #6
            Thankyou eDanny that was all it was

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by lightsun47, Today, 03:51 PM
            0 responses
            4 views
            0 likes
            Last Post lightsun47  
            Started by 00nevest, Today, 02:27 PM
            1 response
            8 views
            0 likes
            Last Post 00nevest  
            Started by futtrader, 04-21-2024, 01:50 AM
            4 responses
            44 views
            0 likes
            Last Post futtrader  
            Started by Option Whisperer, Today, 09:55 AM
            1 response
            13 views
            0 likes
            Last Post bltdavid  
            Started by port119, Today, 02:43 PM
            0 responses
            9 views
            0 likes
            Last Post port119
            by port119
             
            Working...
            X