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

Long orders shown as short in trade performance

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

    Long orders shown as short in trade performance

    Hello,

    I am struggling to understand why my strategy trades (demo) shows as shorts in the trade performance where in reality my script only allows for long positions... I have no idea how to approach solving this. Anyone good ideas? My hunch is that it is related to the end-of-session somehow as most positions seem to start around end-of-session. Maybe it has become "inverted" somehow from a bad starting order.

    Thank you!

    Click image for larger version

Name:	Screen Shot 2019-12-10 at 5.18.23 PM.png
Views:	332
Size:	80.0 KB
ID:	1080422Click image for larger version

Name:	Screen Shot 2019-12-10 at 5.18.00 PM.png
Views:	343
Size:	268.1 KB
ID:	1080423
    Attached Files

    #2
    Hello Jesperboll,

    Thanks for your question.

    There are two possible things that are happening.

    1. The Performance report is started when there is an open position. Each Trade is paired from recorded Executions in a FIFO manner. If the report is started when you are in an open position, the first execution which in reality would be an exit, would identify as an entry. Subsequent trades would then be paired following FIFO and exits for a long position could show as entries for a short position

    2. The strategy ias enabled out of sync with the account. The strategy will think it is in a long position but the actual trades on the account may be for opening/closing short positions.

    #1 can be addressed by changing when the performance report starts so it is started when you are flat.

    #2 would be addresses by ensuring that the strategy position and account position are in sync when you enable the strategy.

    Strategy Position vs. Account Position - https://ninjatrader.com/support/help..._account_p.htm

    Syncing Account Positions - https://ninjatrader.com/support/help..._positions.htm

    Please let me know if I can be of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thanks Jim, will give that a try!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by ScottWalsh, Today, 04:52 PM
      0 responses
      1 view
      0 likes
      Last Post ScottWalsh  
      Started by ScottWalsh, Today, 04:29 PM
      0 responses
      5 views
      0 likes
      Last Post ScottWalsh  
      Started by rtwave, 04-12-2024, 09:30 AM
      2 responses
      22 views
      0 likes
      Last Post rtwave
      by rtwave
       
      Started by tsantospinto, 04-12-2024, 07:04 PM
      5 responses
      70 views
      0 likes
      Last Post tsantospinto  
      Started by cre8able, Today, 03:20 PM
      0 responses
      7 views
      0 likes
      Last Post cre8able  
      Working...
      X