Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Anyone know how to modify an indicator?

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

    Anyone know how to modify an indicator?

    I have a tick counter that gives a countdown right next to the bar that's currently forming, but it often covers up part of the bar, so I'd like to find a way to scoot it to the right by 5 or 10 pixels. I've attached a pic of it in action as well as the indicator script file
    Attached Files

    #2
    Hello EnveousColnago, thanks for your question.

    It looks like you could add a " " (blank space) character at the beginning of the display string to fix this. Any other rendering into the future would need to be done with custom text rendering, see the CustomPlotSample for a demonstration of this.

    Please let me know if I can assist any further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChrisL View Post
      Hello EnveousColnago, thanks for your question.

      It looks like you could add a " " (blank space) character at the beginning of the display string to fix this. Any other rendering into the future would need to be done with custom text rendering, see the CustomPlotSample for a demonstration of this.

      Please let me know if I can assist any further.
      Do you know where that would be in the file I linked? I don't know anything about programming, but even a screenshot saying 'insert " " here' would be great

      Thanks!

      Comment


        #4
        Hello, thanks for your reply.

        Try adding this right after line 58:

        sTicCnt = " " + sTicCnt;

        Press F5 to compile after adding the line.

        Please note that any changes or upgrades that need to be done for a script will usually need to be addressed by the original developer.

        Kind regards.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_ChrisL View Post
          Hello, thanks for your reply.

          Try adding this right after line 58:

          sTicCnt = " " + sTicCnt;

          Press F5 to compile after adding the line.

          Please note that any changes or upgrades that need to be done for a script will usually need to be addressed by the original developer.

          Kind regards.
          It's giving me an error when I try to compile. Thanks anyway though!

          Comment


            #6
            Originally posted by NinjaTrader_ChrisL View Post
            Hello, thanks for your reply.

            Try adding this right after line 58:

            sTicCnt = " " + sTicCnt;

            Press F5 to compile after adding the line.

            Please note that any changes or upgrades that need to be done for a script will usually need to be addressed by the original developer.

            Kind regards.
            Here's a screenshot of the error if it helps:

            Comment


              #7
              Hello EnveousColnago, thanks for your reply.

              Can you tell me exactly what the compile error is saying? I can not see the full message from the screen shot.

              Kind regards.
              Chris L.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_ChrisL View Post
                Hello EnveousColnago, thanks for your reply.

                Can you tell me exactly what the compile error is saying? I can not see the full message from the screen shot.

                Kind regards.
                Here's a pic of the full error message. But when I "Click for info" on the code #, it looks like there's no inof for code CS0101

                Comment


                  #9
                  code error only exist in Microsoft c# guide product resource has the message . https://docs.microsoft.com/en-us/dot...rp/misc/cs0101

                  The name class ' Tick-Counter -SB' has been repeated tiwce instead of once. i cannot see your complete code.
                  Last edited by Emma1; 08-08-2020, 09:17 AM.

                  Comment


                    #10
                    i compiled 'sTicCnt = " " + sTicCnt;' on my NT7 no error not sure what you have.
                    Last edited by Emma1; 08-09-2020, 01:30 AM.

                    Comment


                      #11
                      Originally posted by Emma1 View Post
                      i compiled 'sTicCnt = " " + sTicCnt;' on my NT7 no error not sure what you have.

                      I keep getting an error that says:

                      The namespace 'NinjaTrader.Indicator' already contains a definition for 'sbTickCounter'

                      I've tried renaming the file to sbTickCounter2 and replacing all instances of 'sbTickCounter' in the file with 'sbTickCounter2', but I keep getting the same error

                      Comment


                        #12
                        Hello EnveousColnago , thanks for your reply.

                        That means there is still a duplicate definition for the tick counter indicator. I recommend removing the sbTickCounter2 entirely and making a copy of the original by opening the original in the NinjaScript editor> Right click> Save As> Save under a different name. Make sure this one compiles before editing it.

                        Kind regards.
                        Chris L.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by frankthearm, Today, 09:08 AM
                        9 responses
                        32 views
                        0 likes
                        Last Post NinjaTrader_Clayton  
                        Started by NRITV, Today, 01:15 PM
                        2 responses
                        9 views
                        0 likes
                        Last Post NRITV
                        by NRITV
                         
                        Started by maybeimnotrader, Yesterday, 05:46 PM
                        5 responses
                        26 views
                        0 likes
                        Last Post NinjaTrader_ChelseaB  
                        Started by quantismo, Yesterday, 05:13 PM
                        2 responses
                        20 views
                        0 likes
                        Last Post quantismo  
                        Started by adeelshahzad, Today, 03:54 AM
                        5 responses
                        33 views
                        0 likes
                        Last Post NinjaTrader_BrandonH  
                        Working...
                        X