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 helpwanted, Today, 03:06 AM
|
1 response
16 views
0 likes
|
Last Post Today, 03:35 AM | ||
Started by Brevo, Today, 01:45 AM
|
0 responses
11 views
0 likes
|
Last Post
by Brevo
Today, 01:45 AM
|
||
Started by aussugardefender, Today, 01:07 AM
|
0 responses
6 views
0 likes
|
Last Post Today, 01:07 AM | ||
Started by pvincent, 06-23-2022, 12:53 PM
|
14 responses
244 views
0 likes
|
Last Post
by Nyman
Today, 12:47 AM
|
||
Started by TraderG23, 12-08-2023, 07:56 AM
|
9 responses
387 views
1 like
|
Last Post
by Gavini
Today, 12:29 AM
|
Comment