Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

replay101 cash value gain does not equal realized pnl

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

    #16
    ATIUser,

    I was able to check into this and isolate whats going on.

    It has to do with increased margin requirement when you scale in and scale out.

    The CashValue reported (THIS IS ONLY when NinjaTrader is calculating cash value on the simulator and maraket replay account) is simulated and weighted with margin. Therefor the margin used to execute the traade will be reflected in the CashValue. This is the reason for the different value and it is expected.

    The margin used is set in the control center->options->simulator tab->Margin Per Unit. You can try setting this to 0 however ninjaTrader simulator will always use some sort of margin when trading .

    The bottom line is however that Cash Value is not just a simple PnL subtraction and this is why the values do not match as they use different calculation techniques.

    Again this is only on replay and simulator only and would have more use if you were trading stocks for example however still applies with futures.

    -Brett
    BrettNinjaTrader Product Management

    Comment


      #17
      Thanks for your efforts Brett.

      So I will just ignore the Cash Value number in sim and replay as it is useless.

      In the cash account vai Zenfire trading futures the Cash Value exactly reflects the opening cash balance plus the realized pnl as it should. I will work with that only.

      Comment


        #18
        Originally posted by ATI user View Post
        Thanks for your efforts Brett.

        So I will just ignore the Cash Value number in sim and replay as it is useless.

        In the cash account vai Zenfire trading futures the Cash Value exactly reflects the opening cash balance plus the realized pnl as it should. I will work with that only.
        update:

        CashValue for trading the NQ in a zenfire cash account is absolutely useless. Actually, worse than useless, it is dangerous as it is completely misleading and would be better not plotted at all.

        It appears ninja adjusts the cashvalue, from the original account balance when the trade was entered, up to reflect/include unrealized gain. This happens intermittently for no apparent reasons that I can discern.

        Then as the market pulls back and the unrealized gain disappears, and maybe even becomes a loss, the cashvalue is still at the inflated value.

        Essentially this value can show you are up $1000 and then when you flatten you find you are down $200
        Last edited by ATI user; 04-10-2012, 03:31 PM.

        Comment


          #19
          Thanks for the feedback.

          I would not advise using this value on simulation as in simulation it uses a lot of factors that can cause issues if not all of them are correctly calculated. This value is something we try to simulate on the simulator, in live trading we expect the value to come directly from the provider with most connections therefor it can be relied on in live trading.

          In simulation I recommend just using the unrealized PnL.

          This is something that I have asked development to look into for a future major release to see if any changes can be done with this model to make it more simple and thus greater chance of being accurate for the largest portion of our users.

          Furthermore if you are scaling in and out this will cause issues with this value not being reported correctly as it does not take this into account.

          -Brett
          Last edited by NinjaTrader_Brett; 04-10-2012, 11:12 AM.
          BrettNinjaTrader Product Management

          Comment


            #20
            please read my post

            I am not talking about simulation....that is the only time that it does work

            I am talking about trying to trade live cash account using a number that is totally useless and wrong

            AGAIN.....please tell me what number I can rely upon for accurate risk management calculations. Where is there an accurate number that tells users how much money they have in the account when in a position? From there they can add the PnL number from the positions tab.
            Last edited by ATI user; 04-10-2012, 03:32 PM.

            Comment


              #21
              Hello,

              Missed that it was live account, in the forum post you posted on had to do with simulated values. You can disregard what I said in that post.

              In the case of a live account the cash value with Zenfire this value is displayed directly from the provider.

              Do you have a time and date where this occurred live, we can take a look at the trace and see if we can see the cash value update from the provider that you are mentioning and see if anything can be done there.

              Please send logs and traces and date and tiem stamps to support at ninjatrader dot com and reference this post.

              -Brett
              Last edited by NinjaTrader_Brett; 04-10-2012, 11:49 AM.
              BrettNinjaTrader Product Management

              Comment


                #22
                Brett

                This is not an isolated incident. This is what happens with every trade, every time, in a cash account.
                Last edited by ATI user; 04-10-2012, 03:32 PM.

                Comment


                  #23
                  There is no other number. If there is an issue with this number we would need to look into it. However most likely the problem is not NinjaTrader but instead your broker API as we simply report the number provided by the API. However I would need to look into the trace and logs to identify if this is the case and see if I can work with the API vendor to isolate what is going on and get a fix in if that is what is required.

                  -Brett
                  BrettNinjaTrader Product Management

                  Comment


                    #24
                    trace file sent to your attention
                    thanks

                    Comment


                      #25
                      Brett
                      Based on our discussion I have opted for accessing CashValue only OnPositionUpdate which is now working fine...i.e. ignoring unrealized
                      Thanks for your help.

                      Comment


                        #26
                        Thanks, glad to hear!
                        BrettNinjaTrader Product Management

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        648 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        369 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by Mindset, 02-09-2026, 11:44 AM
                        0 responses
                        108 views
                        0 likes
                        Last Post Mindset
                        by Mindset
                         
                        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                        0 responses
                        572 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        573 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X