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 WHICKED, Today, 12:45 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by samish18, Today, 01:01 PM
      0 responses
      5 views
      0 likes
      Last Post samish18  
      Started by WHICKED, Today, 12:56 PM
      0 responses
      8 views
      0 likes
      Last Post WHICKED
      by WHICKED
       
      Started by Spiderbird, Today, 12:15 PM
      2 responses
      11 views
      0 likes
      Last Post Spiderbird  
      Started by FrazMann, Today, 11:21 AM
      2 responses
      8 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Working...
      X