Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is this a known bug?

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

    Is this a known bug?

    It happened in my first strategy that it automatically closes my positions (it was not as I coded, and use a name "Close Position" for the trade). Because I made a profit taking target when creating the script (I blocked the code when I finally use it), I thought it might have some hidden thing that might make it still works. When I make my 2nd strategy, I did not make anything, such profit taking default setting. However, when I ran the program in real time, I noticed that the strategy did not behave as it suppose to. So I checked my debugging messages.

    The problems are:

    1. It works good at the beginning. After a few trades, the returned information from the excecution for a trade does not match the order submitted;

    2. Since this happened, the code stopped working as it suppose to because it is totally lost when trade can not be followed;

    3. After some time, an automatic profit taking or stop loss mechanism involves with a "Close Position" to close open orders (I did not code this part and I do not know where and how it comes).

    Another scenerio that might trigger this problem is that when the open order can not filled at one time, it looks like it will get more chances the execution will confused and lose the control of reporting the right information for the executed order.

    Is this a known problem and how I can get rid of it? Thanks!

    #2
    atrader, are you sure you sync up your strategy vs account position properly when starting the strategie(s) up for realtime use?

    Please take some time to review the following info on this common procedure -



    You would see 'Close Position' also for example when you reverse in the strategy, as to for example reverse an open short position of 1 contract, you would have to actually buy 2 - NinjaTrader splits those contracts up, one for closing the open position to get you net flat and the other to reverse it.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, Yesterday, 10:06 AM
    0 responses
    21 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    18 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    14 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    9 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    40 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X