Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unrealized PL

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

    Unrealized PL

    Hi, was previously on NT7 and trying to rework a code I was using for NT8.

    Seems like this should be simple, but I am having issues with it. One of my condition sets has: && (Position.GetUnrealizedProfitLoss(PerformanceUnit. Currency) >= 100) in it and it doesn't seem to be working.

    What I am trying to accomplish is: if Unrealized profit and loss >= $100 do "this".

    Is that not correct, am I missing something?

    #2
    Hello,

    Thank you for the post.

    Could you provide more detail on the syntax you are currently using?

    I tried the following test and see values being printed:

    Code:
    if(Position.MarketPosition == MarketPosition.Flat)
    {
    	EnterLong();	
    } else {
    	Print(Position.GetUnrealizedProfitLoss(PerformanceUnit.Currency, Close[0]));	
    }

    Are you able to see the positions unrealized profit/loss printed while using the above simple sample? If so this may be logic related, otherwise if not we could explore further what may be the cause.


    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    30 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    47 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    38 views
    0 likes
    Last Post CarlTrading  
    Working...
    X