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 helpwanted, Today, 03:06 AM
    1 response
    11 views
    0 likes
    Last Post sarafuenonly123  
    Started by Brevo, Today, 01:45 AM
    0 responses
    9 views
    0 likes
    Last Post Brevo
    by Brevo
     
    Started by aussugardefender, Today, 01:07 AM
    0 responses
    5 views
    0 likes
    Last Post aussugardefender  
    Started by pvincent, 06-23-2022, 12:53 PM
    14 responses
    242 views
    0 likes
    Last Post Nyman
    by Nyman
     
    Started by TraderG23, 12-08-2023, 07:56 AM
    9 responses
    387 views
    1 like
    Last Post Gavini
    by Gavini
     
    Working...
    X