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 charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            65 views
            0 likes
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            149 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            162 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 05-10-2026, 08:12 PM
            0 responses
            99 views
            0 likes
            Last Post CarlTrading  
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            286 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Working...
            X