Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cutzpr, Today, 08:54 AM
    0 responses
    5 views
    0 likes
    Last Post cutzpr
    by cutzpr
     
    Started by benmarkal, Today, 08:44 AM
    0 responses
    5 views
    0 likes
    Last Post benmarkal  
    Started by Tin34, Today, 03:30 AM
    2 responses
    26 views
    0 likes
    Last Post Tin34
    by Tin34
     
    Started by sastrades, Yesterday, 09:59 AM
    2 responses
    38 views
    0 likes
    Last Post brucerobinson  
    Started by ETFVoyageur, Today, 12:52 AM
    1 response
    21 views
    0 likes
    Last Post Leeroy_Jenkins  
    Working...
    X