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

ATM Strategy Auto Break Even

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

    ATM Strategy Auto Break Even

    When referencing an ATM strategy with an auto break even condition, how do I reference the stop target for the break even order? I have already utilized the following example in my strategy to manage a 1 stop 1 target ATM strategy.

    Code:
    protected override void OnBarUpdate()
    {
        AtmStrategyChangeStopTarget(0, SMA(10)[0], "Stop1", "AtmIdValue");
        AtmStrategyChangeStopTarget(SMA(10)[0],0,  "Target1", "AtmIdValue");
    }
    What I would like to do is continue adjusting "Stop1" after I have moved the AutoBreakEven stop order to the break even price. Is this possible? Would I reference "Stop2" with the same method?

    Thanks!

    #2
    Hello MisterGee,

    Thanks for your post.

    There is only one stop order for the ATM (Stop1 in your example).

    A breakeven or a trailing stop is the same order, it is just the logic (breakeven or trailing) that moves the same stop order.
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ageeholdings, Today, 07:43 AM
    0 responses
    3 views
    0 likes
    Last Post ageeholdings  
    Started by pibrew, Today, 06:37 AM
    0 responses
    4 views
    0 likes
    Last Post pibrew
    by pibrew
     
    Started by rbeckmann05, Yesterday, 06:48 PM
    1 response
    14 views
    0 likes
    Last Post bltdavid  
    Started by llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    12 views
    0 likes
    Last Post burtoninlondon  
    Working...
    X