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

Print("CP" +Close.GetValueAt(CurrentBar));

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

    Print("CP" +Close.GetValueAt(CurrentBar));

    Hello,

    I rename an indicator and there was a message saying: rename can cause compile errors.
    I try to Print("CP" +Close.GetValueAt(CurrentBar));
    But the value appears only when i refresh the indicator in the output window.

    The close price should be refreshing automatically?

    TY

    #2
    Hello frankduc,

    Thank you for your post.

    Was the indicator that was renamed one of the system indicators or one that you've created?

    Where within the code is your print statement? If it's within OnBarUpdate, is there a particular reason you're not printing the close price using Close[0] instead?

    Thanks in advance; I look forward to assisting you further.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Kate,

      Its my indicator.
      I just copy/paste an indicator i had created.
      By defautl it created the named indicator Myindicator6, than i renamed with the desired name.

      I did a few modification but nothing important. Iv been double checking for an hour, i dont see any reason not to work.

      The Print is in protected override void OnRender(ChartControl chartControl, ChartScale chartScale)

      One of my variable return 0.00007 when it should be returning 0.07 and all variables related to that variable are ok and return the right value.

      I get an error message saying : Indicator 'NEWSDBAdown': Error on calling 'OnRender' method on bar 2575: Sequence contains no elements

      TY

      Comment


        #4
        Hello frankduc,

        Thank you for your reply.

        You'll need to use prints to isolate which line is causing that error, and include that line in your reply. I'd add numbered prints to help you isolate exactly which line is having the issue.

        Likely the not updating is due to the error you're receiving.

        Thanks in advance; I look forward to assisting you further.
        Kate W.NinjaTrader Customer Service

        Comment


          #5
          Kate,

          Now i have bid troubles i can modify any of my indicators.

          I get errors in red for every indicators i tried to modify:


          NinjaScript File Error Code Line Column SBDDownTest.cs Type 'NinjaTrader.NinjaScript.Indicators.Indicator' already contains a definition for 'cacheSBDDownTest' CS0102 33 25


          NinjaScript File Error Code Line Column SBDDownTest.cs Type 'NinjaTrader.NinjaScript.Indicators.Indicator' already defines a member called 'SBDDownTest' with the same types of parameters CS0111 36 22


          NinjaScript File Error Code Line Column SBDDownTest.cs Type 'NinjaTrader.NinjaScript.MarketAnalyzerColumns.Mar ketAnalyzerColumn' already defines a member called 'SBDDownTest' with the same types of parameters CS0111 60 33


          NinjaScript File Error Code Line Column SBDDownTest.cs Type 'NinjaTrader.NinjaScript.Strategies.Strategy' already defines a member called 'SBDDownTest' with the same types of parameters CS0111 80 33


          NinjaScript File Error Code Line Column SBDDownTest.cs Type 'NinjaTrader.NinjaScript.Strategies.Strategy' already defines a member called 'SBDDownTest' with the same types of parameters CS0111 87 33


          I try deleting every indicators where the error is coming from but it just keep popping errors for other indicators unrelated.
          I had this problem once but dont remember how its been solve, some of your tech knew the answer.

          TY

          Comment


            #6
            Forget about it, problem solve!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by owen5819, 05-11-2024, 02:24 PM
            3 responses
            19 views
            0 likes
            Last Post owen5819  
            Started by Vitamite, Today, 12:48 PM
            0 responses
            5 views
            0 likes
            Last Post Vitamite  
            Started by doihaveto13, Today, 12:46 PM
            0 responses
            3 views
            0 likes
            Last Post doihaveto13  
            Started by MrAdamSK, 04-02-2024, 11:25 PM
            3 responses
            41 views
            0 likes
            Last Post NinjaTrader_Zachary  
            Started by lakman184, 03-24-2024, 01:30 PM
            7 responses
            36 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X