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

close trade when predifined cumulative gains made

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

    close trade when predifined cumulative gains made

    Hello,
    is it possible with an indicator or other to close automatically when in gain, a previously defined gain. ex i'am short on the ES and long on the NQ, when the cumulative gains and losses are made, the indicator or software closes when the cumulative amount reaches $ 100, for example. do you know a way to do this or a website?















    #2
    Hello gravdigaz6,

    Thanks for the post.

    The best automated way to do this would be to use a multi instrument strategy.

    The strategy would be able to see the performance for each position it had entered to know the unrealized pnl values. You could also look at its general performance to control trading based on realized pnl values.

    Based on those values you could exit orders and repeat the cycle.

    When working with a strategy position you can use the Position.GetUnrealizedProfitLoss() method to get PnL information.
    https://ninjatrader.com/support/help...profitloss.htm

    When working with a multi instrument strategy you can use the Positions collection to reference various instruments positions.
    https://ninjatrader.com/support/help...tsub=positions

    There is a lot of information about working with multiple series in the following link: https://ninjatrader.com/support/help...lightsub=multi

    https://ninjatrader.com/support/help...nce_statis.htm


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Balage0922, 10-01-2019, 11:09 AM
    16 responses
    205 views
    0 likes
    Last Post rmez01
    by rmez01
     
    Started by SuperDude123, Yesterday, 07:45 PM
    1 response
    26 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by ezrollin, Yesterday, 08:34 PM
    1 response
    19 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by egar1234, Yesterday, 03:51 PM
    1 response
    18 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by derivtrader, Today, 05:59 AM
    3 responses
    16 views
    0 likes
    Last Post NinjaTrader_Jermaine  
    Working...
    X