![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Nov 2008
Posts: 576
Thanks: 0
Thanked 1 time in 1 post
|
Hi there,
This is a little bit hard to describe.. hard to replicate. But in my code, I've seen my real-time trading results differ from historical execution... there are trades *not* executing real-time that, according to my historical execution, should have executed. Now, I understand that can often happen. But I thought I was careful to stay away from anything that would make that possible... I'm primarily working in 10m-30m bars. I'm only using OHLC bars, nothing else that should be very tricky. The only thing I can come up with is maybe my use of Median. Median doesn't come from the broker, right? NinjaTrader calculates it off of OHLC? Is it possible that Median could change substantially from time to time...? (I've also seen, I believe, even historical executions change... which really baffles my mind.) |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Median does not change provided your data stays the same. Historical executions will show up as it is calculated out by the data presented on the chart. Real-time trades will never be the identical to historical trades. Historical trades are done against OHLC. Real-time trades are always run through the simulator fill algorithm.
http://www.ninjatrader-support.com/H...sBacktest.html
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 | |
|
Senior Member
Join Date: May 2008
Location: Hartford, CT. USA
Posts: 618
Thanks: 12
Thanked 24 times in 18 posts
|
Quote:
heech, Median is defined as the following for each bar, ( H + L / 2 ). Open and close are not part of the equation. RJay |
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Nov 2008
Posts: 576
Thanks: 0
Thanked 1 time in 1 post
|
Okay, back to the drawing board. I'll double check my parameters to make sure they haven't changed.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Changing historical bar's color | commodity_trader | Miscellaneous Support | 8 | 11-05-2008 02:44 PM |
| Changing Values of running strategy | mjuviler | Strategy Development | 2 | 09-13-2008 04:09 AM |
| RegressionChannel historical values | ATI user | General Programming | 2 | 03-13-2008 06:53 AM |
| Getting Historical Values Using DataSeries.. | nmussa | General Programming | 4 | 10-03-2007 07:47 AM |
| Changing Stop/target values in Control Center while Strategy running | zoltran | Miscellaneous Support | 1 | 04-11-2007 02:40 AM |