Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Moving stop to below EMA

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

    Moving stop to below EMA

    I'm not competent in C.
    Assume that I'm trading off of a chart in a long trade, and I have an ATM in place for my stop and target.
    Is there a way that I can automatically close my trade if a bar closes below a 20EMA, not transversing the EMA, but closing below it.

    #2
    Hello sgordet ​,

    Thank you for reaching out.

    The most accurate way to do this would be through scripting, so that the code can tell the strategy to submit a close order for the position once the condition is met.

    Otherwise, you will need to use Alerts with Trade actions. The thing is, the Alerts can only set with simple logic like:

    "Once the bar closes below the 20EMA, submit a Sell or a Buy order. "

    It will not know or consider whether you are already in an active trade or have any ATMs working. So you would have to be careful when doing this.

    Please see the link below for our Alert overview in our NinjaTrader 8 help guide:



    I have also provided a publicly available video of NT8 Alert examples:





    If you want to take a shot of scripting a strategy to accomplish this, you can contact our engineering team at

    [email protected]

    For help getting started.

    If you have limited time or programming capabilities, you can look through our NinjaTrader Ecosystem​ for 3rd party custom scripts or vendors who may be able to assist you with this.

    Please let me know if you have any questions.​
    Erick P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    164 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    319 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    246 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    350 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    179 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X