Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question about forums unrealized profits

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

    Question about forums unrealized profits

    Hello! I have a question related to enabling and testing strategies... I notice when I enable a strategy (either live account or sim), if I have the strategy set to "wait until flat" it shows the unrealized P&L as $0.00, however I notice when I reference the value/variables within the NinjaScript (for example lets say I get a realtime email of the updated P&L) it shows me the unrealized PNL at the time of where the strategy is at... Is there anyway to see what the unrealized PNL would be directly on the grid?

    Furthermore... if I do set the strategy to "Sync and submit immediately" I actually see the unrealized PNL as if the entries were made at the strategy price and not the actual price. I am ok with this, but would be nice to know both I suppose. For example, if the strategy was long 5 contracts at an average price of $4,000, but the price is now $4,100... It would show me the unrealized PNL on the grid as if I entries were at $4,000. Does this make sense?

    I guess I have some general questions about development... are there any suggested example code or forum threads with references to adding special columns on the strategies grid/tab? Lets say for example I wanted to add in something like wanting to know the EMA of the price at the moment... I could easily code that in the strategy, but there is no way I know of that it could be displayed on the strategies within the grid. Kind of like how you can create custom market analzyer columns for market analyzer... Does that exist and is there example code on how to include those columns?

    Thanks,

    Chad
    chadnash
    NinjaTrader Ecosystem Vendor - Nash Technologies

    #2
    As far as the strategies tab and a custom column... Looks like I got my answer to that here:
    Hi, I was wondering, how would I go about adding a new column to the strategies tab. I'd like to add "Last" to the strategies tab so I can see the last tick of the strategy it's running.


    Unless there is anything else you can add.

    Thanks,

    Chad
    chadnash
    NinjaTrader Ecosystem Vendor - Nash Technologies

    Comment


      #3
      Hi Chad, For the unrealized PnL, it will not show the unrealized PnL of the virtual trade from the Wait Until Flat state, only real values will be shown in the Strategies tab of the Control Center. The unrealized PnL that you see when you sync the account is being calculated from the price seen at the time the entry signal was seen, the sync order just gets the account position in sync with the strategy position.

      For the columns, unfortunately these columns are not customizable. You would need to place code in the strategy that exports specific data like this.

      Kind regards,
      -ChrisL​
      Chris L.NinjaTrader Customer Service

      Comment


        #4
        Hi Chris,

        Thanks for the reply... I guess I would like to request some enhancements for future builds that would be very beneficial and I think pretty easy since you have the data already.

        The enhancement request would be to add additional optional columns to the strategies tab, all of the fields which would already be part of the existing strategy summary page.

        For example, right now you already allow columns such as "Number of Trades"... Would be great if you also allowed for fields such as "Avg time in market", "Profit Factor", "# of Short Trades", "# of Long Trades", "Percent Profitable", "Avg Trade", "Max Consec winners", etc... Basically many of the fields which you already have in the same dataset/datasource I am assuming as what you are using to display items in the grid such as Number of Trades.

        This is helpful because with many strategies for example running on sims or on equities, there are often many strategies running and while its great to be able to sort in the grid by things such as realized gains or number of trades, beyond that I need to always right click each and every time to see performance and details such as Avg time in market.

        Thanks,

        Chad
        chadnash
        NinjaTrader Ecosystem Vendor - Nash Technologies

        Comment


          #5
          Hi Chad, I found an existing feaure request from users that have requested this in the past ID# SFT-1570. I will add a vote to this for you.
          Chris L.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by ghoul, Today, 06:02 PM
          3 responses
          13 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by jeronymite, 04-12-2024, 04:26 PM
          3 responses
          44 views
          0 likes
          Last Post jeronymite  
          Started by Barry Milan, Yesterday, 10:35 PM
          7 responses
          20 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by AttiM, 02-14-2024, 05:20 PM
          10 responses
          180 views
          0 likes
          Last Post jeronymite  
          Started by DanielSanMartin, Yesterday, 02:37 PM
          2 responses
          13 views
          0 likes
          Last Post DanielSanMartin  
          Working...
          X