Announcement

Collapse
No announcement yet.

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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      571 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      331 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
      549 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      549 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X