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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    41 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    28 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    45 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    37 views
    0 likes
    Last Post CarlTrading  
    Working...
    X