Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exit all positions based on open P/L

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

    Exit all positions based on open P/L

    I need to be able to enter a script which allows me to exit multiple markets based on open P/L. Thanks for any help in advance.
    Last edited by thomaskrawczyk; 08-01-2014, 07:16 AM.

    #2
    Hello Thomaskrawczyk,

    Thank you for your post.

    You can use the Positions function within NinjaScript to access the other positions that they strategy has. You would then use GetProfitLoss() method to now the PnL
    http://www.ninjatrader.com/support/h...?positions.htm

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      I looked over the script in the link you sent- if I am manually entering a spread and want to exit if both markets reach a total profit or loss of x does that script still apply? It looks like the script had to enter specific markets/time frame. And I just want to focus on open P/L. Something like =IF open P/L is +200.00, -200.00 exit all positions?

      Comment


        #4
        Thomaskrawczyk,

        The Positions will apply to an active strategy. If you are placing orders manually you would not be able to access these through the script in any supported capacity.

        There is an unsupported method to querying your accounts positions, however we have not tested this for getting PnL nor do we have documentation on the subject.
        The method can be found below -
        http://www.ninjatrader.com/support/f...ad.php?t=55718
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Option Whisperer, Today, 09:00 AM
        0 responses
        1 view
        0 likes
        Last Post Option Whisperer  
        Started by icebergdelphi, Today, 08:57 AM
        0 responses
        2 views
        0 likes
        Last Post icebergdelphi  
        Started by z.franck, Today, 08:37 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by manueldecastro, Yesterday, 10:26 AM
        8 responses
        31 views
        0 likes
        Last Post manueldecastro  
        Started by Gavin45, Today, 08:40 AM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Working...
        X