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 smartromain, 03-13-2024, 01:42 AM
    5 responses
    92 views
    0 likes
    Last Post AndreiBig  
    Started by Noerclou, Today, 04:55 AM
    0 responses
    4 views
    0 likes
    Last Post Noerclou  
    Started by llanqui, Yesterday, 09:59 AM
    2 responses
    19 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by ThoriSten, Today, 03:56 AM
    0 responses
    6 views
    0 likes
    Last Post ThoriSten  
    Started by PhillT, 04-19-2024, 02:16 PM
    3 responses
    25 views
    0 likes
    Last Post mangel2000  
    Working...
    X