Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

One active position exists in each moment.

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

    #16
    Hello bosajin,

    Thanks for your reply.

    Clearly, on the screenshot, you are showing an order called "Close position" which indicates the position was closed by an entry order in the opposite direction. You are also using ExitLong or ExitShort methods and I suspect you are calling that at the same time you are calling EnterLong or EnterShort. which as I advised previously, "If you call an exit order at the same time as the entry order in the opposite direction, you can create a racing condition which could then end up with 2 orders."

    I would suggest you resolve this by using print statements before each enter/exit method to see which one is firing when. If you find an EnterShort when you are calling exitLong or find an EnterLong when calling ExitShort then you have some logic to clean up.

    Here is an example: Print (Time[0]+" EnterLong block ");

    The print statement will be sent to the New>Ninjascript output window which needs to be open before running the script.

    Here is a link to our debugging tips: https://ninjatrader.com/support/help...script_cod.htm

    Comment


      #17
      Hi Paul.

      Would you please explain to me why even though the order report only displays 3 records in 7/23/2020 7:00 and two of them filled and one of them cancelled , the chart shows one active order.
      Also what do those numbers(-6 in black box and 1 in red box) stand for?

      Best,

      Comment


        #18
        Hello bosajin,

        Thanks for your reply.

        Please look at the "Name" column of the orders, "Short_601" is your entry order, "Profit target" was the profit target that was canceled because the order "Stop loss" was filled. Here is a link to the help guide on the Orders tab: https://ninjatrader.com/support/help...orders_tab.htm

        The -6 in the black box is showing that the current price is -6 ticks from the entry meaning that at that moment it is a 6 tick losing trade. You do have the option to show this as ticks, points, pips, currency, or percentage. The 1 indicates the number of contracts in the order. Please see the help guide on the chart trade here: https://ninjatrader.com/support/help...art_trader.htm

        As you are now asking questions not related to the topic you created, we recommend creating a new topic for any future questions. Thanks for your help in keeping the forums organized.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        53 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        130 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        70 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        44 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        49 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X