• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help with calculating position size (TickSize and PIP values)

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

    Help with calculating position size (TickSize and PIP values)

    Hi

    I'm trying to calculate position size and so far have been looking at currency pairs, and in my indicator script, it is simply TickSize * 10 to get the correct pip value when comparing two prices.

    However, I'm now looking at the indices on the attached image. This image is from some dummy trades I placed on FXCM web portal. The P/L column is the PIP difference between the open and close prices.

    On these instruments (excluding EUR/GBP) the TickSize value on NinjaTrader is 0.01 for all of them. However, as you can see on the image, the PIP size can be x1 or x10 or x100 the TickSize value so I was wondering if there is another value on NinjerTrader which helps you calculate the PIP size for each.

    For info, excluding EURGBP the instrument names on NinjaTrader are as shown in the image but with @ at the start. e.g. @NAS100.

    Many thanks
    Tim


    #2
    Hello timcjpfx,

    Thank you for your post.

    Multiplying the pip size of your currency pair by the lot size of your order will provide you the pip value. If you're unsure of the pip size, this value will always be in the TickSize variable, and you can set up logic to check if it's x10 or x100 that you need before multiplying it by one of them. Additional information is available in our help guide here:

    https://ninjatrader.com/support/help...latingPipValue

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hi Kate

      Thanks for the response. I had previously read that page but unfortunately it still doesn't make sense to me, plus I'm not just looking at currency pairs.

      Could you help me with a worked example?

      Let's say I have a $10,000 account and I want to risk 1% = $100.
      I am selling instrument @US30.
      I want to place my stop loss at 15 pips above my entry price which is 24711.00

      Can you tell me how to calculate what my position size is so if I am stopped out, I do not exceed my 1% ($100)?

      Many thanks
      Tim

      Comment


        #4
        Hello timcjpfx,

        Thank you for your reply.

        You would need to get the Account info from the Account class and then calculate the value using the closing price, then use that to find the quantity to purchase. I've attached a simple strategy that was originally made by one of my colleagues here that I've modified to work for both Forex and CFD (Forex using micro lots). The account percentage may be specified in the strategy parameters. This particular strategy has logic added so it will always take at least 1 micro lot for testing purposes, but that should be omitted in real trading.

        Please let us know if we may be of further assistance to you.
        Attached Files
        Kate W.NinjaTrader Customer Service

        Comment


          #5
          Thanks for that.

          I ran the strategy but I think this is intended for something else:

          It does help with getting the account size etc. but it doesn't seem to calculate the pip value.

          What I am trying to do is to limit the potential loss on the trade to 1% of the account size. The potential loss is the number of pips between entry and stop-loss which I already have calculated. In this example, 15.

          So, I basically need to work out what the pip $ value is.

          e.g. If the pip value is $0.002 per pip.
          My risk amount is 1% * $10,000 = $100
          Then divide $100 by $0.002 (risk amount / pip value) = 50,000
          Then divide this by the number of pips for the stop loss (50,000 / 15) = 3,333.33
          This then gives me the unit or position size for the trade = 3,333 units or if FX it would be 3 Micro Units.

          As I mentioned earlier, I had been using (TickSize * 10) to get the currency pair pip value, but for the CFD instruments this does not work as they are all listed as TickSize = 0.01 so I still need to figure out whether to multiply the TickSize by 1 or 10 or 100 and that's where I'm stuck.

          Many thanks
          Tim
          Last edited by timcjpfx; 02-24-2020, 03:26 PM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by xmanjames, Today, 04:22 PM
          0 responses
          5 views
          0 likes
          Last Post xmanjames  
          Started by McQuac, Today, 03:48 PM
          0 responses
          3 views
          0 likes
          Last Post McQuac
          by McQuac
           
          Started by aviat72, Today, 01:00 PM
          2 responses
          11 views
          0 likes
          Last Post aviat72
          by aviat72
           
          Started by Andrey-Ufa, Today, 12:18 PM
          0 responses
          2 views
          0 likes
          Last Post Andrey-Ufa  
          Started by ben_ocean11, Today, 10:16 AM
          0 responses
          10 views
          0 likes
          Last Post ben_ocean11  
          Working...
          X