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

Manually open a position and automatically open a new one when breakeven is met

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

    Manually open a position and automatically open a new one when breakeven is met

    Hi,

    I'm trying to set up a strategy that does following.

    When I manually open a position set stoploss to 10 ticks and breakeven 10 ticks, when breakeven is met automatically open a new position again with 10 ticks stoploss and 10 ticks breakeven.

    How do I do that?
    Thanks in advance.

    #2
    Hello benja400,

    Welcome to the NInjaTrader support forums.

    To begin, what you would need in this case would either be an Addon or a strategy which has added buttons to manually submit orders with. In general, manually trading is not able to be combined with a strategy directly as the strategy will want to trade for you in all cases. You can get around this by adding your own custom buttons to place manual trades with, or a more complex/robust approach is using the addon framework to make your own tool.

    For an example of adding buttons, you could use the following document: https://ninjatrader.com/support/help...ub=usercontrol

    This would help take care of placing manual orders with the strategy, keep in mind the strategy cannot track orders which it does not submit so using other tools like the chart trader or superdom would not work for this concept.

    Once the order has been submitted, you could use other strategy logic to further control orders and targets.

    You can find many samples of various concepts like BreakEven or Trailing stops on the forum here. One example of a break even was demonstrated in the following forum post, this was done using the strategy builder however you can either view or unlock the code using the strategy builder to see the syntax required. https://ninjatrader.com/support/foru...596#post806596


    You can also use the help guide references to learn:



    I would also suggest reviewing the following concepts as these items would make the orders you use easier to control logic with:





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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Haiasi, Today, 06:53 PM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by ScottWalsh, Today, 06:52 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by ScottW, Today, 06:09 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by ftsc2022, 10-25-2022, 12:03 PM
    5 responses
    256 views
    0 likes
    Last Post KeyonMatthews  
    Started by Board game geek, 10-29-2023, 12:00 PM
    14 responses
    244 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Working...
    X