Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SystemPerformance.AllTrades Issue with Live Trading

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

    #16
    Ok - But can explain away why the first call to OnPositionUpdate has Long as opposed to flat?

    We were flat before we went long.

    Comment


      #17
      Hello,

      I'm still seeing the same thing when I run your test code. I altered the order-entry conditions a bit for easier testing, and printed Alltrades.Count on each OnBarUpdate(). What I see is Alltrades.Count returning 0 before the first order, 1 after the first order, 2 after the second order, and so on, running in Playback over a few days.

      I've attached the modified code and the output that I'm seeing for your reference.

      To be certain on the issue of the Position object showing Long -- this was the first order placed in your strategy, including historical orders, correct? There is no possibility that the strategy position was Long based on historical orders when this Print occurred?
      Attached Files
      Dave I.NinjaTrader Product Management

      Comment


        #18
        Originally posted by NinjaTrader_Dave View Post
        Hello,

        To be certain on the issue of the Position object showing Long -- this was the first order placed in your strategy, including historical orders, correct? There is no possibility that the strategy position was Long based on historical orders when this Print occurred?
        I'll check it the code when I get home tonight.
        Correct, no chance of historical trade. If historical check in on bar update to return.

        Also needed historical check in on state change with another indicator to keep error messages out from missing files.

        I'm using an import from nt7 data for replay. The database i tested against was an April snapshot and using a test key @sim . My test on my live machine with current nt7 recordings also experienced the same issue with a live license key.

        This was with es03-14 contract the earliest after ZenFire meltdown. . I'll try with the most current contract also.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by benmarkal, Yesterday, 12:52 PM
        3 responses
        22 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by helpwanted, Today, 03:06 AM
        1 response
        17 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        11 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        6 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        244 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Working...
        X