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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        68 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        38 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        62 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X