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 CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    14 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    119 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    172 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    89 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    131 views
    0 likes
    Last Post cmoran13  
    Working...
    X