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

No Compiling Error but Indicator doesnot appear

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

    No Compiling Error but Indicator doesnot appear

    Dear All,

    Please find attach the code for the indicator I try to developp.

    Included in the code is the Repulse indicator that I have succesfully programmed and which is working fine (no issue to make it appearing on the chart).

    I have mixed its use with other indicators available from NT. For reasons I have not identified, this indicator here does not want to appear on the chart (I get the frame with the name on the chart but it does not show any data).

    I have also tried a "console.write" but it did not work. How can I get this print in the "output" window.

    Since I am a C# beginner, I may have forgotten something...

    Thanks if you can help.

    Best regards,
    Attached Files

    #2
    Do you get any errors in the Log of the Control Center when applying this custom indicator?

    I would suggest using the Set() method to put values into your dataseries objects - http://www.ninjatrader-support.com/H...iesObject.html

    Here's a helpul tip on debugging with Print statements - http://www.ninjatrader-support2.com/...ead.php?t=3418
    BertrandNinjaTrader Customer Service

    Comment


      #3
      there is one plot only , so I would assume you have only one dataseries assigned to it, hence I would try using the Values[0] DataSeries instead of Values[1].

      Give it a try

      Andreas

      Comment


        #4
        Check the LOG tab; I believe you may see an error.

        This line
        Code:
        VOLMA(200)
        References 200 bars correct?

        Which means, you need to have
        Code:
        if(CurrentBar < Math.Max(period, 200)) return;
        mrlogik
        NinjaTrader Ecosystem Vendor - Purelogik Trading

        Comment


          #5
          Originally posted by mrlogik View Post
          Check the LOG tab; I believe you may see an error.

          This line
          Code:
          VOLMA(200)
          References 200 bars correct?

          Which means, you need to have
          Code:
          if(CurrentBar < Math.Max(period, 200)) return;
          In this case you don't need CurrentBar < 200 condition
          You would need if VOLMA(200)[200]

          Comment


            #6
            I mean here: dataseries Values[0]



            public DataSeries Market_Efficiency
            {
            get { return Values[0]; }
            }

            Comment


              #7
              Thanks to all of you for your support and qwick reply.

              I got it solved by applying the correction mentionned by zweistein.

              Best regards.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by lorem, Today, 09:18 AM
              1 response
              4 views
              0 likes
              Last Post lorem
              by lorem
               
              Started by bmartz, Today, 09:30 AM
              0 responses
              3 views
              0 likes
              Last Post bmartz
              by bmartz
               
              Started by GussJ, 03-04-2020, 03:11 PM
              14 responses
              3,244 views
              0 likes
              Last Post GussJ
              by GussJ
               
              Started by ArkansasClint, Today, 09:28 AM
              0 responses
              0 views
              0 likes
              Last Post ArkansasClint  
              Started by hazylizard, Today, 08:38 AM
              4 responses
              12 views
              0 likes
              Last Post hazylizard  
              Working...
              X