Said another way, can I receive events in a strategy and retrieve order information, if that order was not placed within the strategy?
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
Publish manual trades to Twitter
Collapse
X
-
Publish manual trades to Twitter
I'd like to use some library (perhaps this one: http://twittervb.codeplex.com/documentation or some other one) to publish trades I make to twitter as I place them. The thing is, these are manually placed trades in the DOM, not strategy-initiated trades. Is it possible to do something like this with a user-initiated trade?
Said another way, can I receive events in a strategy and retrieve order information, if that order was not placed within the strategy?Last edited by JoshDance; 05-08-2011, 01:16 PM.Tags: None
-
I'm trying now to open the log file. Here is my code:
Code:protected override void Initialize() { Overlay = false; CalculateOnBarClose = false; Print("trying to open: " + path); if (File.Exists(path)) { try { sr = new System.IO.StreamReader(path); sr.ReadToEnd(); } catch (Exception e) {Print("Error reading file.");} } else Print("File does not exist."); }
Code:private string path = Cbi.Core.UserDataDir.ToString() + "log\\log.20110508";
trying to open: C:\Users\Josh\Documents\NinjaTrader 7\log\log.20110508
File does not exist.
But if I copy the exact string from the error message, I can go to notepad and paste it and open the file. Any ideas? This should be simple, not sure what's going on. And yes, the file actually exists and I can open it, and the date is correct.
Comment
-
Interesting thread. Perhaps this is reflecting my lack of knowledge regarding your problem, but wouldn't it be easier to use the SendMail() command and update twitter by email?
Regards,
Comment
-
Originally posted by J_o_s View PostInteresting thread. Perhaps this is reflecting my lack of knowledge regarding your problem, but wouldn't it be easier to use the SendMail() command and update twitter by email?
Regards,
Comment
-
I'm getting the following error:
Error reading file. System.IO.IOException: The process cannot access the file 'C:\Users\Josh\Documents\NinjaTrader 7\log\log.20110509.txt' because it is being used by another process.
Code:sr = new System.IO.StreamReader(path);
Code:fs = new FileStream(path,FileMode.Open,FileAccess.Read,FileShare.ReadWrite); sr = new System.IO.StreamReader(fs);
Last edited by JoshDance; 05-09-2011, 08:36 PM.
Comment
-
Originally posted by dennho View PostCan we see your Twitter feed when you are done? I guess your trades have to be seen by us somehow
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by tkaboris, Today, 05:13 PM
|
0 responses
2 views
0 likes
|
Last Post
by tkaboris
Today, 05:13 PM
|
||
Started by GussJ, 03-04-2020, 03:11 PM
|
16 responses
3,281 views
0 likes
|
Last Post
by Leafcutter
Today, 04:14 PM
|
||
Started by WHICKED, Today, 12:45 PM
|
2 responses
19 views
0 likes
|
Last Post
by WHICKED
Today, 03:36 PM
|
||
Started by Tim-c, Today, 02:10 PM
|
1 response
10 views
0 likes
|
Last Post Today, 02:52 PM | ||
Started by Taddypole, Today, 02:47 PM
|
0 responses
5 views
0 likes
|
Last Post
by Taddypole
Today, 02:47 PM
|
Comment