Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Profit/Loss Stops for Algos 24/7

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

    Profit/Loss Stops for Algos 24/7

    Hi Ninjas,

    I have a simple Algo, which I plan to work 24/7 with.

    For each session I have condition that if True, the Algo should stop for the rest of that session. The condition is if I meet certain goals. For this calculation I use 2 variables:

    - GetAccountValue(AccountItem.RealizedProfitLoss)
    - Position.GetProfitLoss

    Both of them give me the Pnl realized and unrealized of that session. My question is:

    Whenever a new forex session begins from 17:15:00, are these variables reset to Zero by the system, or will they carry their value till 00:00:00 of the next day?

    I appreciate your knowledge regarding this cause it's pretty important for my objective.

    #2
    Hello pstrusi,

    The "Position.GetProfitLoss" will not reset after the Session, it will always display the Unrealized PnL of your Position.

    As for the "GetAccountValue" this will be based on when your Broker resets the Realized PnL as it is going to be . Most will reset between session or maintenance,

    Let us know if you have any questions.
    JCNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    69 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    42 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    24 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    27 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    54 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X