Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

New user question : Stop multiple entries

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

    New user question : Stop multiple entries

    I just learned basic strategy development on ninja.
    I've developed a simple day trading strategy. When strategy gets a buy signal, it continues getting the signal for multiple ticks. I place a longorder entry when I get the first signal. How do I stop ninja from contiguously executing longorder? I've set "Entries per direction" = 1 but I keep getting longorder until the signal becomes invalid.

    How can I manage it to one entry per direction and ignore the additional signals?


    #2
    Hello,

    Could you possible show me a code sample here?

    Likely you could do something like :

    if ( My_other_conditions_here && Position.MarketPosition == MarketPosition.Flat )
    {
    //do whatever you already do here
    }
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Tried this code

      Just tried this code ;

      if (noTrade0 > 0.008 && Low[0] <= EMA(EmaLen)[0] )
      {
      DrawDiamond("Long" + CurrentBar, false, 0, EMA(EmaLen)[0], Color.Blue);

      if (Position.MarketPosition == MarketPosition.Flat)
      {
      EnterLongLimit(DefaultQuantity, EMA(EmaLen)[0], "LongSignal");
      }

      }

      I got the signal and a diamond was displayed but there was no long entry!
      Am I using EnterLongLimit incorrectly?

      Comment


        #4
        Hello,

        Please check your log tab for any messages related to "order ignored" and report.

        You may want to read the following :

        Adam P.NinjaTrader Customer Service

        Comment


          #5
          The issue seem to be on order exit. I get one order entry at the beginning without exit.

          I'm using a 6 Range bar on CL.

          THis is my initialize routine:

          protected override void Initialize()
          {
          SetProfitTarget("LongSignal",CalculationMode.Ticks , 5);
          SetStopLoss("LongSignal", CalculationMode.Ticks, 7, false);

          CalculateOnBarCLose = false;
          }

          The above does not get me out of the position, although CL move more than 7 ticks in seconds. What am I doing wrong?

          Comment


            #6
            It looks like Joydeep is helping you with this in another thread. I will let him continue as he requested some files from you.

            Adam P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            649 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            370 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            109 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            574 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            576 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X