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

getting data from custom indicator

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

    getting data from custom indicator

    Dear friends.
    How can I get data from custom indicators? I download a few indicators and install them on my NT7, but how to get data from their bars?

    #2
    daglas, plotted values are exposed automatically so accessible from other scripts programmatically, for all other internal series / variables, please modify the code as needed -

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Also I trying to get data from different futures, in my multiindicator.
      For example from 6B 6-11 (British Pound) , 6S 6-11, 6E 6-11 and etc.
      I try to use Add("6B", PeriodType.Minute, 1);
      or Add("6B 6-11", PeriodType.Minute, 1);
      But I see phrase 6B 6-11 does not exists on instrument manger, But I know that all futures exists there because I have add them here.

      Comment


        #4
        Please try adding those as 6B 06-11 to use the correct expiry.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          Please try adding those as 6B 06-11 to use the correct expiry.
          Thanks a lot it was the reason of my troubles.
          Also I want to get data from different time frames for different futures. So I use such code
          Add("6J 06-11", PeriodType.Minute, 1);
          Add("6J 06-11", PeriodType.Minute, 5);
          Add("6J 06-11", PeriodType.Minute, 15);
          Add("6J 06-11", PeriodType.Minute, 30);
          Add("6J 06-11", PeriodType.Minute, 60);
          And when user change time frame I use such code
          if (BarsPeriod.BasePeriodType==PeriodType.Minute&&Bar sPeriod.Value==5)
          z=Closes[2][0]-Opens[2][0];
          And I have message in log of control center - You accessing an index with a value is invalid since ***.
          What does it mean? This data is unaccessable?

          Comment


            #6
            Great - please ensure you have a CurrentBars check running for all involved bars objects -

            BertrandNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Bertrand View Post
              Great - please ensure you have a CurrentBars check running for all involved bars objects -

              http://www.ninjatrader.com/support/f...ead.php?t=3170
              Ok but I use zero Bar. Everything works good on 1 minute time frame but when I try another ones I have a troubles.

              Comment


                #8
                Originally posted by daglas View Post
                Ok but I use zero Bar. Everything works good on 1 minute time frame but when I try another ones I have a troubles.
                It does not matter, please do include the check for all involved series like below -

                if (CurrentBars[0] < 0 || CurrentBars[1] < 0 .....) return;
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by gravdigaz6, Today, 11:40 PM
                0 responses
                4 views
                0 likes
                Last Post gravdigaz6  
                Started by MarianApalaghiei, Today, 10:49 PM
                3 responses
                9 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by XXtrader, Today, 11:30 PM
                0 responses
                3 views
                0 likes
                Last Post XXtrader  
                Started by love2code2trade, Yesterday, 01:45 PM
                4 responses
                28 views
                0 likes
                Last Post love2code2trade  
                Started by funk10101, Today, 09:43 PM
                0 responses
                9 views
                0 likes
                Last Post funk10101  
                Working...
                X