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


Indicator Won't Load on Startup and Doesn't work with Strategy

  • Filter
  • Time
  • Show
Clear All
new posts

    Indicator Won't Load on Startup and Doesn't work with Strategy

    I'm currently trying to use: in a strategy. Initially, when trying out the indicator, I noticed it would never load on the first try and I would always need to go in and mess with one of the change one of variables to get it to show up on a chart (I don't even need to modify the value).

    I believe this is probably leading to my next problem with the indicator.

    After changing the properties of some of it's variables to include [NinjaScriptProperty] (just the opacity and sensitivity variables), and trying to load it into a strategy, it completely screws up the strategy. It seems like the values of both the buy and sell signals do not exist, even if I change the variables of the strategy the same way I did for the indicator, it doesn't work (or appear on the chart)

    I was hoping someone could point out what exactly in the code is screwing up the indicator (preventing it from loading until I've played with it's values), as I've tried for a few hours now to no results.

    Upon reinspection, I do actually need to change the opacity to a number higher than 10 for the indicator to load. HOWEVER, even if I do that before hitting "Apply" or "Ok" in the indicator window (setting it to 100 or something) it doesn't load the indicator and i need to close in indicator window and reopen it, rechange the value, and then it will work.

    I'm really confused by this problem and I'd appreciate any support


      Hello akm39,

      Are errors appearing on the Log tab of the Control Center?

      Or is the script running but the values are not what you are expecting?
      Chelsea B.NinjaTrader Customer Service


        Hi ChelseaB,

        No errors are appearing on the log tab of the control center.

        Focusing on the indicator, the issue is that it simply doesn't load when it is initially called up from the indicator button in a NinjaTrader chart.



          Thanks for your reply.

          I will have NinjaTrader_Kate have a look at the script.

          We appreciate your patience.
          Chelsea B.NinjaTrader Customer Service


            Due to it not loading initially, it can't then be utilized in a strategy.

            In order to get the indicator to load, i need to call it up from the indicator menu in a chart, hit ok to close the indicator menu, then open up the indicator menu again, modify one of the values, then it will load up on the chart. Even if I modify one of the values before hitting okay the first time, it simply reverts back to the default value until i close and open the indicator menu again.


              Hello akm39,

              Thank you for your patience.

              I've had a chance to take a look and it looks like there was an issue with IsAutoScale and another bool not getting correctly set on the initial application of the indicator. I've corrected this in the version below and will be uploading this fix to the User App Share.

              Please let us know if we may be of further assistance to you.
              Attached Files
              Kate W.NinjaTrader Customer Service


                NinjaTrader_Kate, thank you so much!


                Latest Posts


                Topics Statistics Last Post
                Started by newton1, Today, 08:28 PM
                0 responses
                1 view
                Last Post newton1
                by newton1
                Started by jjanguda, Today, 06:20 PM
                0 responses
                Last Post jjanguda  
                Started by TaZ22, Today, 11:32 AM
                4 responses
                Last Post TaZ22
                by TaZ22
                Started by barriosmex, Today, 11:53 AM
                1 response
                Last Post Amedeus
                by Amedeus
                Started by MatthewLesko, Today, 11:35 AM
                0 responses
                Last Post MatthewLesko