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 Mongo, Today, 11:05 AM
      4 responses
      14 views
      0 likes
      Last Post Mongo
      by Mongo
       
      Started by traderqz, Today, 12:06 AM
      7 responses
      14 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by Skifree, Today, 03:41 AM
      5 responses
      13 views
      0 likes
      Last Post Skifree
      by Skifree
       
      Started by traderqz, Yesterday, 09:06 AM
      5 responses
      35 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by guillembm, Today, 11:25 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X