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

Calculating... IB with User apps Share Script

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

    Calculating... IB with User apps Share Script

    This User Apps share one keeps calculating with IB, only the indicator does not plot, the data feed works all right.

    After investigation, I found it only stops plotting when more than one AddDataSeries() are present in the code.

    In other words, it plots with this:

    Code:
                    else if (State == State.Configure)
                    {
                        //[0][0] = current data series
                        AddDataSeries(Data.BarsPeriodType.Minute, 60); //[1][0]
                    }​        
    
                   protected override void OnBarUpdate()
                  {
                  if (CurrentBars[0] < 1 || CurrentBars[1] < 1)
                    return;​
    but this does not plot:

    Code:
                    else if (State == State.Configure)
                    {
                        //[0][0] = current data series
                        AddDataSeries(Data.BarsPeriodType.Minute, 30); //[1][0]
                        AddDataSeries(Data.BarsPeriodType.Minute, 60); //[2][0]​
                    }​        
    
                   protected override void OnBarUpdate()
                  {
                  if (CurrentBars[0] < 1 || CurrentBars[1] < 1 || CurrentBars[2] < 1)
                    return;​


    Can a Ninjascript rep test the script with IB and share the solution?
    In all there are 8 AddDataSeries() that should be working in this script.

    #2
    Hello PaulMohn,

    Thank you for your post.

    So I may accurately assist you, please answer all of the following questions:
    • What version of NinjaTrader are you using? Please provide the entire version number. This can be found under Help -> About (Example: 8.?.?.?)
    • What instrument symbol (and expiry if applicable) have you selected? For example, ES 03-22, AAPL, EURUSD, etc.
    • What interval is selected for your chart? For example, 5 minute, 1 day, 2000 volume, 4 Renko, etc.
    • How many days have you selected to load in the Data Series window?
    • When the indicator is not plotting as expected, are there any error messages on the Log tab of the Control Center? If so, what do the errors report?
    I look forward to your reply.
    Emily C.NinjaTrader Customer Service

    Comment


      #3
      Hello Emily,

      8.0.28.0 64-bit

      NQ 12-23, CL 01-24, GC 02-24

      tested on 1 min, 15 min

      3 days. Tested also on 15 days to load.

      No Log Tab error.

      In the OP's video it shows as working on a 8.0. version.

      Comment


        #4
        Hello PaulMohn,

        Thank you for that information.

        I would also like to double check - are you using TWS or IB Gateway, and which version of the program are you using for your IB connection? Are you editing the script to only add one data series vs. call AddDataSeries() multiple times? To clarify - when multiple data series are attempted to be added, the chart just shows "Calculating" and the indicator does not load? If that is the case, what are the results if you leave the chart to load for several minutes?

        Please provide a screenshot of the chart's data series settings as well as the settings you have set up for the indicator when it is applied to the chart.
        • To send a screenshot with Windows 10 or newer I would recommend using the Windows Snipping Tool.
        • Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save it as a jpeg file and send the file as an attachment.
        ​I look forward to your reply.
        Emily C.NinjaTrader Customer Service

        Comment


          #5
          TWS 10.23 15 Jun 2023

          When I load the script without doing any editing to it it stays stuck indefinitely (I shut the chart after 30 minutes).

          When I comment out all but any single one those lines (206-13) the script plots.

          AddDataSeries(Data.BarsPeriodType.Minute, 1); //[1][0]barsAtLine1
          AddDataSeries(Data.BarsPeriodType.Minute, 5); //[2][0]
          AddDataSeries(Data.BarsPeriodType.Minute, 15); //[3][0]
          AddDataSeries(Data.BarsPeriodType.Minute, 30); //[4][0]
          AddDataSeries(Data.BarsPeriodType.Minute, 60); //[5][0]
          AddDataSeries(Data.BarsPeriodType.Minute, 240); //[6][0]
          AddDataSeries(Data.BarsPeriodType.Day, 1); //[7][0]
          AddDataSeries(Data.BarsPeriodType.Week, 1); //[8][0]​

          Click image for larger version

Name:	imagy-image (2).jpg
Views:	120
Size:	397.6 KB
ID:	1281500


          Click image for larger version

Name:	imagy-image (1).jpg
Views:	101
Size:	496.1 KB
ID:	1281501


          Click image for larger version

Name:	imagy-image.jpg
Views:	99
Size:	508.9 KB
ID:	1281502



          With only uncommented AddDataSeries(Data.BarsPeriodType.Minute, 60); //[5][0]

          // AddDataSeries(Data.BarsPeriodType.Minute, 1); //[1][0]barsAtLine1
          // AddDataSeries(Data.BarsPeriodType.Minute, 5); //[2][0]
          // AddDataSeries(Data.BarsPeriodType.Minute, 15); //[3][0]
          // AddDataSeries(Data.BarsPeriodType.Minute, 30); //[4][0]
          AddDataSeries(Data.BarsPeriodType.Minute, 60); //[5][0]
          // AddDataSeries(Data.BarsPeriodType.Minute, 240); //[6][0]
          // AddDataSeries(Data.BarsPeriodType.Day, 1); //[7][0]
          // AddDataSeries(Data.BarsPeriodType.Week, 1); //[8][0]​​

          Click image for larger version

Name:	imagy-image (3).jpg
Views:	100
Size:	492.3 KB
ID:	1281503

          Comment


            #6
            Hello Paul,

            Thank you for your reply.

            "TWS 10.23 15 Jun 2023"
            The current supported version of TWS for use with NinjaTrader Desktop is 10.23.2a and it may be downloaded via the link in the connection guide here:


            Please test this with TWS 10.23.2a and report back with the results.

            I look forward to your reply.
            Emily C.NinjaTrader Customer Service

            Comment


              #7
              Hello Emily,

              It was that 2a version already after trying to reinstall.

              Click image for larger version

Name:	imagy-image (4).jpg
Views:	96
Size:	35.9 KB
ID:	1281734

              Comment


                #8
                Hello Paul,

                Thank you for your patience.

                As a test, I have created a simple script that makes the same calls to AddDataSeries() and prints to the NinjaScript Output window. Please download the attached AddDataSeriesTest script and import it via Control Center > Tools > Import > NinjaScript AddOn. Open a NinjaScript Output window then apply this indicator to a chart to test it out. Check if it completes calculating and review the output sent to the NinjaScript Output window.

                I look forward to hearing the results.
                Attached Files
                Emily C.NinjaTrader Customer Service

                Comment


                  #9
                  Thank you for the test file.

                  It too keeps calculating. With no prints in the output, nor any Log Tab error.

                  Click image for larger version  Name:	imagy-image (5).jpg Views:	0 Size:	140.9 KB ID:	1281747

                  Sill calculating 20 mins in.

                  Click image for larger version

Name:	imagy-image (6).jpg
Views:	77
Size:	139.5 KB
ID:	1281755
                  Last edited by PaulMohn; 12-11-2023, 12:39 PM.

                  Comment


                    #10
                    Hello Paul,

                    Thank you for your patience.

                    I would like to review your diagnostic files via email. You can send these files by going to the Control Center-> Help-> Email Support. Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default. Please include "ATTN Emily C" in the subject line and a link to this forum thread in the body of the email before clicking Send.

                    I look forward to further investigating this item.​
                    Emily C.NinjaTrader Customer Service

                    Comment


                      #11
                      To answer the following:

                      I do see that, based on your time zone, you appear to be located outside of the United States. I am aware of some issues that were affecting Interactive Brokers users outside of the US when trying to load daily data, and this may be part of what is affecting you as well since you are using version 8.0.28.0.

                      This item should be resolved in the latest version of NinjaTrader 8.1. To update to the latest version of NinjaTrader Desktop please follow the steps below.

                      ...

                      Please test the AddDataSeriesTest script on version 8.1.2.1 with TWS 10.23.2a and if the prints are sent to the NinjaScript Output window successfully, test out the script you imported from the User App Share as well.



                      It too keeps calculating with 8.1.1.7 version. With no prints in the output, nor any Log Tab error.

                      Click image for larger version

Name:	imagy-image (4).jpg
Views:	94
Size:	275.1 KB
ID:	1281802

                      What is the Ninjascript rep test result with the script with IB TWS 10.23.2a​ and 8.0.28.0 version?
                      What solution did they find?
                      It should be them doing the testing going forward and reporting the solution.

                      Comment


                        #12
                        Hello PaulMohn,

                        Thank you for your reply.

                        "Please test the AddDataSeriesTest script on version 8.1.2.1 with TWS 10.23.2a and if the prints are sent to the NinjaScript Output window successfully, test out the script you imported from the User App Share as well.​"

                        I requested that you please test this on NinjaTrader Desktop version 8.1.2.1 specifically. This behavior could still potentially occur on 8.1.1.7. Per the release notes for 8.1.2, a fix for isse # 3437 was implemented and "Resolved a scenario that prevented some non-US users to not be able to load data"


                        Since we are located in the U.S. we have not been able to reproduce this behavior on version 8.0.28.0 in our testing. From our experience with this item and the users who reported it, this only affects non-U.S.-based users and the update to version 8.1.2.1 specifically is required.

                        Thank you for your time and patience.
                        Emily C.NinjaTrader Customer Service

                        Comment


                          #13
                          8.1.2.1 keeps the chart from loading.

                          Click image for larger version

Name:	imagy-image (6).jpg
Views:	83
Size:	92.5 KB
ID:	1281806
                          Last edited by PaulMohn; 12-11-2023, 05:46 PM.

                          Comment


                            #14
                            8.0.28.0 plots on VMWare fresh install machine.

                            Click image for larger version  Name:	s.png Views:	0 Size:	311.5 KB ID:	1281811

                            Why not on the regular machine?
                            How to avoid having to reinstall everything on a new fresh install for it to work?

                            Comment


                              #15
                              Hello PaulMohn,

                              Thank you for your reply.

                              I would like to schedule a remote support session with you. I will respond to the email thread from our support case to schedule a session with you.

                              Thank you for your time and patience.
                              Emily C.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by jclose, Today, 09:37 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post jclose
                              by jclose
                               
                              Started by WeyldFalcon, 08-07-2020, 06:13 AM
                              10 responses
                              1,414 views
                              0 likes
                              Last Post Traderontheroad  
                              Started by firefoxforum12, Today, 08:53 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post firefoxforum12  
                              Started by stafe, Today, 08:34 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post stafe
                              by stafe
                               
                              Started by sastrades, 01-31-2024, 10:19 PM
                              11 responses
                              169 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Working...
                              X