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 RubenCazorla, 08-30-2022, 06:36 AM
          3 responses
          77 views
          0 likes
          Last Post PaulMohn  
          Started by f.saeidi, Yesterday, 12:14 PM
          9 responses
          23 views
          0 likes
          Last Post f.saeidi  
          Started by Tim-c, Today, 03:54 AM
          0 responses
          3 views
          0 likes
          Last Post Tim-c
          by Tim-c
           
          Started by FrancisMorro, Today, 03:24 AM
          0 responses
          3 views
          0 likes
          Last Post FrancisMorro  
          Started by Segwin, 05-07-2018, 02:15 PM
          10 responses
          1,772 views
          0 likes
          Last Post Leafcutter  
          Working...
          X