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 CortexZenUSA, Today, 12:53 AM
        0 responses
        1 view
        0 likes
        Last Post CortexZenUSA  
        Started by CortexZenUSA, Today, 12:46 AM
        0 responses
        1 view
        0 likes
        Last Post CortexZenUSA  
        Started by usazencortex, Today, 12:43 AM
        0 responses
        5 views
        0 likes
        Last Post usazencortex  
        Started by sidlercom80, 10-28-2023, 08:49 AM
        168 responses
        2,266 views
        0 likes
        Last Post sidlercom80  
        Started by Barry Milan, Yesterday, 10:35 PM
        3 responses
        13 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X