Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How does Limit order work in backtest?

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

    #16
    Hi there,

    During a gap down and an active EnterLongLimit Order in the backtest I get filled with the Limit price even though the next bar's open (and high) is significantly lower.

    How would I change the @DefaultFillType.cs to have my EnterLongLimit get filled at the Open price instead if there is a gap down and the Open is lower than my Limit price? Could you please post the code that I have to amend in the .cs file?

    Thank you
    wtmnn

    Comment


      #17
      Someone help me on EnterLongLimit and EnterShortLimit? It submits so many orders even do in my code I only put 3 quantities. Here is my Long Limit code as well as the Short Limit code:

      EnterLongLimit(0, true, 3,Closes[0][0], "long entry");

      EnterShortLimit(0, true, 3, Closes[0][0], "short entry");

      It submits a total of 18 orders on the same bar. I don't know why.

      Comment


        #18
        Hello, could someone help me on putting a 1 contract at market and 2 contract at limit price? I just want to get filled when I submitted an order because sometimes the gap keep me out of a trade. In this type of entry I will surely get filled. I want to see the difference.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        29 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        117 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        69 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        227 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        309 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X