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

Real Time Trades vs not real time.

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

    Real Time Trades vs not real time.

    Im running into an issue where live trading doesnt line up with historical trades. When I load a strategy, Im seeing one result from previous trades that would have been taken but when its the strat is running and it catches a trade in real time, the result is completely different. Photos below are of the same trade but the first one is when i caught it real time, i reloaded the strategy and the second pic is what it shows now.

    Realtime trades (First picture), the condition is met and the short trades are taken at the top of the bar and exited at the top of a bar.

    Historical trades (Second Picture), the condition is met and the short takes place at the top of the bar and exit at bottom of a bar.

    I ideally want the second result if possible. The strat is set to onbarclose. Can someone help me understand what is going on, and is there a way to get the disired result with live trading as historical?

    Click image for larger version

Name:	image.png
Views:	54
Size:	78.3 KB
ID:	1237597Click image for larger version

Name:	image.png
Views:	47
Size:	62.9 KB
ID:	1237598​​​
    Attached Files

    #2
    Hello amigatlin,

    From the image it looks like you may be using a renko, if so that won't be accurate toward realtime when backtesting. Renko require realtime data to correctly build bars so the backtest will be different. You can use the playback connection to forward test renko which would provide more accurate results compared to realtime.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    3 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    11 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    12 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,982 views
    3 likes
    Last Post jhudas88  
    Working...
    X