• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Dashboard

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

    Dashboard

    I would like to build a dashboard like the one attached.

    The code would loop through 10 plus currency pairs. For each pair, collect the information listed below from four different time frames (D1\H4\H1\M15):

    1). Two EMAs
    2). One SMA
    3). MACD
    4). Previous bar close

    Thanks in advance!!
    Attached Files
    Last edited by RiversideDude; 03-17-2017, 12:30 AM.

    #2
    Hello

    Thank you for the post.

    I wanted to check, are you trying to draw this in a chart window or have a new window that displays this information?

    In either case, you would likely need to use an Indicator as you want to use indicator values, indicators cannot be used in an addon specifically. Instead, you could use an indicator to append an item to the chart or cause a new window to open as an example.

    Depending on what you are trying to do, I could suggest reviewing the following pages to see what may work best for your ideas:

    From an indicator, you could use either Drawing objects for a simple display of items on the chart, or for more advanced items which is likely what you would need, there is OnRender.
    http://ninjatrader.com/support/helpG...hlightsub=draw
    http://ninjatrader.com/support/helpG...htsub=onrender

    This example demonstrates a more advanced approach, in case you want actual WPF controls you could create a panel using WPF:
    http://ninjatrader.com/support/helpG...trolcollection

    For new windows or tools that do not rely on a chart, you could review the following page, keep in mind using this approach there is no support for indicators:
    http://ninjatrader.com/support/helpG...t_overview.htm

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks I would like to have a separate window if possible. I was really concerned more about how do I loop through all of the currency pairs in one indicator. Did you provide an example for that or did I miss it?

      Thanks,

      Ed

      Comment


        #4
        Hello

        Thank you for the post.

        If you will be using an Indicator, you would need to add additional series using AddDataSeries.

        You can find more information on using secondary series in the following helpguide articles:

        http://ninjatrader.com/support/helpG...nstruments.htm
        http://ninjatrader.com/support/helpG...dataseries.htm
        http://ninjatrader.com/support/helpG...inprogress.htm

        This would be the type of logic needed to get prices for all of the symbols this item should watch. After adding the series, you could do any number of calculations with the resulting series.

        You can find an example strategy called SampleMultiInstrument that comes with the platform as well.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          I'm building a dashboard with multiple currency pairs and timeframes. I understand that the dataseries have to be added and cannot be dynamic.However, can I set the BarsInProgress value or is that set by NT 8?

          Also, can the indicators be added dynamically?

          For each pair I'm going to need the values of 4 to 5 different indicators. Can I loop through the barsinprogress, which will set the input series? Or do I have to hard code the indicators as well?

          Thanks!!

          Comment


            #6
            Hello,

            Thank you for the reply.

            BarsInProgress is set internally, this is set when OnBarUpdate is called for the series the BarsInProgress belongs to.

            Regarding adding indicators dynamically, only a strategy would be able to create a Visual instance of an indicator. If you will be using an indicator for this tool, you would just need to plot the resulting value of an indicator to make a visual representation or dynamic indicator.

            As far as looping through the BarsInProgress, because this is an int that is set when OnBarUpdate is called, you should not need to loop through anything, mainly you would need to filter your logic to work in the correct BarsInProgress:

            if(BarsInProgress == 1)


            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              See the image in the first post. I will be using an indicator and I won't be plotting anything on a chart/. I will be using the values to determine which direction the arrow should point. Based on this please address the issue of looping through the indicators for each dataeries.

              Thanks!!

              Comment


                #8
                Is there a way to write text and arrows to the chart on a fixed x axis and not have it tied to time?

                Thanks!!

                Comment


                  #9
                  Hello,

                  For the loop, I would not have an example I could provide of looping through indicators specifically, you would need to use a loop and the syntax for a loop in C# to do that. If you are not sure on how to create a loop, I would suggest trying the following MSDN page: https://msdn.microsoft.com/en-us/library/ch45axte.aspx

                  To call an indicator, you can find the included indicators syntax in each of their help guide pages. One example is the SMA:
                  http://ninjatrader.com/support/helpG...ghlightsub=sma

                  The BarsInProgress is changed internally by internal processes, so if you need to know what instrument is currently executing logic, it would be the BarsInProgress property. Please see the following reference on how bars are built in multi series: http://ninjatrader.com/support/helpG...nstruments.htm

                  To understand how to use indicators in a multi series way, please see the examples in the "Using Bars Objects as Input to Indicator Methods" from the above link.

                  Regarding plotting on the chart at fixed x or y coordinates, this would require using OnRender and avoid using the built-in drawing objects. Please see the included SampleCustomRender indicator that comes with the platform. This shows the OnRender override being used. For further information on this topic, please see the help guide here: http://ninjatrader.com/support/helpG...htsub=onrender

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

                  Comment


                    #10
                    Jesse, since this chart will be just a dashboard, what's the best way to not have any bars displayed? Can I just not add a dataseries?

                    Thanks!

                    Comment


                      #11
                      Hello,

                      You have to have at least 1 series on a chart.

                      To avoid using a chart at all, you would need to not use a chart and use an Addon but this would prevent you from using items like Indicators. For your idea, you would need to use a chart so the only solution would be to hide the bars or set them to transparent if you don't want to see them.

                      This can be configured in the data series window or using BarBrushes property: http://ninjatrader.com/support/helpG...sub=barbrushes
                      http://ninjatrader.com/support/helpG...b=outlinebrush


                      I look forward to being of further assistance.
                      JesseNinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by hurleydood, Today, 10:07 AM
                      0 responses
                      0 views
                      0 likes
                      Last Post hurleydood  
                      Started by Irukandji, Today, 09:43 AM
                      1 response
                      7 views
                      0 likes
                      Last Post NinjaTrader_ThomasC  
                      Started by TazoTodua, Today, 09:06 AM
                      0 responses
                      4 views
                      0 likes
                      Last Post TazoTodua  
                      Started by sambo81, Yesterday, 06:57 PM
                      1 response
                      20 views
                      0 likes
                      Last Post NinjaTrader_ThomasC  
                      Started by tgn55, Today, 08:34 AM
                      0 responses
                      4 views
                      0 likes
                      Last Post tgn55
                      by tgn55
                       
                      Working...
                      X