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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      94 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      51 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      81 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      75 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      62 views
      0 likes
      Last Post CarlTrading  
      Working...
      X