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 argusthome, 03-08-2026, 10:06 AM
        0 responses
        79 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        45 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        29 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        32 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        66 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X