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

Error on calling 'OnBarUpdate' method for indicator

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

    Error on calling 'OnBarUpdate' method for indicator

    Hello, please help me, I wrote a simple code, the program is compiled it without errors but on the chart it is visible nothing, and in the log this error

    here is the code
    Last edited by Papercut110; 08-19-2016, 07:54 PM.

    #2
    Hello Papercut110,

    Thank you for your post.

    I see nothing wrong with the code. To fully test it I would need to know what LOG2 is and if you could provide the code or .cs file it would be helpful.

    Comment


      #3
      Here is LOG2
      Last edited by Papercut110; 08-19-2016, 07:54 PM.

      Comment


        #4
        PaperCut110,

        Your BarsArray call is to 2 when it should be 1 in the Minus indicator. For example:
        Code:
        Minu.Set((LOG2(1).Percent[0])-(LOG2(BarsArray[1], 1).Percent[0]));

        Comment


          #5
          thank you, as I looked, a stupid mistake

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by algospoke, Yesterday, 06:40 PM
          2 responses
          22 views
          0 likes
          Last Post algospoke  
          Started by ghoul, Today, 06:02 PM
          3 responses
          14 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by jeronymite, 04-12-2024, 04:26 PM
          3 responses
          45 views
          0 likes
          Last Post jeronymite  
          Started by Barry Milan, Yesterday, 10:35 PM
          7 responses
          21 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by AttiM, 02-14-2024, 05:20 PM
          10 responses
          181 views
          0 likes
          Last Post jeronymite  
          Working...
          X