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

How to draw indicator from external source

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

    How to draw indicator from external source

    Hello,

    I have an external program that can output a data series / indicator values of the form

    date/time, value of indicator
    date/time, value of indicator
    ....
    ....

    How do I get the indicator plotted on a pane in the form of a OHLC bar chart?

    I am using a constant volume chart, so the time intervals are not uniform. The intervals between the timestamps may not be uniform also.

    #2
    Hello wintermelon,

    There is no supported way for the API to access a NinjaTrader indicators to draw then on a chart.

    Let me know if I can be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      Hello,

      Without using any API, I was thinking, is it possible to do it like so?

      1) Have the external program output to a file in real-time
      2) Have the ninjascript indicator read from the file
      3) For each bar,
      3a) determine the start and end times of the bar (or start to current time if the bar is the current bar)
      3b) use the timestamps in the file to search for the indicator values in the file that are within the time of the bar
      3c) plot those indicator values

      I don't have enough experience in ninjascript development to know if the above will work.

      If you can let me know if the above sounds feasible, or if there is some close enough sample, I can start working based on that.

      Comment


        #4
        Originally posted by wintermelon View Post
        Hello,

        I have an external program that can output a data series / indicator values of the form

        date/time, value of indicator
        date/time, value of indicator
        ....
        ....

        How do I get the indicator plotted on a pane in the form of a OHLC bar chart?

        I am using a constant volume chart, so the time intervals are not uniform. The intervals between the timestamps may not be uniform also.
        You will have to override the Plot() with a custom plot that uses DrawLine() to draw the bars using the OHLC data that you are creating.

        Comment


          #5
          Hi Koganam,

          I see. I was hoping that it would be a simple matter of sending the values to Plot() and selecting a style (e.g. OHLC, candlesticks), but sounds like it wouldn't be that straightfoward.

          Do you know of any indicators with source that does something similar that I can reference off a base?

          Thanks.

          Comment


            #6
            Originally posted by wintermelon View Post
            Hi Koganam,

            I see. I was hoping that it would be a simple matter of sending the values to Plot() and selecting a style (e.g. OHLC, candlesticks), but sounds like it wouldn't be that straightfoward.
            I made an enhancement request for that some time back. I have no idea if or when it might be implemented.

            ref: http://www.ninjatrader.com/support/f...tick+plot+ohlc

            Come to think of it, I was never given a tracking number for the suggestion; just a "thank you" post, so they may have just ignored it. Who knows?

            Do you know of any indicators with source that does something similar that I can reference off a base?

            Thanks.
            There is an indicator, http://www.ninjatrader.com/support/f...catid=4&id=512, which shows how to plot indicator data as candlesticks. I do not see one that does OHLC, but the idea should be easy to extend to plotting such.

            Comment


              #7
              Thanks Koganam, I'll go through it and see if I can hack something out =)

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by dustydbayer, Today, 01:59 AM
              0 responses
              1 view
              0 likes
              Last Post dustydbayer  
              Started by inanazsocial, Today, 01:15 AM
              0 responses
              3 views
              0 likes
              Last Post inanazsocial  
              Started by trilliantrader, 04-18-2024, 08:16 AM
              5 responses
              22 views
              0 likes
              Last Post trilliantrader  
              Started by Davidtowleii, Today, 12:15 AM
              0 responses
              3 views
              0 likes
              Last Post Davidtowleii  
              Started by guillembm, Yesterday, 11:25 AM
              2 responses
              10 views
              0 likes
              Last Post guillembm  
              Working...
              X