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

Access indicator data

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

    Access indicator data

    Hi,

    I have an indicator that I use in several charts (different timeframes) to show price ranges.
    The indicator shows price ranges in the respective timeframe.

    Example:

    HG M3 Chart
    HG M5 Chart
    HG M15 Chart


    In another chart (e.g. HG M1 Chart) I would now like to get a summary on the chart.

    If I use the OnRender() method in M3, M5, M15 Chart, can't I define the graphic elements as global? That these are then also displayed in the M1 chart.

    How can I best present a graphical summary in the M1 chart. From the values created in the M3, M5 and M15 charts?
    Last edited by 1001111; 05-10-2020, 12:15 PM.

    #2
    So I have a solution first. I suspect the ninja has one more mistake.

    The Error
    If you mark a line as global and always update it after every bar, the line is not always updated.
    If the line is not marked as global, it will work. So Ninja probably gets mixed up with several windows.

    Comment


      #3
      Hi 1001111, thanks for your question.

      Drawing tools can be global, so they will show up at the same price level and time frame on all other charts of the same instrument.

      Custom rendering gives you max flexibility when rendering to the chart, but all of the additional series must be added to the script because a script added to the 1M chart can not see the data on the 3, 5, and 15-minute charts. Add the needed series with AddDataSeries and use OnRender to work with the given data.

      Please let me know if I can assist any further.
      Chris L.NinjaTrader Customer Service

      Comment


        #4
        Hello.
        If you mark the line as global, it unfortunately has a bug.
        So I wanted to try using the onrender method. And a static variable.

        The Bug:
        If you edit the global line and extend an endpoint, this adjustment is not always carried out.

        Comment


          #5
          Hello 1001111,

          Global drawing objects are generated as separate objects on other charts. It is expected that changes to a global drawing object on one chart will not propagate to other charts.
          Interest in support for this is being tracked with ID# SFT-4438.
          I will submit your vote to this request.

          I have several charts of the same instrument. In all graphs there is a global horizontal line. I want to use the script to change the color of the line, but it only changes on the current chart and does not change on others, although the line is global and should be shown on all charts. my code: if(co is ChartHorizontalLine)
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by joselube001, 05-10-2024, 12:17 PM
          3 responses
          18 views
          0 likes
          Last Post joselube001  
          Started by DawnTreader, 05-08-2024, 05:58 PM
          21 responses
          80 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by lorem, 04-25-2024, 09:18 AM
          17 responses
          67 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by doihaveto13, Today, 12:46 PM
          2 responses
          4 views
          0 likes
          Last Post doihaveto13  
          Started by Vitamite, Today, 12:48 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X