Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sub-pips Stops?

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

    Sub-pips Stops?

    Greetings,

    I've recently enabled the "sub-pips" setting in the Control Panel. Because of this, I'm now having some difficulties setting my StopLoss levels (where I hadn't before). Here is the code I'm using but it doesn't seem to properly set the StopLoss and I don't know why:

    EnterPlace = Close[0] + ((0 / TickSize) / 10);
    ExitPlace = EnterPlace - ((30 / TickSize) / 10);
    SetStopLoss(
    "HI Entry", CalculationMode.Price, ExitPlace, false);

    I know that this accurately calculates the correct number of pips (30), but the StopLoss level is not correctly set anymore (before I enabled the "sub-pips")...can somebody point out my error?

    #2
    I suggest debugging your code by printing out the stop prices and the actual TickSize to see what's going on.

    Comment


      #3
      Thanks, I'm getting some ridiculous value for "ExitPlace"...like around -300000, with a TickSize value of 1E-05...I have no idea why it is calculating about 10000 bigger than it should...What explains that TickSize value of 1E-05?

      Comment


        #4
        1E-05 is the expected TickSize for e.g. EURUSD when subpip support is enabled. You need to reconsider your math for the stop prices.

        Comment


          #5
          Thank you for the reply. What then would be a proper technique when using "sub pips" to set StopLoss accurately?

          Comment


            #6
            Unfortunately we are unable to provide support of doing actual math. As last resort a certified NinjaScript consultant would be at hour help: http://www.ninjatrader.com/webnew/pa...injaScript.htm

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            587 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            341 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            555 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            552 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X