Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Export last data to file
Collapse
X
-
Hi curious, welcome to our support forums! Yes, you would need custom coding to write this to a txt file - http://www.ninjatrader-support2.com/...ead.php?t=3477
For Level1 data you can work with OnMarketData() - http://www.ninjatrader-support.com/H...arketData.html
-
As I understand for level1 data I can use both OnMarketData() and OnBarUpdate() methods. What is the difference between them for bid/ask data export? Almost every bid/ask change brings OnBarUpdate also. Am I right? Or there is any difference which I have not considered?
Comment
-
each bid/ask change doesn't necessarily mean OnBarUpdate is called. for example, if someone canceled an order right at the ask, the ask would drop but there would be no reported executions. see one of my older posts to get a feel for what can be done with last/bid/ask data.. http://www.ninjatrader-support2.com/...ad.php?t=10296Originally posted by curious View PostAs I understand for level1 data I can use both OnMarketData() and OnBarUpdate() methods. What is the difference between them for bid/ask data export? Almost every bid/ask change brings OnBarUpdate also. Am I right? Or there is any difference which I have not considered?
Comment
-
Going back to your example. You offer to use the File.WriteAllLines() method (or I can use File.WriteAllText() instead), but they work only with string data type. Is there any method to output doubles (bid, ask, etc.) directly or I have to use Convert.ToString() function before and File.WriteAllLines()/File.WriteAllText() then?Originally posted by NinjaTrader_Bertrand View PostYes, you would need custom coding to write this to a txt file - http://www.ninjatrader-support2.com/...ead.php?t=3477
Comment
-
Well, it doesn't work w/o .ToString(). Returns 2 errors:Originally posted by NinjaTrader_Ben View PostHello,
If I recall correctly, they should write fine. Try it, if it does not work you will need use .ToString()
The best overloaded method match for 'System.IO.File.WriteAllText(string,string)' has some invalid arguments
Argument '2': cannot convert from 'double' to 'string'
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
162 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
313 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
245 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
350 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
179 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment