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

Stop loss

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

    Stop loss

    Hi
    how do I go about iabout anti to have ema as my entry and exit but sometimes using ema as exit can be a big loss. How do I also add a 30 points stop loss along with ema crossing, which ever come first.

    If it can be don't on strategies builder.

    #2
    Hello SuperDude123,

    Are you asking how to make a condition that uses the EMA for deciding to enter or exit? Are you asking how to use the EMA price for order placement?

    For any type of logic with targets like setting a stoploss or alternatively doing an exit you would have to avoid using the stops and targets page of the builder, that page is for fixed targets that use a pre defined value. You can find an example of working with targets here: https://ninjatrader.com/support/foru...rategy-builder
    JesseNinjaTrader Customer Service

    Comment


      #3
      I'm trying to used ema and set stop loss, which ever come first

      Comment


        #4
        Hello SuperDude123,

        If you are trying to use either the EMA as an exit or a stoploss you would have to use logic like the linked break even sample to do that. You would need to use a variable to control if the stoploss order is being resubmitted on each bar. Resubmitting the order on each bar holds it open, once the order is expired you could use another set to exit using a market order.


        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by andrewtrades, Today, 04:57 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        6 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        436 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        9 views
        0 likes
        Last Post FAQtrader  
        Started by rocketman7, Today, 09:41 AM
        5 responses
        20 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X