Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

building a system always in the market

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

    building a system always in the market

    Hallo,

    I am trying to build a continuos system, always in the market, with the following code:

    if (a == true)
    {
    EnterLongStop(DefaultQuantity, MyHigh, "");
    }
    if (b == true)
    {
    EnterShortStop(DefaultQuantity, MyLow, "");
    }

    However, it does not always reverse, sometimes it just closes the long position without going short (or viceversa) but sometimes it does it alright. I have read the Order Handling Rules and I understand NT sometimes ignore StopOrders but I do not see why.

    Any comments?

    Thanks!

    #2
    Have you tried using TraceOrders to determine the behavior of your orders? If an order is ignored you will be given a reason from the output.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Well, The output says: Reason='Exceeded entry signals limit based on EntryHandling and EntriesPerDirection properties'

      I do not understand the EnterStop orders. I thought if I were long, and the lines crossed, an order EnterShortStop will short the thing but sometimes it does, sometimes it doesn´t (Have a look at the picture).
      Attached Files

      Comment


        #4
        Are you reading the right line of output? You will only get that message if you are already long and submitted another long entry order. Stop orders are essentially market orders once the stop price is hit. That is the behavior they undertake. You will need to debug what you are experiencing. Use print functions that display information about Position.MarketPosition to try and figure out what is happening in your strategy.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        558 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X