• 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 want to build a dashboard by looping through a set of currency pairs and getting a set of information:

    1. Open and close.
    2. 10 and 21 EMA
    3. 200 SMA
    4. RSI

    I want get this information for one pair, perform some decison processing, print text to a chart and perform the same steps for the next pair. What is the best way for me to accomplish this in NT8?

    Thanks!!

    #2
    Hello RiversideDude,

    Thanks for writing in.

    So I may assist you further, could you please elaborate on how you want your dashboard to work?

    For example, you can add a lot of this functionality through an indicator, so you may either wish to develop for an indicator or for an Add-On. I would advise to develop an indicator that you can add to your chart that will draw text based on your calculations. Creating an Add-On that modifies a chart is possible, requires a much higher level of involvement.

    You can make the dashboard that displays the output from these indicators and price objects without programming by creating a Market Analyzer with those indicators and the open/close value added to columns of the Market Analyzer.

    Please reference the documentation below before deciding how you want to create your dashboard.

    AddOn Development Overview: https://ninjatrader.com/support/help...t_overview.htm

    Market Analyzer Documentation: https://ninjatrader.com/support/help...t_analyzer.htm

    Market Analyzer Display Overview (Video) : https://www.youtube.com/watch?v=IXnKd7pKYXM

    Please let me know if I may be of further help.
    JimNinjaTrader Customer Service

    Comment


      #3
      My plan is to create an indicator and add it to a chart. It will show arrows based on my logic for 3 to 4 different timeframes per currency pair. I was able to do this in MT4 and FXCM's Trading station. So if you can provide some guidance I'll be able to build it NT8 as well. I'm not sure how I would loop through the currencies yet, I haven't seen examples on that.

      Thanks!!
      Last edited by RiversideDude; 04-04-2017, 03:39 PM.

      Comment


        #4
        Hello RiversideDude,

        Thanks for the reply.

        Looping through added currencies can be done by looping and iterating BarsArray to reference each added data series.

        Code:
        protected override void OnStateChange()
        {
        	if (State == State.SetDefaults)
        	{
        		...
        	}
        	else if (State == State.Configure)
        	{
        		  AddDataSeries("EURUSD", BarsPeriodType.Minute, 5); // BarsArray[1]
        		  AddDataSeries("USDJPY", BarsPeriodType.Minute, 5); // BarsArray[2]
        		  AddDataSeries("USDCAD", BarsPeriodType.Minute, 5); // BarsArray[3]
        		  AddDataSeries("GBPUSD", BarsPeriodType.Minute, 5); // BarsArray[4]
        	}
        }
        
        protected override void OnBarUpdate()
        {
        	for(int i = 1; i <= 4; i++)
        	{
        		BarsArray[i];
        	}
        }
        Please reference the documentation below:

        Multi Time Frame and Instruments - https://ninjatrader.com/support/help...nstruments.htm

        BarsArray - https://ninjatrader.com/support/help.../barsarray.htm

        While I will not be able to provide assistance in developing your strategy or debugging your code, we do have an Ecosystem of NinjaScript Consultants that would be willing to do this for you. If you are looking for those services, you can write in to platformsupport[at]ninjatrader[dot]com with the thread URL and the text "Attention Jim." I will be able to get you connected with a member of our Business Development team who can provide a list of NinjaScript Consultants who would be happy to develop and debug your code.

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

        Comment


          #5
          In this example code, since the OnBarUpdate will be called once for each dataseries, won't this loop execute 16 times??

          Comment


            #6
            Hello RiversideDude,

            Thanks for the reply.

            Since this will be called for each data series, it will actually reference each additional data series' 5 times. In total, there are 20 references between each additional data series.

            You can use an if statement to only reference this for each OnBarUpdate() of the primary data series.

            Code:
            if (BarsInProgress == 0)
            BarsInProgress: https://ninjatrader.com/support/help...inprogress.htm

            Please let me know if you have any questions.
            JimNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by bchip, Today, 09:25 AM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by Tomass, Today, 09:25 AM
            2 responses
            12 views
            0 likes
            Last Post Tomass
            by Tomass
             
            Started by hundert, Today, 08:37 AM
            3 responses
            18 views
            0 likes
            Last Post NinjaTrader_Melissa  
            Started by ronaldgreene828, Today, 08:16 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_PatrickG  
            Started by hir04068, Today, 01:36 AM
            1 response
            18 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Working...
            X