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!
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
NinjaTrader
The unpredictable behavior of a function LastPlayback
Collapse
X
-
Hello vladko,
I have received a tracking ID for this behavior.
For future reference, this item where bars building from data received from API -> LastPlayback is building inconsistenly is being tracked with ID #NTEIGHT-11580.
Please wait for a future version of NinjaTrader 8 to be released before checking the release notes for this item.
-
Hello vladko,
There has been no update from development at this time.
We appreciate your patience.
Leave a comment:
-
Hello vladko,
Thanks for your note.
I was able to reproduce the behavior.
Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.
The issue appears to be how NinjaTrader is generating the time based bars and not with the LastPlayback function directly.
Using a 50 Tick chart, the bars are always exactly the same.
I'm wondering if this is related to the limitation with timestamps and second granularity that was improved to millisecond granularity in NinjaTrader 8.
I'm asking our development about this and I will post once I have more information.Last edited by NinjaTrader_ChelseaB; 04-13-2017, 11:07 AM.
Leave a comment:
-
Of course it work's good with
Code:DateTime.Now.ToString("yyyyMMddHHmmss")
Code:DateTime dt = new DateTime(2017, 4, 11, 9, 0, 0); for (int i = 0; i < 300; i++) ncl.LastPlayback("$EURUSD", 10 + i * 0.0001, 1,dt.AddSeconds(i).ToString("yyyyMMddHHmmss"));
Leave a comment:
-
Hello vladko,
I've taken some time to create an external test script and test the LastPlayback method from the API interface.
I was not able to reproduce any issues and this does appear to be working as expected.
Below is a link to a video of the test.
Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.
Please let me know if I have performed this test correctly.
Leave a comment:
-
Hello vladko,
Are you writing a NinjaScript or are you attempting to call data through the NinjaTrader API from your own external program?
Leave a comment:
-
Originally posted by NinjaTrader_ChelseaB View PostHello vladko,
ncl.LastPlayback is not a documented NinjaTrader method.
Is this a method that was written by you?
Are you attempting to read values from a text file?
Are you trying to print the open, high, low, and close?
Try:
Code:Print(string.Format("{0} | Open: {1}, High: {2}, Low: {3}, Close: {4}", Time[0], Open[0], High[0], Low[0], Close[0]));
Quote from Help:
int LastPlayback(string instrument, double price, int size, string timestamp)
Sets the last price and size for the specified instrument for use when synchronizing NinjaTrader playback with an external application playback. A return value of 0 indicates success and -1 indicates an error. The timestamp parameter format is "yyyyMMddhhmmss".
Leave a comment:
-
Hello vladko,
ncl.LastPlayback is not a documented NinjaTrader method.
Is this a method that was written by you?
Are you attempting to read values from a text file?
Are you trying to print the open, high, low, and close?
Try:
Code:Print(string.Format("{0} | Open: {1}, High: {2}, Low: {3}, Close: {4}", Time[0], Open[0], High[0], Low[0], Close[0]));
Leave a comment:
-
The unpredictable behavior of a function LastPlayback
Code:foreach (string ss in tmp) { string[] spl = ss.Split(';'); if (ss.Length > 20) { double o = Convert.ToDouble(spl[1].Replace('.', ',')); double h = Convert.ToDouble(spl[2].Replace('.', ',')); double l = Convert.ToDouble(spl[3].Replace('.', ',')); double c = Convert.ToDouble(spl[4].Replace('.', ',')); ncl.LastPlayback("$EURUSD", o, 1, Convert.ToDateTime(spl[spl.Length - 2]).ToString("yyyyMMddHHmmss")); ncl.LastPlayback("$EURUSD", h, 1, Convert.ToDateTime(spl[spl.Length - 2]).ToString("yyyyMMddHHmmss")); ncl.LastPlayback("$EURUSD", l, 1, Convert.ToDateTime(spl[spl.Length - 2]).ToString("yyyyMMddHHmmss")); ncl.LastPlayback("$EURUSD", c, 1, Convert.ToDateTime(spl[spl.Length - 2]).ToString("yyyyMMddHHmmss")); }
All the candles should be with volume 4 but some of them (randomly) have a volume 3,5,8
Data candles fit on top of each otherLast edited by vladko; 04-09-2017, 03:51 PM.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by adeelshahzad, Today, 11:49 AM
|
1 response
3 views
0 likes
|
Last Post Today, 11:56 AM | ||
Started by spottysallrite, Today, 11:31 AM
|
1 response
4 views
0 likes
|
Last Post Today, 11:43 AM | ||
Started by johnMoss, 03-04-2024, 01:53 PM
|
2 responses
32 views
0 likes
|
Last Post
by Overnhou
Today, 11:21 AM
|
||
Started by Padan, Today, 02:02 AM
|
5 responses
17 views
0 likes
|
Last Post Today, 11:14 AM | ||
Started by Lele2k24, Yesterday, 11:24 AM
|
8 responses
28 views
0 likes
|
Last Post
by Lele2k24
Today, 11:00 AM
|
Leave a comment: