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

Trace contradicts with "Trades" result

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

    Trace contradicts with "Trades" result

    Hi all,

    I was manually checking the "Trades" result, and I found a contradiction between the trace and the "Trades" result.

    My primary bar is 1H, my trading bar is 5 minute. For every entry signal, I submit the order twice because I have two ways to take profits (I have two signal names and I set the stop and profit target twice as well). The following is the contradiction that I see between the trace and the "Trades" result

    Trace: The trace is saying that I submitted two orders -> the orders are filled -> the positions were stopped out -> cancel the profit target orders and the stoploss orders. When I look at the chart, it's actually what happened, although, I don't know why it would cancel stoploss orders as the stoploss were hit.

    However, in the "Trades", I see a different result. It says that the orders were filled -> one order hit the profit target ($0.20), and the second position exited at the stoploss 1.2107 (-$0.20). The analyzer suggests that these two trades were $0 in profit, but it's actually a -$0.40 loss.

    I have attached my trace as well as a screenshot of the "Trades". The trace is fairly short, search for "12/10/2020 5:20:00" for what I described above.

    Please let me know if I am doing something wrong to cause this.
    Thanks!
    Attached Files

    #2
    Hello op1031, thanks for your post.

    The trace orders are generated based on the order actions your strategy is taking. I am seeing the strategy cancel exit orders for positions that are no longer open. You will need to play back the data using the Playback connection to know exactly what the strategy is doing at this time. Again, the trace orders are simply outputting the actions taken from the strategy. Also, test the SampleMACrossover strategy to see if the same problem arises.

    Please let me know if I can assist any further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      The issue is resolved. I was not trading in the primary time frame, so I guess that's why it was giving out unexpected results.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by asd32, Today, 11:45 AM
      0 responses
      1 view
      0 likes
      Last Post asd32
      by asd32
       
      Started by tkaboris, Today, 11:09 AM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by marco231, 03-20-2024, 03:56 PM
      5 responses
      155 views
      0 likes
      Last Post bnoisette  
      Started by tonynt, Today, 08:05 AM
      2 responses
      17 views
      0 likes
      Last Post tonynt
      by tonynt
       
      Started by victor68133, Today, 07:50 AM
      4 responses
      26 views
      0 likes
      Last Post backtester831  
      Working...
      X