Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Decimal

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

    Decimal

    Hello,

    I'm making a indicator, that i need to uze bollinger bands. I asked that when the price close < Lower Bolinger it give me a sell signal.

    - Problem: The indicator Looks for more than 2 decimal houses.( Ex: 0.536)

    - What i want: A way that it only looks for the 2 decimals houses. ( ex: 0.53 ), so that 0.53 = 0.53(6) (for exemple)

    #2
    Originally posted by PauloP View Post
    Hello,

    I'm making a indicator, that i need to uze bollinger bands. I asked that when the price close < Lower Bolinger it give me a sell signal.

    - Problem: The indicator Looks for more than 2 decimal houses.( Ex: 0.536)

    - What i want: A way that it only looks for the 2 decimals houses. ( ex: 0.53 ), so that 0.53 = 0.53(6) (for exemple)
    Try Math.Round(LowerBollinger, 2)
    eDanny
    NinjaTrader Ecosystem Vendor - Integrity Traders

    Comment


      #3
      Originally posted by PauloP View Post
      Hello,

      I'm making a indicator, that i need to uze bollinger bands. I asked that when the price close < Lower Bolinger it give me a sell signal.

      - Problem: The indicator Looks for more than 2 decimal houses.( Ex: 0.536)

      - What i want: A way that it only looks for the 2 decimals houses. ( ex: 0.53 ), so that 0.53 = 0.53(6) (for exemple)
      Use the Round2TickSize() method on the indicator values.

      ref: http://ninjatrader.com/support/helpG...trument_ro.htm

      Comment


        #4
        eDanny

        I made a Strategy and than coppyed to Indicator and everything that said "Strategy" i changed to "Indicator" i dont know how to program :s is possible i show the code and you tell me wher exactly i put it?

        Comment


          #5
          Originally posted by eDanny View Post
          Try Math.Round(LowerBollinger, 2)
          You are missing the index specifier.

          Comment


            #6
            koganam

            I just add you on Skype is possible you to accept?

            Comment


              #7
              Originally posted by koganam View Post
              You are missing the index specifier.
              Sorry, quick pseudo code off the top of my head.
              eDanny
              NinjaTrader Ecosystem Vendor - Integrity Traders

              Comment


                #8
                Hello PauloP,

                Thank you for your post.

                As koganam explained:
                Code:
                            if (Close[0] < Instrument.MasterInstrument.Round2TickSize(Bollinger(2, 20).Lower[0]))
                			{
                				// do something
                			}

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                557 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                324 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                101 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                545 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                547 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X