Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Exit Price

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

    Exit Price

    Hi,

    is there a function to show the exit price of a trade?
    I need to get, for each bar in position the actual profit/loss for that bar, while, when the position is flattened I need to know the exit price.

    Thanks.

    #2
    Hello,

    Quick question when you are flattening the position. How are you doing this? Are you calling ExitLong() or ExitShort by any chance?

    Also there is a way to get this information it is found here. However if it was me and your flattening the position with this method I would simply store the Close[0] price when you call ExitShort to a vraible and then use that variable as the exit price.








    I look forward to assisting you further.

    Comment


      #3
      The position can be flattened either with a stoploss or a simple exitlong/exitshort so I need to know the exact exit price that could be different from the close[0].

      Comment


        #4
        MAX,

        You can use the Trade object Brett linked you to earlier. Then just access the Exit object on it which you can then in turn access the Price property of to get the exit price of your trade.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by gravdigaz6, Yesterday, 11:40 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by MarianApalaghiei, Yesterday, 10:49 PM
        3 responses
        10 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by XXtrader, Yesterday, 11:30 PM
        0 responses
        4 views
        0 likes
        Last Post XXtrader  
        Started by love2code2trade, 04-17-2024, 01:45 PM
        4 responses
        28 views
        0 likes
        Last Post love2code2trade  
        Started by funk10101, Yesterday, 09:43 PM
        0 responses
        9 views
        0 likes
        Last Post funk10101  
        Working...
        X