Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

alltrades cumulative profits

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

    alltrades cumulative profits

    I ve had problems whe using
    Performance.AllTrades.TradesPerformance.Currency.C umProfit

    As I see, when running backtesting the result changes from real trade.

    What I want is : stop trading (for a day) in case the result in a particular instrument is lower X.

    on first bar of the day
    priorTradesCumProfit = Performance.AllTrades.TradesPerformance.Currency.C umProfit;

    And then I test if ( Performance.AllTrades.TradesPerformance.Currency.C umProfit -priorTradesCumProfit > X) and if not the system does not trade.
    Am I doing it right?
    does it work on backtesting?

    #2
    Hello Dafonseca,

    Thank you for your post.

    Your logic looks fine, however, what does the code look like in how you are testing these conditions?

    Have you tried following the sample below -
    http://www.ninjatrader.com/support/f...ead.php?t=4084

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    134 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    75 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    119 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    114 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    90 views
    0 likes
    Last Post CarlTrading  
    Working...
    X