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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        107 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        154 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        72 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        79 views
        0 likes
        Last Post PaulMohn  
        Working...
        X