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

    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cre8able, Yesterday, 01:16 PM
    3 responses
    11 views
    0 likes
    Last Post cre8able  
    Started by ChartTourist, Today, 08:22 AM
    0 responses
    4 views
    0 likes
    Last Post ChartTourist  
    Started by LiamTwine, Today, 08:10 AM
    0 responses
    2 views
    0 likes
    Last Post LiamTwine  
    Started by Balage0922, Today, 07:38 AM
    0 responses
    5 views
    0 likes
    Last Post Balage0922  
    Started by JoMoon2024, Today, 06:56 AM
    0 responses
    6 views
    0 likes
    Last Post JoMoon2024  
    Working...
    X