NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Charting

Charting Support for NinjaTrader Advanced Charting.

Reply
 
Thread Tools Display Modes
Old 01-13-2012, 08:51 AM   #1
redartajnin
Junior Member
 
Join Date: Dec 2011
Posts: 25
Thanks: 0
Thanked 0 times in 0 posts
Default clarify historical data and playback

can someone please clarify the following:

[1] in historical import/upload for tick data, you can not specify if a tick is a bid or ask

[2] in playback via the DLL, you can specify if a tick is a bid or ask (or last) by calling respective functions

[3] there is no way to merge the playback into historical?
redartajnin is offline  
Reply With Quote
Old 01-13-2012, 09:27 AM   #2
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello redartajnin,
Thanks for your post and I am happy to assist you.

1. Suffix your txt file with .Last or .Ask or .Bid to specify what data you want to import. For example if you want to import tick data for bid, and your instrument is ES 03-12, then the file name should read ES 03-12.Bid.txt
2. There are specific fuctions for Bid/Ask/Last calls. Please refer here for more http://www.ninjatrader.com/support/h...?functions.htm. Unfortunately the dll interface is not supported.
3. By merging if you mean to say that you want to save the data to the historical database, then yes the same can be done. In Control Center menu bar, go to Tools>Option, select the Data tab, and check Save chart data as historical.

Please do let me know if I can assist you any further.
NinjaTrader_Joydeep is offline  
Reply With Quote
Old 01-13-2012, 09:57 AM   #3
redartajnin
Junior Member
 
Join Date: Dec 2011
Posts: 25
Thanks: 0
Thanked 0 times in 0 posts
Default

Many thanks for that, now two more questions,

[1] can you playback the historical data as well?
[2] if the data is stored in NT already what happens if it is playback via the DLL (save chart data as historical is turned on), will it replace the stored historical by the playback?
redartajnin is offline  
Reply With Quote
Old 01-13-2012, 11:16 AM   #4
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello redartajnin,
1. Yes you can playback the historical data. To do this you would use the following method int LastPlayBack() which you can find information on that here:

http://www.ninjatrader.com/support/h.../functions.htm

2. Current days data will not be replaced, and will append with the existing data. I would not recommend merging existing data with LastPlayBack and would choose one way or the other for backfilling your historical data.

Please let me know if I can be of further assistance
NinjaTrader_Joydeep is offline  
Reply With Quote
Old 08-05-2012, 01:11 AM   #5
shalabh
Junior Member
 
Join Date: Aug 2012
Posts: 15
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Joydeep View Post
Hello redartajnin,
1. Yes you can playback the historical data. To do this you would use the following method int LastPlayBack() which you can find information on that here:

http://www.ninjatrader.com/support/h.../functions.htm

2. Current days data will not be replaced, and will append with the existing data. I would not recommend merging existing data with LastPlayBack and would choose one way or the other for backfilling your historical data.

Please let me know if I can be of further assistance
Dear Sir,

What exactly is the function of LastPlayBack function.

Further, you mentioned that you would choose one way or the other for backfilling your historical data. One way is using historical data panel and importing data manually. What are the other ways? Please help.
shalabh is offline  
Reply With Quote
Old 08-06-2012, 04:44 AM   #6
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello shalabh,
LastPlayback append historical data.
Quote:
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".
http://www.ninjatrader.com/support/h...?functions.htm


The other way of backfilling historical data is by using the import feature (manually though). Please refer to our help guide to know more about it http://www.ninjatrader.com/support/h...?importing.htm
NinjaTrader_Joydeep is offline  
Reply With Quote
Old 08-06-2012, 07:08 AM   #7
shalabh
Junior Member
 
Join Date: Aug 2012
Posts: 15
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Joydeep View Post
Hello shalabh,
LastPlayback append historical data.

http://www.ninjatrader.com/support/h...?functions.htm


The other way of backfilling historical data is by using the import feature (manually though). Please refer to our help guide to know more about it http://www.ninjatrader.com/support/h...?importing.htm
Thanks for reply.

It's Gr8. i also thought that but.....

I am trying to append the historical data using LastPlayBack. It is sending the price and updating them also but all at the current time. So i get a long candle there with day high as high and day low as low. What may be the error in code. Any suggestions please.

Thanks.
shalabh is offline  
Reply With Quote
Old 08-06-2012, 08:01 AM   #8
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello shalabh,
Unfortunately that is expected.

Take a scenario for example, the current PC time is 10 AM and the last bar in the chart is timestamped at 8 AM.

If you append any data using the last playback function then please make sure the data is greater than 8AM. If you append any data prior 8AM (say you are trying to append data from 6AM) then the data from 6AM to 8AM will be collected by the Last bar in the chart and you will have one big bar.

In such scenario you have to manually import the data using the Export feature.
NinjaTrader_Joydeep is offline  
Reply With Quote
Old 08-06-2012, 09:07 AM   #9
shalabh
Junior Member
 
Join Date: Aug 2012
Posts: 15
Thanks: 0
Thanked 0 times in 0 posts
Default

Oh...

That means that i can only backfill data between the last bar of existing data and the current system time. But in case i have data upto 8AM and then 9AM to 10AM. Now if i want to backfill missed data i.e. between 8AM and 9AM then it is not possible using LAstPlayBack. Hope my understanding is right....

Now i am presently using manual import of data using history manager and it is working fine. Is there anyway to do that using any function of NT from my code itself. If not then please try to add it in your next version.

Thanks for support and quick replies...
shalabh is offline  
Reply With Quote
Old 08-06-2012, 09:11 AM   #10
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello shalabh,
Yes, your understanding is right.

Unfortunately there are no supported codes to automate the import feature.

I will however send your feature request to development for future consideration.
NinjaTrader_Joydeep is offline  
Reply With Quote
Old 08-07-2012, 10:27 AM   #11
shalabh
Junior Member
 
Join Date: Aug 2012
Posts: 15
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Joydeep View Post
Hello shalabh,
Yes, your understanding is right.

Unfortunately there are no supported codes to automate the import feature.

I will however send your feature request to development for future consideration.
Thanks... Hopefully we will have something in next update...

Now i am facing another issue i.e. related to volume. If in any tick volumes are more than 33000 then NT then LastPlayBack is creating error. I think it is because this functions accept Integer as Volume/Size. But for small value future contracts, even if 4 lots are traded then volume becomes 400000. Is there any solution to this issue?

Thanks.
shalabh is offline  
Reply With Quote
Old 08-07-2012, 11:19 AM   #12
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello shalabh,
To assist you further can you please send a toy code* replicating the behavior to support[AT]ninjatrader[DOT]com

Please append Attn:Joydeep in the subject line of the email and give a reference of this thread in the body of the email.

I look forward to assisting you further.

*The "toy" just means something that is a stripped down version that isn't necessarily the whole logic. It makes things easier to rout out.
NinjaTrader_Joydeep is offline  
Reply With Quote
Old 08-07-2012, 12:03 PM   #13
shalabh
Junior Member
 
Join Date: Aug 2012
Posts: 15
Thanks: 0
Thanked 0 times in 0 posts
Default

Hi Joydeep,

It is simple. I can write here it self ..

I=LastPlayBack("ABB",345.50, 45000, "20120807131501")

This creates error. but this one works fine

I=LastPlayBack("ABB",345.50, 31000, "20120807131501")

Thanks.
shalabh is offline  
Reply With Quote
Old 08-07-2012, 12:21 PM   #14
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello shalabh,
Unfortunately I cannot replicate it and I can get the correct volume.

To assist you further may I know is your PC set to an non-US regional settings?
Attached Images
File Type: png Pic1.png (79.6 KB, 12 views)
NinjaTrader_Joydeep is offline  
Reply With Quote
Old 08-07-2012, 12:23 PM   #15
shalabh
Junior Member
 
Join Date: Aug 2012
Posts: 15
Thanks: 0
Thanked 0 times in 0 posts
Default

yes. It is set to Indian settings.
shalabh is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Playback historical data TradingDreamer Miscellaneous Support 2 08-29-2011 04:05 PM
Clarify Ray's note - do not use Zen-Fire 64 bit pfw_trader Version 7 Beta General Questions & Bug Reports 1 11-04-2010 02:42 PM
CalculateOnBarClose=true vs False. Please clarify. sudharsanv Strategy Development 3 02-10-2010 11:44 AM
Req: Record/Playback of Sim Data tazatek Suggestions And Feedback 1 11-18-2009 11:10 AM
Importing data for playback? maxpi Charting 1 05-12-2008 07:32 PM


All times are GMT -6. The time now is 07:06 AM.