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 Philippe56140, Today, 02:35 PM
    0 responses
    1 view
    0 likes
    Last Post Philippe56140  
    Started by 00nevest, Today, 02:27 PM
    0 responses
    1 view
    0 likes
    Last Post 00nevest  
    Started by Jonafare, 12-06-2012, 03:48 PM
    5 responses
    3,986 views
    0 likes
    Last Post rene69851  
    Started by Fitspressorest, Today, 01:38 PM
    0 responses
    2 views
    0 likes
    Last Post Fitspressorest  
    Started by Jonker, Today, 01:19 PM
    0 responses
    2 views
    0 likes
    Last Post Jonker
    by Jonker
     
    Working...
    X