• 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

Getting an indicator into strategy

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

    Getting an indicator into strategy

    Hello,Support!

    Have no problem to get any indicator into strategy,but there`s one i can`t figure why it`s not showing on the chart.The strategy compiles,all the parts in place,but the indicator shows only partially and not being called via strategy.Could you please suggest the reason what may cause the indicator to show up just partially and not being called?

    Thank you!

    #2
    Does this help?

    http://ninjatrader.com/support/forum...14&postcount=1

    Comment


      #3
      Originally posted by sledge View Post
      No.Just like i said.I have no problem with all that,i can put any indicator into strategy,but the one i have an issue with probably has some intentional bug to prevent it from being displayed or called via strategy.it`s an open source though.

      Comment


        #4
        @sledge,

        maybe you can tell whta it is?
        Attached Files

        Comment


          #5
          It`s rathe advanced study,so needs more then i can bring.

          Comment


            #6
            Originally posted by outsource View Post
            It`s rathe advanced study,so needs more then i can bring.
            What is the error in your log?

            Comment


              #7
              Hello outsource,

              The indicator you have provided loads without issue on my chart.

              Is this the indicator you are attempting to add through your strategy?

              Can you provide the full syntax you are using for the Add() method to call this in your strategy?
              Zachary G.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by koganam View Post
                What is the error in your log?
                Hi,Koganam,

                yes,there`s an error in the log,i didn`t look at it at first,but it tells nothing to me anyway.

                There error is:

                Method:Void OnBarUpdate() Exception: System.IndexOutOfRange

                Comment


                  #9
                  Originally posted by outsource View Post
                  Hi,Koganam,

                  yes,there`s an error in the log,i didn`t look at it at first,but it tells nothing to me anyway.

                  There error is:

                  Method:Void OnBarUpdate() Exception: System.IndexOutOfRange
                  Can anyone assist with that one?

                  Comment


                    #10
                    Originally posted by outsource View Post
                    Can anyone assist with that one?
                    That often means that you do not have enough bars at the time that a statement is processed. Try increasing the BarsRequired property in the Strategy.

                    Is there also an error in your Output Window?

                    Comment


                      #11
                      Originally posted by koganam View Post
                      That often means that you do not have enough bars at the time that a statement is processed. Try increasing the BarsRequired property in the Strategy.

                      Is there also an error in your Output Window?
                      Increased BarsRequired,no errors in the Output Window.But it doesn`t solve the issue.

                      Comment


                        #12
                        Originally posted by outsource View Post
                        Increased BarsRequired,no errors in the Output Window.But it doesn`t solve the issue.
                        Where did you increase it? In the code or in the PropertyGrid? If in the code, did you remove and reload the Strategy?

                        Comment


                          #13
                          Originally posted by koganam View Post
                          Where did you increase it? In the code or in the PropertyGrid? If in the code, did you remove and reload the Strategy?
                          Both,and did remove and then reload a strategy.All the same.
                          Attached Files

                          Comment


                            #14
                            Originally posted by outsource View Post
                            Both,and did remove and then reload a strategy.All the same.
                            Well, that is the low-hanging fruit. If the problem is not there, then your Strategy code shall have to be examined to find the problem: it must be in how the Strategy is calling the indicator.

                            As a last test, you might try increasing BarsRequired to a much larger number. I just had to do that with something that I was writing. Once a very large number worked, it was easy to see where the problem code was. In that case too, the indicator worked fine when applied to a chart, but gave me this same message that you are getting when I called it from a Strategy.

                            I do not look at other programmer's secret code, because I do not want to later be accused of stealing anybody's code: I cannot have stolen code that I have never seen. So unfortunately, I can be of no further help.

                            All the best.

                            Comment


                              #15
                              The strategy is fine,it calls any indicators i put in.And that`s NOT a stolen code,it`s available for free download.Plus there`s nothing that be telling do not change or do anithing with the code.If that was the case i wouldn`t put it here.The reason i put it here was just the author that didn`t reply for the request.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by BatBart, Today, 01:24 PM
                              1 response
                              21 views
                              0 likes
                              Last Post NinjaTrader_Melissa  
                              Started by ezrakoper, Today, 03:05 PM
                              1 response
                              7 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by asmmbillah, Today, 02:23 PM
                              1 response
                              17 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by steveg, Today, 02:44 PM
                              1 response
                              9 views
                              0 likes
                              Last Post NinjaTrader_Heath  
                              Started by lightsun47, Today, 12:33 PM
                              1 response
                              14 views
                              0 likes
                              Last Post NinjaTrader_Jim  
                              Working...
                              X