Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT7B9 Add(Indicator) Strategy not placing historical trades

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

    NT7B9 Add(Indicator) Strategy not placing historical trades

    I was running into issues testing a strategy that Adds its own indicators in the Initialize method as it would not take historical trades. I could only get it to trade if I commented out the Add(Indicator) statements. I was able to replicate this using the SampleMACrossOver strategy in NT7B9. Can NT Support confirm this? I assume this is related to the multi-timeframe issue.

    Thanks,

    Whitmark
    whitmark
    NinjaTrader Ecosystem Vendor - Whitmark Development

    #2
    I have been experiencing the same problem, and it is totally repeatable.

    I have found that if the indicator is added in the Initialize method, and I also use that same indicator in my in my strategy code (i.e. in OnBarUpdate) like this;
    myVariable = ADX(10)[0]
    then myVariable is always 0 for historical bars. Realtime bars will have the correct value.
    As soon as you comment out the Add indicator in the Initialize, then myVariable will return the correct values for Historical bars as well as real time.
    p.s. I am NOT using multi-series in my indicator or strategy.
    Last edited by astrolobe; 02-16-2010, 05:30 PM.

    Comment


      #3
      Astrolab, thanks for confirming. Yes, it only seems to impact historical bars as the realtime bars will generate trades and, as you point out, no need to have a secondary timeframe for this to occur.

      Whitmark
      whitmark
      NinjaTrader Ecosystem Vendor - Whitmark Development

      Comment


        #4
        yes, unfortunately this issue was introduced with B9 and will be fixed again with next update. Sorry for the inconvenience.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        47 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        23 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        33 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        50 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        42 views
        0 likes
        Last Post CarlTrading  
        Working...
        X