• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting unrealized pnl

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

    Getting unrealized pnl

    I am trying to get put in a condition that if the unrealised profit is greater than a set amount an action occurs

    if(Position.GetProfitLoss(Close[0], PerformanceUnit.Points >= ProfitTarget)

    I get the following msg

    Operatot '>=' cannot be applied to operands of type 'Ninjatrader.Strategy.performanceunit and double

    #2
    fiddy, looks to me like you just forgot the closing brace for the method call - would the below compile better for you?

    if (Position.GetProfitLoss(Close[0], PerformanceUnit.Points) >= ProfitTarget)
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by dyanemorye, Today, 01:45 AM
    0 responses
    2 views
    0 likes
    Last Post dyanemorye  
    Started by Bouzayen, Yesterday, 08:31 PM
    0 responses
    16 views
    0 likes
    Last Post Bouzayen  
    Started by IanC28, 03-27-2020, 10:20 AM
    6 responses
    33 views
    0 likes
    Last Post jim1234
    by jim1234
     
    Started by aramtrader, 04-01-2020, 03:05 PM
    7 responses
    44 views
    0 likes
    Last Post woodie1
    by woodie1
     
    Started by renehtx, Yesterday, 03:51 PM
    2 responses
    20 views
    0 likes
    Last Post renehtx
    by renehtx
     
    Working...
    X