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

Indicator plot as OHLC bar

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

    Indicator plot as OHLC bar

    i read on forums NT cant do it, but it was suggested many times. May be situation had changed.

    #2
    Hello RReef,

    Thank you for your note.

    There is currently no option to set an indicator to OHLC for the plot.

    OHLC data is provided for instruments by the data feed provider. Indicators calculate on the close data of an instrument historically and when using CalculateOnBarClose = true in NinjaTrader.

    However, if CalculateOnBarClose = false then the real-time data can reflect where a high, low, open and close occurred for the indicator. With that said the historical data is still only the close of the bar so only the close of the indicator. There would be no method to pull each tick that built a bar as historical data is only the OHLC of the bar for the instrument.

    A possible solution would be to add an additional time frame to your indicator (a smaller interval such as 1 Tick) and use this to determine the OHLC of the indicator for each bar. Yet, you would still need to create so custom plotting here to draw such a "bar" for the indicator.

    For information on adding additional time frames to your code please visit the following link: http://www.ninjatrader.com/support/h...nstruments.htm

    You can view a custom plot sample by going to the NinjaTrader Control Center > Tools > Edit NinjaScript > Indicator > CustomPlotSample > OK.

    Please let me know if I may be of further assistance.

    Comment


      #3
      Originally posted by RReef View Post
      i read on forums NT cant do it, but it was suggested many times. May be situation had changed.
      There are a few indicators that plot as OHLC bars. One of them are the default Heikin-Ashi bars. To be clear, they are not coded as a bar type but as indicator

      Of course it is possible to code any type of indicator to plot as OHLC bar. This may require accessing synhronized tick data for spreads.

      Comment


        #4
        Originally posted by RReef View Post
        i read on forums NT cant do it, but it was suggested many times. May be situation had changed.
        You can Plot anything any way that you want. You would just need a custom Plot to do so. Look at the "spread" indicator, in the "File Sharing" section of this forum, to see an example of how to plot the indicator as OHLC.

        I already sometime back, made a request for this option. I do not know if the request is still actively being tracked/considered by NT Development or not.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ender_wiggum, Today, 09:50 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by rajendrasubedi2023, Today, 09:50 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by geotrades1, Today, 10:02 AM
        0 responses
        4 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by bmartz, Today, 09:30 AM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by geddyisodin, Today, 05:20 AM
        3 responses
        26 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X