Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pip Math

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

    Pip Math

    When I'm performing math to adjust stops in Forex, do I have to convert the price to a double and determine if its x.xx. or x.xxxx or is there a built in function for this?

    Example: I want to compare the current close to the average price plus a # of pips ...

    If (Close[1] > AveragePrice + 25 pips)

    Thanks in advance!!

    #2
    Hello RiversideDude,

    Thank you for your note.

    You would want to multiple the amount of pips/ticks by TickSize, which will leave you with the correct format for the decimal.

    For example,

    Code:
    if(Close[1] > AveragePrice +25*TickSize);
    I would encourage you to add prints and pull up a output window to check values, for example,

    Code:
    Print((Close[0]+2*TickSize).ToString());
    See TickSize section of our helpguide,
    http://ninjatrader.com/support/helpG...t_ticksize.htm

    I would also see RoundToTickSize section of our helpguide,
    http://ninjatrader.com/support/helpG...toticksize.htm

    RoundDownToTickSize(),
    http://ninjatrader.com/support/helpG...toticksize.htm

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by bowling, Today, 06:16 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by systemtrader4, Today, 01:54 AM
    1 response
    16 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by Futurestrader00, Today, 01:54 AM
    1 response
    25 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by timmbbo, Today, 01:40 AM
    2 responses
    10 views
    0 likes
    Last Post NT-Roland  
    Started by BGWTEX, Yesterday, 07:20 PM
    0 responses
    7 views
    0 likes
    Last Post BGWTEX
    by BGWTEX
     
    Working...
    X