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

CalculationMode.Price

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

    CalculationMode.Price

    Can I use CalculationMode.Price with currencies when calling SetStopLimit or SetProfitTarget? Or do I have to use CalculationMode.Pips?

    What is the best method of performing pip math in Ninja? Example:

    Open: 1.3550
    Stop: 1.3500

    The bar closes @ 1.3675 and I want to move the stop to 1.3625.

    Thanks!!
    Last edited by mrmistermike2016; 03-28-2017, 04:34 AM.

    #2
    Hello mrmistermike2016,

    Thanks for your post.

    Yes, you can use any of the CalculationModes.

    I'm not sure I understand your question regarding pip math but if you want the stop to be at 1.3625 then you can use SetStopLoss (CalculationMode.Price, 1.3625);
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      I thought I had to use TickSize in order to derive the new prices. So, this works with currencies? Does it work when the TickSize is .00001?

      Thanks in advance.
      Last edited by mrmistermike2016; 03-28-2017, 09:33 AM.

      Comment


        #4
        Hello mrmistermike2016,

        Thanks for your reply.

        When you use Mode.Price you specify the price

        When you use Mode.Ticks, you specify the number of Ticks

        When you use Mode.Pips, you specify the number of Pips

        Examples

        SetStopLoss (CalculationMode.Price, 1.3625); // sets stop at a specific price value

        SetStopLoss (CalculationMode.Ticks, 20); // sets a 20 tick stop loss from the entry.

        SetStopLoss (CalculationMode.Pips, 2); // sets a 2 Pip stop loss from the entry.
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        18 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        1 view
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        6 views
        0 likes
        Last Post Javierw.ok  
        Started by timmbbo, Today, 08:59 AM
        2 responses
        10 views
        0 likes
        Last Post bltdavid  
        Started by alifarahani, Today, 09:40 AM
        6 responses
        41 views
        0 likes
        Last Post alifarahani  
        Working...
        X