Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strange positions appearing in log

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

    Strange positions appearing in log

    I have very strange things happen on my end, which is a bit too involved to explain. HOWEVER, I think the culprit for the errors I'm getting are these strange positions I see when tailing my log - here are two examples:

    6/25/2009 6:58:33 AM Position Instrument='ES ##-##' Account='Sim101' Avg price=924.407407407407 Quantity=11 Market position=Short Operation=Update Currency=Unknown

    6/25/2009 7:09:51 AM Position Instrument='ES ##-##' Account='Sim101' Avg price=924.013636363636 Quantity=10 Market position=Short Operation=Update Currency=Unknown

    Now, obviously the ES is not at 924 today - it's currently hovering above 900. Can you guys give me an idea of what's going on here?

    Thanks,

    Michael

    P.S.: Very disappointed about the NT7 delay - very....

    #2
    Please explain the situation if we are going to be able to evaluate this. Thank you.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      I've hooked into the following methods to append an email message buffer:

      onExecution() method: to append stop details for an entry alert emails I send myself.

      onPositionUpdate() method: to append any trade execution details - I filter by stop/target/entry - just like in the examples you guys provide.

      It all works fine for 3 of my strategies which are fairly complex (i.e. multi timeframes and I take 15 minute entries but 1 minute based exits).

      It 'sometimes' fails with one of my strategies that only works on a 1 minute timeframe - it's a scalper. For some reason intermittently the buffer is empty - thus I get an empty email. I have logging all over the place and it seems that the onExecution and onPositionUpdate methods are not even being called when that happens, which is strange. The order is being executed as it should but the buffer is empty, thus I get an email alert which is empty as well.

      Again, if this happened all the time I would have figured it out by now, but it seems to be completely intermittent.

      Told ya, it's a strange problem.

      Originally posted by NinjaTrader_Josh View Post
      Please explain the situation if we are going to be able to evaluate this. Thank you.

      Comment


        #4
        What I suggest is to turn on TraceOrders = true and see if it provides you with any information. Please also check in your code if you are resetting the IOrder to null to early. If you are printing the IOrder and it is null then it will be blank.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          What I suggest is to turn on TraceOrders = true and see if it provides you with any information. Please also check in your code if you are resetting the IOrder to null to early. If you are printing the IOrder and it is null then it will be blank.
          1) Where do I set traceorders to true - in my init method?

          2) I'm actually compounding my own description of the trades taken, so there should be at least 'something' IYKWIM. The fact that it prints nothing at all means the the entire method is getting skipped which is highly unusual. Hope this makes sense.

          Comment


            #6
            1. Yes.
            2. TraceOrders will tell you if the order was placed or not and whether it was rejected/ignored/etc which your own prints likely cannot catch.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            627 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            359 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            562 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            567 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X