Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy profit questions

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

    Strategy profit questions

    Pardon me piggy-backing on this but I have a related set of questions.

    Assume I have the same strategy running on 2-4 different instruments, but all placing orders in the same account.

    I have 2 scenarios:

    1) I want to Stop Trading When My Daily NetProfit in the Account Reaches a Certain Target


    Is my understanding correct, that for overall profit/loss I need to use the AccountItem.GrossRealizedProfitLoss ,to Compare to my Daily Max Profit / Loss targets. Right?

    2) I want to Stop Trading When My Daily NetProfit on the specific strategy/instrument Reaches a Certain Level


    I'd use
    SystemPerformance.AllTrades.TradesPerformance.Curr ency.CumProfit to get the current CumProfit just on that Strategy/Chart combination. (as shown in the educational sample "SamplePnL")

    In other words, If I run this strategy on 4 charts, each is treating the strategy independently of any other instances of this strategy running. I.e. it ignores the same strategy's CumProfit on a different chart (data series).

    And lastly, If I disable the strategy on the chart and re-enable it, does this value for CumProfit reset to zero? (for the 2nd scenario)
    Last edited by EminiTrader; 06-17-2020, 03:49 PM. Reason: edited for ease of reading

    #2
    Hello EminiTrader,

    Thank you for the post.

    I went ahead and started a thread for your questions so we can avoid having two different conversations going in the same thread. That way we can branch off if needed.



    1) I want to Stop Trading When My Daily NetProfit in the Account Reaches a Certain Target
    Is my understanding correct, that for overall profit/loss I need to use the AccountItem.GrossRealizedProfitLoss ,to Compare to my Daily Max Profit / Loss targets. Right?
    What you have shown is correct, you would have to access the account directly and get the value. The strategies TradePerformance values are going to relate to its specific trade performance.



    2) I want to Stop Trading When My Daily NetProfit on the specific strategy/instrument Reaches a Certain Level
    I'd use
    SystemPerformance.AllTrades.TradesPerformance.Curr ency.CumProfit to get the current CumProfit just on that Strategy/Chart combination. (as shown in the educational sample "SamplePnL")

    In other words, If I run this strategy on 4 charts, each is treating the strategy independently of any other instances of this strategy running. I.e. it ignores the same strategy's CumProfit on a different chart (data series).
    Your understanding is correct.

    And lastly, If I disable the strategy on the chart and re-enable it, does this value for CumProfit reset to zero? (for the 2nd scenario)
    It does, but because the strategy recalculates historical when re enabled any orders are placed during that time will be accounted for. Assuming the strategy does not trade historically and just enters realtime flat, yes it would be reset to 0 after disabling and re enabling it.

    I look forward to being of further assistance.

    Comment


      #3
      Thanks Jesse! Since my topic is limiting trades based on NetProfit, I have a related question as a followup.

      I want to have a strategy use an ATM Template, I know how to do this part for simple trades. I also have the example ATMPnl., so I can follow the example in that strategy example to limit trades based on PNL.. But within that strategy I need to place a bracket order using "OCO" with buyStopMarket above a certain level, and an "OCO" SellStopMarket bellow-but am not sure of how to do this within a strategy (vs on ChartTrader)
      Last edited by EminiTrader; 06-18-2020, 02:29 PM. Reason: Added more detail on my question

      Comment


        #4
        Hi EminiTrader, thanks for your reply.

        In the managed approach you can not have entry orders on either side of the market at the same time, the order will be ignored. You would need to use the unmanaged approach to submit a bracket in that way. So you would set up limit or stop orders on either side of the market using ATMStrategyCreate. When using ATM strategies, you will not get updates from OnOrderUpdate or OnExecutionUpdate so you would need to check the status of each order using GetAtmStrategyEntryOrderStatus.

        Please let me know if I can assist any further.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        62 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        134 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        75 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        50 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X