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

Potential bug

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

    Potential bug

    Hi

    I have developed a strategy in UnManaged environment.
    I found an inconsistency between orders and open position when I run it on the playback.
    As you can in see in image , there is 5 open long position but my log and also the order report shows I have never submitted buy order in that time.
    The log and the order report are attached.

    Expected result: 1 open sell position
    Actual result: 5 open long position

    Video: http://sc.com.ly/show/9ivgGmV6dN8KYeR3cJTEfb4AjPDCzQUB
    Instrument Action Type Time Quantity Filled Limit Stop State Avg. price Remaining Name
    MYM 12-20 Buy to cover Limit 11/11/2020 3:15 1 0 29402 0 Working 0 1 SellTarget
    MYM 12-20 Buy to cover Stop Market 11/11/2020 3:15 1 0 0 29472 Accepted 0 1 SellStop
    MYM 12-20 Sell short Market 11/11/2020 3:15 1 1 29427 0 Filled 29422 0 ShortEntry
    MYM 12-20 Buy to cover Stop Market 11/11/2020 3:15 3 3 0 29423 Filled 29423.74286 0 SellExit
    MYM 12-20 Buy to cover Limit 11/11/2020 3:15 4 3 29426 0 Cancelled 29424 1 SellTarget
    MYM 12-20 Buy to cover Stop Market 11/11/2020 3:15 4 0 0 29496 Cancelled 0 4 SellStop
    MYM 12-20 Sell short Market 11/11/2020 3:13 6 6 29447 0 Filled 29445.33333 0 ShortEntry
    Click image for larger version  Name:	inconsistancy image.JPG Views:	0 Size:	155.6 KB ID:	1129947

    #2
    Hello bosajin,

    Thanks for your post.

    If you are reporting a bug with the NinjaTrader platform, please provide a barebones test script that illustrates the bug in clear and simple terms. All we see is that your strategy may not be protecting orders in the cleanest way. We don't see evidence of a platform bug. The test script should also illustrate the bug using a standard NinjaTrader BarsType that comes with the platform. We should not use 3rd party bars types to illustrate a platform issue, even if that BarsType was downloaded from our User App Share.

    The first steps you will need to make will be to reproduce the issue and use prints to see what parts of your code is getting called when the unexpected orders are getting submitted. When you see that the order has been submitted and where, you will want to modify the logic so the unexpected submission does not take place.

    Debugging Tips - https://ninjatrader.com/support/help...script_cod.htm

    I have attached an example Unmanaged strategy and I do not see the same issues you are. I tested on standard Renko bars. You could consider modelling after this strategy, and if you see issues with the example, I could take a look at the example. However, if the issue is only present in your strategy, I would suggest comparing how you are handing your order logic vs. the example strategy.

    We look forward to assisting.
    Attached Files
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by PaulMohn, Today, 05:00 AM
    0 responses
    8 views
    0 likes
    Last Post PaulMohn  
    Started by ZenCortexAuCost, Today, 04:24 AM
    0 responses
    6 views
    0 likes
    Last Post ZenCortexAuCost  
    Started by ZenCortexAuCost, Today, 04:22 AM
    0 responses
    3 views
    0 likes
    Last Post ZenCortexAuCost  
    Started by SantoshXX, Today, 03:09 AM
    0 responses
    16 views
    0 likes
    Last Post SantoshXX  
    Started by DanielTynera, Today, 01:14 AM
    0 responses
    5 views
    0 likes
    Last Post DanielTynera  
    Working...
    X