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 kinfxhk, 07-14-2026, 09:39 AM
        0 responses
        90 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 10:18 AM
        0 responses
        92 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 09:50 AM
        0 responses
        70 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 07:21 AM
        0 responses
        87 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-11-2026, 02:11 AM
        0 responses
        64 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X