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

How to, Enter trade only 1 per play

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

    How to, Enter trade only 1 per play

    Hi
    I want to enter only 1 trade when criteria fit. For example
    ​​​
    5ema greater 10ema
    Cci14 greater 100
    then enter long.
    exit after 5 candles

    next play would be short play, so even if thing keep on moving up, I just want to play 5 candle and next play would be opposite of that and enter short.

    I know how to do it when say
    3ema cross above 10ema.
    But the one I want, won't have anything crossing. Just ema and cci going the same way at the same time.

    I'm doing this on strategies builder so no crazy code please. Thank you

    #2
    this allows setting of one trade after setting up the strategy builder, see attached.
    Attached Files

    Comment


      #3
      Thank for replying
      I dont mean to enter 1 order per trade. I mean to enter a trade when both criteria fit. Say if it enter long and exit, next play should be short only and next is long.......

      Comment


        #4
        yes , programmatically.

        Comment


          #5
          Hello SuperDude123,

          Thank you for your post.

          You could use several bools that you flip from true to false when one of the directions is entered/exited. I've created a simple example in the Strategy Builder. After you import the attached script, you can open a new Strategy Builder window (New > Strategy Builder) and select LongFlatShortRepeatExample from the dropdown. You can then use the Strategy Builder's navigation buttons to review the logic.

          Please let us know if we may be of further assistance to you.
          Attached Files
          Kate W.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by wzgy0920, Yesterday, 09:53 PM
          2 responses
          49 views
          0 likes
          Last Post wzgy0920  
          Started by Kensonprib, 04-28-2021, 10:11 AM
          5 responses
          191 views
          0 likes
          Last Post Hasadafa  
          Started by GussJ, 03-04-2020, 03:11 PM
          11 responses
          3,230 views
          0 likes
          Last Post xiinteractive  
          Started by andrewtrades, Today, 04:57 PM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by chbruno, Today, 04:10 PM
          0 responses
          7 views
          0 likes
          Last Post chbruno
          by chbruno
           
          Working...
          X