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

StopLimit orders don't work!

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

    StopLimit orders don't work!

    Hi everyone

    I backtested a strategy with the classic

    If (Close[0] > threshold)
    EnterLongLimit

    and it works.

    I tried to obtain the same result with EnterLongStopLimit:
    EnterLongStopLimit(1, my limit, threshold, "Long")

    In the latter case, I don't get any execution for any security in the backtest.
    What is the problem?

    Thank you

    #2
    stefy

    Check the LOG tab to see if the price you're attempting to enter Long at is below the current entry price of that bar. If the limit is passed (you're backtesting and there is no intrabar granularity), the order will not execute / show on the chart.

    mrLogik
    mrlogik
    NinjaTrader Ecosystem Vendor - Purelogik Trading

    Comment


      #3
      mrlogik,

      Thank you for the answer.

      If the price crosses my threshold in bar1 but then it doesn't cross my limit price (in bar1), the order won't get executed. If then the price crosses my limit price in bar2, it won't get executed again. Am I correct?
      This would explain why I get so few executions...

      Thank you

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by arvidvanstaey, Today, 02:19 PM
      4 responses
      10 views
      0 likes
      Last Post arvidvanstaey  
      Started by samish18, 04-17-2024, 08:57 AM
      16 responses
      56 views
      0 likes
      Last Post samish18  
      Started by jordanq2, Today, 03:10 PM
      2 responses
      8 views
      0 likes
      Last Post jordanq2  
      Started by traderqz, Today, 12:06 AM
      10 responses
      18 views
      0 likes
      Last Post traderqz  
      Started by algospoke, 04-17-2024, 06:40 PM
      5 responses
      47 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X