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 Belfortbucks, Today, 09:29 PM
      0 responses
      3 views
      0 likes
      Last Post Belfortbucks  
      Started by zstheorist, Today, 07:52 PM
      0 responses
      7 views
      0 likes
      Last Post zstheorist  
      Started by pmachiraju, 11-01-2023, 04:46 AM
      8 responses
      150 views
      0 likes
      Last Post rehmans
      by rehmans
       
      Started by mattbsea, Today, 05:44 PM
      0 responses
      6 views
      0 likes
      Last Post mattbsea  
      Started by RideMe, 04-07-2024, 04:54 PM
      6 responses
      33 views
      0 likes
      Last Post RideMe
      by RideMe
       
      Working...
      X