Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to set NT8 not to trade historical bars

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

    How to set NT8 not to trade historical bars

    Hello I am coding a trading strategy that focus of managing and holding a trade after it got a buy/sell signal for another software component. When being connect to live data feed and enable the strategy, many time i will find myself with historical long/short position. If i am not running a simulation then i would like to start my account flat.

    For this i am planning to add to the strategy a checkbox if to trade historical bars or not.

    I am just wondering why there is no such option in every strategy form before enabling it.

    so is there already such an option somewhere instructing NT8 not to trade historical bars?

    #2
    Hello ezrakoper,

    Thanks for your post.

    You can skip historical bar processing in this manner (In OnBarUpdate()):

    if (YourBool == true && State != State.Realtime) return; // do not process below this line if bool checked to skip historical data and not realtime data

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    94 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    49 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    31 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    35 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    71 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X