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, 05-29-2026, 05:09 AM
    0 responses
    325 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    207 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    194 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    283 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    241 views
    0 likes
    Last Post CarlTrading  
    Working...
    X