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

Simple Indicator Help

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

    Simple Indicator Help

    I sat down this morning to try and write up a very simple indicator ... but my brain does not seem to be working correctly

    I'm looking for an indicator that will plot a bar in a new panel. All I'm after is a bar that counts up to the current Range Bar setting. For example ...

    I'm using 15 range bars on a chart. I'm looking for something that will plot the current bars high - the current bars low. I need this to happen while the bar is forming. This way I can easily see when a new bar is about to start. (because the bar plotted will grow to 15)

    If anyone can help me with this it would be great!

    Thanks

    #2
    Aithin, before delving into developing a custom study for this task: have you tried the NT inbuild RangeCounter indicator already?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks

      Wow, My brain is REALLY not working this morning LoL

      Thank you very much.

      I'm going to look into the code and see if I can figure out how to get an alert in there, and also how to make it bigger.

      So, I'll probably be back with those two questions


      Thanks Again

      Comment


        #4
        Yup, I've got those two questions above

        Can anyone help me at add alert to the RangeCounter Indicator? I would like an alert when the Range Remaining is less than or equal to 3.

        Also, if I could make the text larger that would be great.

        Thanks

        Comment


          #5
          Aithin, we could unfortunately not modify this for you, but you would look to work the call to Alert() in :



          rangeCount is the current seen range count you would like to compare to your threshold to.

          The font is set in the variables section, you can change the type and size here.
          BertrandNinjaTrader Customer Service

          Comment


            #6
            Thanks, and one more question

            Since the indicator is locked I am unable to save changes I make to it. However, when I save it has something else I get namespace errors. I'm assuming since there are now two indicators with the same name. How do I get around this?

            Thanks

            Comment


              #7
              The script is not locked but a system indicator that you could not edit, right click in the code and make a copy of it by selecting to 'save as', then edit and modify this copy only.
              BertrandNinjaTrader Customer Service

              Comment


                #8
                Re Named the Indicator

                I renamed the indicator RangeCounterTest ... I then found all instances of RangeCounter and replaced it with RangeCounterTest. The indicator compiled, and I saved it.

                I then went to add it to a chart, and the only indicator I can see in the list is RangeCounterTestTest. Where is this coming from? I've checked the name of the file and it is clearly RangeCounterTest.

                Also, I changed the font size ... compiled and saved the file. Loaded the RangeCounterTestTTest indicator (since it is the only option) but nothing changed?

                Any ideas?

                Thanks

                Comment


                  #9
                  Aithin, I would not know where the TestTest comes from then, perhaps from the prior attempt to rename?

                  I would delete all modded versions and only use the 'save as' command in the original RangeCounter source code provided by us.

                  Then please try creating a new font under Variables, like

                  private Font textFont2 = new Font("Arial", 30);

                  Then use this font variables in the later calls in the code, recompile and reapply.
                  BertrandNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by thanajo, 05-04-2021, 02:11 AM
                  3 responses
                  467 views
                  0 likes
                  Last Post tradingnasdaqprueba  
                  Started by Christopher_R, Today, 12:29 AM
                  0 responses
                  10 views
                  0 likes
                  Last Post Christopher_R  
                  Started by sidlercom80, 10-28-2023, 08:49 AM
                  166 responses
                  2,236 views
                  0 likes
                  Last Post sidlercom80  
                  Started by thread, Yesterday, 11:58 PM
                  0 responses
                  4 views
                  0 likes
                  Last Post thread
                  by thread
                   
                  Started by jclose, Yesterday, 09:37 PM
                  0 responses
                  9 views
                  0 likes
                  Last Post jclose
                  by jclose
                   
                  Working...
                  X