Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Historical orders

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

    Historical orders

    Hi!
    Can you tell me please, is there any ability do not submit the historical orders, when I attach the strategy to a chart? In other way, I need start trading from "clean sheat". I don't care about the orders should placed before the time I attached a strategy to a chart! May be there is some options about that? I tried to clear all db and account information, but it didn't help.

    #2
    ilyats, you could just start your strategy OnBarUpdate() with

    if (Historical) return;

    Comment


      #3
      Thanks Bertran, it works. But what to do with backtesting? There are no orders submitted in backtests if I use this code. Should I and one more extern bool variable to identify whether is the strategy is used in backtests or in real?

      Comment


        #4
        Correct, this would be realtime use only - another approach is removing the historical check and starting your strategy in 'WaitUntilFlat' mode - this would then take the first realtime generated signal and don't take into consideration any historically taken over orders / positions.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        580 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        335 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        102 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        552 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X