Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Variable UnrealizedProfit in more than one Strategie

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

    Variable UnrealizedProfit in more than one Strategie

    Hello,

    if I have two strategies running and both are in Position "Long" - for example each with 1.000 quantity in EURUSD (but entry-price is different). So I do have totalquantity 2.000(!) in tab "Positions" for LONG in the Controllcenter with just one value for UnrealizedProfit (average?).

    If this scenario happens - is the GetUnrealizedProfit in each strategy DIFFERENT or equal? So does every strategy know its 'own' GetUnrealizedProfit? Or only the average of both?

    Hope you can understand what I mean. Thanks a lot for explanation!

    Regards, Hans
    Last edited by hans_771; 03-14-2025, 06:56 AM.

    #2
    Hello hans_771,

    Thank you for your post.

    The GetUnrealizedProfitLoss() method can be used with two objects, PositionAccount and the Position object.

    For the Strategy's PnL, use the Position object:

    Position.GetUnrealizedProfitLoss(PerformanceUnit unit, [double price])
    • GetUnrealizedProfitLoss() calculates the unrealized PnL for the strategy position.
    • This value is calculated on the individual strategy and would not be equal to all strategies.
    The Control Center's Positions tab will show the PnL for the current position on an account, not just one strategy.

    To view the performance for an individual strategy, right-click on a strategy from the 'Strategies' tab of the Control Center and navigate to the Strategy Performance menu.


    Please note that running multiple strategies at a time on the same instrument and account will likely cause the strategy instance's position to be out of sync with the account position.
    For example, you were running two strategies with long 1 contract as the strategy position, but the account position is long 2 contracts.
    If you wish to trade the same instrument with multiple strategies at the same time, we recommend running them on separate accounts instead to prevent unwanted account positions.

    Please let us know if we may be of any further assistance.

    Comment


      #3
      Originally posted by NinjaTrader_Eduardo View Post
      Hello hans_771,
      If you wish to trade the same instrument with multiple strategies at the same time, we recommend running them on separate accounts instead to prevent unwanted account positions.
      Thanks for your answer. So my trading account is at FXCM, for trading in multiple strategies in EURUSD I should use multiple FXCM accounts? On FXCM account for strategy you mean?

      Comment


        #4
        Yes, that's correct. There would be one net position per instrument on a single account. So if you plan to run multiple strategies live on EURUSD simultaneously, we recommend that you use separate FXCM accounts—one for each strategy—to ensure that each operates independently and doesn’t interfere with the other.

        Comment


          #5
          Ok, I understand that "problem" because the strategies interfere each other other because of the FiFo principle​s I mean.

          Am I right with that(?): If I don't send a Stop Order at FXCM when I go long withe a strategy in Ninja (so I mean the Stop is only in Strategie Builder conditions - no classic StopLoss order), and more then one strategy goes long - the net-result (ticks or money), when I'm flat again with all position (quantity = 0 at FXCM), should be the same?

          Originally posted by NinjaTrader_Eduardo View Post
          Hello hans_771,

          Position.GetUnrealizedProfitLoss(PerformanceUnit unit, [double price])
          • GetUnrealizedProfitLoss() calculates the unrealized PnL for the strategy position.
          • This value is calculated on the individual strategy and would not be equal to all strategies.
          The Control Center's Positions tab will show the PnL for the current position on an account, not just one strategy.

          So if that assumption ist right, it should only be the problem in evaluation of the strategies because a stop (win or lose) might not belong to the strategy in the chart (that is what you mean with "interfere with the other"?).

          thanks a lot for your time and my bad english, it is a bit difficult to explain ;-)
          Last edited by hans_771; 03-17-2025, 06:57 AM.

          Comment


            #6
            Hello hans_771,

            The position for the account and the position for the strategy are separate. For a strategy to effectively manage your account position, the strategy position and the account position would need to stay synchronized.

            With two or more strategies on the same account/instrument, it is likely that the position of the strategies will become out of sync with the position of the account.

            The Account Position will reflect all strategy-generated trades, but each Strategy position would only reflect positions generated by the strategy itself.
            Furthermore, a strategy cannot close orders submitted outside the strategy.

            This can all have unintended consequences, and it is a better practice to consolidate the logic of all strategies into a single script.

            The second post on the following forum thread goes into more detail regarding how strategies could "interfere" with each other:


            Please let me know if I may be of any further assistance.

            Comment


              #7
              Thanks a lot for explaining. So if I don't want to use multiple FXCM Accounts (on for each strategy in EURUSD), I should only use ONE strategy (for one instrument) to keep synchronized strategy position and the account position​. And I should use more tabs for entry and exit conditions in one strategy in StrategyBuilder than building more strategies to get all conditions just in one script?

              So I will test this to combine for example two strategies (one with EMA indicators for enter/exit and the other one with volume indicators for enter/exit) in one with just different signal names.
              Last edited by hans_771; 03-18-2025, 05:15 AM.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by NullPointStrategies, Today, 05:17 AM
              0 responses
              48 views
              0 likes
              Last Post NullPointStrategies  
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              126 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              66 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              42 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              46 views
              0 likes
              Last Post TheRealMorford  
              Working...
              X