Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

stop execution of orders and limited bar [0]

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

    #16
    Hello,

    If you add TraceOrders = True in the Initialize Method you will be able to trace the orders to see what is happening.




    Please add this then check under control center->tools->output window and let me know what is being outputted here. You see any errors?
    BrettNinjaTrader Product Management

    Comment


      #17
      hello I never thought it was so hard to close a position on the same bus stop input, in other plafaformas is not so complicated, you can control this other code please tell me how I can make a stop output in the entry bar, so it never closed positions, thank you very much.

      double stoploss = Position.AvgPrice - Position.AvgPrice * (filterR/100) ;

      if (CrossAbove(ZeroLagTEMA(Period).ZeroTEMA, ZeroLagHATEMA(Period).ZeroHATEMA, 1)
      && RelativeSlope(period)[0]<filterR

      )

      { SetStopLoss (CalculationMode .Price ,stoploss);

      EnterLong(1, "");


      }
      Last edited by optimuss; 08-11-2011, 02:05 PM.

      Comment


        #18
        Hello optimuss,

        You should define in the strategies Initialize() method. See this page for an example of this:


        Set orders are a convenient way to submit stop loss orders, that are automatically applied on entry execution. They can be based on an offset of entry price when using mode ticks or percent.

        The stop loss order will use the last value "set", and dynamic control is possible using principles in this sample:
        Ryan M.NinjaTrader Customer Service

        Comment


          #19
          Hello please seia you kindly extrategia show some examples of where I can view in stop orders programcion com recognized and limited the entry bar, thanks.

          Comment


            #20
            Hello,

            The language barrier here is not allowing me to assist you in the manner you need as I still do not at root understand your what specifically your trying to do.

            Please try using your native language and typing it into translate.google.com and translating to english.

            Then repost the question and we will see if this is a little better.

            Thanks.
            BrettNinjaTrader Product Management

            Comment


              #21
              Hello, sorry and I apologize for that .

              was trying to say in the post above, if they could show me please where I can see some example commands Limted closures and stop at the entry bar, thank you very much.
              Attached Files
              Last edited by optimuss; 08-12-2011, 01:20 PM.

              Comment


                #22
                Hello,

                Is this for backtest or for live?

                Thanks.
                BrettNinjaTrader Product Management

                Comment


                  #23
                  Hello, for live .

                  Comment


                    #24
                    Hello,

                    I see. Ok to do this you will want to use BarsSinceEntry().

                    BarsSinceEntry() BarsSinceExit()
                    BrettNinjaTrader Product Management

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by CarlTrading, 03-31-2026, 09:41 PM
                    1 response
                    68 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by CarlTrading, 04-01-2026, 02:41 AM
                    0 responses
                    37 views
                    0 likes
                    Last Post CarlTrading  
                    Started by CaptainJack, 03-31-2026, 11:44 PM
                    0 responses
                    61 views
                    1 like
                    Last Post CaptainJack  
                    Started by CarlTrading, 03-30-2026, 11:51 AM
                    0 responses
                    62 views
                    0 likes
                    Last Post CarlTrading  
                    Started by CarlTrading, 03-30-2026, 11:48 AM
                    0 responses
                    53 views
                    0 likes
                    Last Post CarlTrading  
                    Working...
                    X