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 sjsj2732, Yesterday, 04:31 AM
                0 responses
                22 views
                0 likes
                Last Post sjsj2732  
                Started by NullPointStrategies, 03-13-2026, 05:17 AM
                0 responses
                280 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                279 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                130 views
                1 like
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                90 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Working...
                X