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 wzgy0920, Yesterday, 09:53 PM
    2 responses
    49 views
    0 likes
    Last Post wzgy0920  
    Started by Kensonprib, 04-28-2021, 10:11 AM
    5 responses
    191 views
    0 likes
    Last Post Hasadafa  
    Started by GussJ, 03-04-2020, 03:11 PM
    11 responses
    3,230 views
    0 likes
    Last Post xiinteractive  
    Started by andrewtrades, Today, 04:57 PM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by chbruno, Today, 04:10 PM
    0 responses
    7 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Working...
    X