Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Apex/Rithmic Trade Count Question

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

    Apex/Rithmic Trade Count Question

    Hello,

    I have been working on a strategy that looks at the last trade to make decisions on the next trade. I've been backtesting in playback and I got it where I want it. However when and ran it today with live Apex/Rithmic data it did not adjust anything like it's suppose to. So my question is: Is it possible that Apex is not counting trades the same way or not updating the last trade the same way. Has anyone ever heard of this and is there a workaround?

    Thanks in advance.

    #2
    Hello 26psicivic,

    By last trade are you referring to 'SystemPerformance.AllTrades[SystemPerformance.RealTimeTrades.Count - 1]'?


    If you print SystemPerformance.AllTrades.Count in OnPositionUpdate() is this printing a 0 each time the position is flat?

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Are you talking about the strategy's Performance?

      In my experience, when you're trading with multiple contracts,
      you may easily have one or more partial fills before the full
      position is obtained. This results in multiple trades in the
      Trades tab, despite all those trades belonging to the same
      position.

      What we're really missing is a Positions tab, showing the
      sums of all the Trades (listed on the Trades tab) that went
      into a specific Position.

      A 'Trade' in NinjaScript-speak is not equal to a Position.

      Comment


        #4
        I am using SystemPerformance.RealTimeTrades[SystemPerformance.RealTimeTrades.Count - 1] and it works how I want in playback.
        Do I need to use SystemPerformance.AllTrades[SystemPerformance.RealTimeTrades.Count - 1]?
        I have not used Print. I would have to Print with live data because that's when it's not working.

        Comment


          #5
          Hello 26psicivic,

          Print() is a debugging tool that allows you to understand how your script is processing.

          Use Print() and use it very often. Any time you are trying to understand behavior, you should be using prints.

          Below is a link to a forum post on using Print() to understand behavior.
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by josiahTrader193541_, Today, 01:57 PM
          3 responses
          16 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by stevepmay, Yesterday, 09:00 AM
          5 responses
          25 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by josiahTrader193541_, Today, 01:57 PM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by FishTrade, Yesterday, 04:10 PM
          4 responses
          18 views
          0 likes
          Last Post FishTrade  
          Started by gustavobp, Today, 01:37 PM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X