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

Loading a custom indicator stop strategy with not errors

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

    Loading a custom indicator stop strategy with not errors

    Hello Ninjas

    I am working with a foot print indicator, when I used the indicator on a chart its works perfect.

    I want to use this one on my strategy, but when I make the assignement to the variable of my strategy, the strategy enter on an infinite loop of procesing, where never get out, no errors mensages display, no ninja crash, just stay on the same point and the logic dont continue with the execution.

    I leave "Prints" every part to check where my strategy stop working, I found after match my varible with the indicator, You can help me , what is wrong here?

    I leave an image of the definition and assigment of the indicator to the variable.

    I hope that you can help me.

    Regards
    Daniel Restrepo
    Attached Files

    #2
    Hello Jackrpo,

    Thank you for the post.

    If the strategy is stopping its loading or not reaching the code after the indicator call, this is likely due to something in the indicator not loading correctly.

    Have you checked the output or log windows for errors?

    When a strategy "hosts" an indicator, that is different than when a chart has an indicator "applied". Hosting is not visual so this can make some complex indicators not work as expected if they rely on visual elements like the chart being present. Very likely you will need to debug the indicator when using it with the strategy to know more about why it is stopping right there.

    Do you have the source code for the indicator? The zip you provided is in a protected format so I cannot view what you have provided if that is the indicator.

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

    Comment


      #3
      hi Jesse

      thank you for your answer, I have the code file of the indicator.

      It is attached
      Attached Files

      Comment


        #4
        Hello Jackrpo,

        Thank you for the post.

        I reviewed the file and see that you have already got some prints in there. Are the prints currently being output, and if so do you see at which point they are stopping?

        Based on my observation of the indicator, this would be something you will need to debug further to find the cause. If the prints are not being outputted, or they are not helpful in seeing where the indicator is stopping you may need to comment out logic until you see that calling the indicator works to at least continue past where it is stopped now.

        The script right now is very large and if there are no errors being output, you would need to further explore what may be happening by reducing the possible paths it is taking.

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

        Comment


          #5
          Your screenshot shows you may be invoking FootPrintDRE3() incorrectly.
          Why? Because rarely is 'this' the first argument to an indicator.

          So, I ask politely, why are you passing 'this' as the first argument?
          What were you trying to achieve by passing 'this'?

          Is 'this' a valid value for the first argument to the FootprintDRE3() indicator?
          My inspection of the attached code in post #3 says 'no'.

          Comment


            #6
            Hello Jesse

            Thank you again. when I run the strategy, that is the strange part, It complete the configuration of the indicator and print all the steps, but never returns to the strategy after finish the configuration of the indicator. (When I add a indicator after complete the State.Configure what is the next call?, I am assuming after it complete the configuration returns to the strategy , and It waits until the on bar update of the strategy make the call to sincronice the indicator data.)
            I Attach the image of full parts, the prints of strategy, the prints of the indicator, the output window and the chart running the strategy. you can see the streˇategy star running ok and call the indicator, but never returns to the strategy.

            Regards

            Daniel Rpo.
            Attached Files

            Comment


              #7
              Originally posted by bltdavid View Post
              Your screenshot shows you may be invoking FootPrintDRE3() incorrectly.
              Why? Because rarely is 'this' the first argument to an indicator.

              So, I ask politely, why are you passing 'this' as the first argument?
              What were you trying to achieve by passing 'this'?

              Is 'this' a valid value for the first argument to the FootprintDRE3() indicator?
              My inspection of the attached code in post #3 says 'no'.
              Hello David, Thank you for take the time to reiew my scrip, I was using that parameter because that was on the list of the parameters, The firts time that I tried to compile the call method whith not "this" prameter, I get a compiling error of number of parameter.
              I atach the picture how I saw that parameters list.

              But I change to the 2 overload parameters list with not Series parameter and it works fine. Thank you!!!. =)

              now II get other error on bar update method, but that is a diferent Thread that I will analice and solving. but now I can make my strategy reaches the bar update method after loading the indicator. THANK YOU.
              Attached Files

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Stanfillirenfro, Yesterday, 09:19 AM
              7 responses
              51 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by TraderCro, 04-12-2024, 11:36 AM
              4 responses
              69 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Mindset, Yesterday, 02:04 AM
              1 response
              15 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by agclub, 04-21-2024, 08:57 PM
              4 responses
              18 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by Irukandji, Today, 04:58 AM
              0 responses
              6 views
              0 likes
              Last Post Irukandji  
              Working...
              X