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

Rounding PIPs

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

    Rounding PIPs

    Hey guys, quick question. I use this
    Code:
    Instrument.MasterInstrument.Round2TickSize(winTotal).ToString()
    The output is a rounded Decimal of what ever my 'winTotal' variable is. on Gold it's .0 on E/U it's .0000 decimal places.

    My question is. How do I make the indicator automatically Know to which hundredth or thousandth place is equal to a whole Pip Move. So that it Converts from Decimal to Whole Number.

    example: If its EUR/USD and output is .0004 in order to Print 4 Pips it has to be multiplied by 1000. On Gold if .4 it's multiplied by 10 and you get 4 ticks.

    but I want to be able to place it on any Chart, and have it know to which decimal place to multiply by.

    Any ideas?
    Last edited by ginx10k; 08-13-2014, 07:24 AM.

    #2
    Ginx10k,

    Take your ending value and multiply it by TickSize.

    This should give the whole number you are looking for.

    http://www.ninjatrader.com/support/h...l?ticksize.htm
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      I divided instead of Multiplying and got the results I wanted. thanks!! have a good day.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by rbeckmann05, Yesterday, 06:48 PM
      1 response
      12 views
      0 likes
      Last Post bltdavid  
      Started by llanqui, Today, 03:53 AM
      0 responses
      6 views
      0 likes
      Last Post llanqui
      by llanqui
       
      Started by burtoninlondon, Today, 12:38 AM
      0 responses
      10 views
      0 likes
      Last Post burtoninlondon  
      Started by AaronKoRn, Yesterday, 09:49 PM
      0 responses
      15 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Yesterday, 08:42 PM
      0 responses
      11 views
      0 likes
      Last Post carnitron  
      Working...
      X