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

Indicator Called by Strategy Not Working

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

    Indicator Called by Strategy Not Working

    Hi, i have a strategy that calls two indicators, the indicators are the same but one plots on Daily the other one on 4 hours and the chart is a 40 Rjay Hybrid, the first called indicator works properly, the second doesn't, i tried it without the strategy and plots correctly, nothing on the logs either, you can see the second indicator lines collapsed over the price bars:

    Click image for larger version

Name:	2015-10-13_004236.jpg
Views:	1
Size:	17.9 KB
ID:	904064

    little help please, thanks!

    #2
    Hello kabott,

    Thank you for your post.

    Are the indicator instances added through code or through the indicators menu?

    If through code, can you provide the indicator or strategy that adds the indicator?

    If not through code, can you provide the indicator so I may investigate further?

    You can attach your indicator to your response by going to File > Utilities > Export NinjaScript > Export selected source files > select your Indicator > select the right arrow > Export. The file will be located under (My) Documents\NinjaTrader 7\bin\Custom\ExportNinjaScript.

    Comment


      #3
      Hi Patrick, sorry the delay to respond, i was at work, the indicators are called trough code like this:


      private KBT_Sys_SPXi_V2 _MacroX;
      private KBT_Sys_SPXi_V2Bis _Microx;

      protected override void Initialize()
      {
      _MacroX = KBT_Sys_SPXi_V2( macroTimeframePeriods, macroOuterMulti, ActingTimeFrame.HybridRenko , Color.Yellow, Color.Red, Color.SteelBlue, macroSpLength, macroSpMidLineOffsetPer, macroSpMultiplier);
      Add ( _MacroX );


      _Microx = KBT_Sys_SPXi_V2Bis( microTimeframePeriods, microOuterMulti, ActingTimeFrameBis.HybridRenko , Color.White, Color.Magenta, Color.Cyan, microSpLength, microSpMidLineOffsetPer, microSpMultiplier);
      Add ( _Microx );



      They are exactly the same indicator duplicated and renamed, cause i didn't knew how to change the global "ActingTimeFrame.HybridRenko" within the strategy without renaming the original, so i just cloned the indi and renamed the conflicting globals,





      Thanks you!
      Last edited by kabott; 10-14-2015, 07:31 AM.

      Comment


        #4
        Hi Patrick, did you got a chance to take a look at the malfunctioning stuff?

        Comment


          #5
          Hello,

          Thank you for posting the files.

          Unfortunately it looks like just these two files would not be enough to compile ant test what is happening.

          Could you instead please do an Export so all files needed are included? You can do this by going to File -> Utilities -> Export NinjaScript and include your test script that demonstrates the issue.

          If you do not already have a test script, please create a empty strategy and only add the Prints that demonstrate the issue or mainly shows the one instance that Prints and the other indicator that does not Print and how you are calling them.

          This would help in finding the cause and also I could import and compile for testing.

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

          Comment


            #6
            All done, i fexed it
            Last edited by kabott; 10-14-2015, 08:07 PM.

            Comment


              #7
              Hello,

              Thank you for letting me know this is resolved.

              Please let me know if I may be of further assistance.
              JesseNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by ScottWalsh, Today, 04:29 PM
              0 responses
              3 views
              0 likes
              Last Post ScottWalsh  
              Started by rtwave, 04-12-2024, 09:30 AM
              2 responses
              21 views
              0 likes
              Last Post rtwave
              by rtwave
               
              Started by tsantospinto, 04-12-2024, 07:04 PM
              5 responses
              69 views
              0 likes
              Last Post tsantospinto  
              Started by cre8able, Today, 03:20 PM
              0 responses
              7 views
              0 likes
              Last Post cre8able  
              Started by Fran888, 02-16-2024, 10:48 AM
              3 responses
              49 views
              0 likes
              Last Post Sam2515
              by Sam2515
               
              Working...
              X