Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
dont get by what you mean by poll, but the events raised when any orders are executed from the chart trader are all private and thus internal to NT. NT.Cbi.Globals.Accounts[].Ordres gives you the access to the order collections. using a timer you can check the same after certain interval (say after every minute or whatever) and act accordingly.
alternatively you can create a strategy, which essentially replicate the chart trader (there are many samples here at futures.io (formerly BMT)) and then use the OnOrderUpdate or OnExecution events to tweet.
By polling I mean you have to poll, or check every so often, as you suggest you will have to do. The opposite is what you describe, an event which triggers and notifies, thus eliminating the need to manually poll after a timeout. Really what I have is quite sufficient for my needs, it's easier than having to go through a queue of orders I expect, I just read the log file line and parse it, and it's done. It goes against my desire to write perfect code, but it does the job with probably less logic and does what it needs to do. It's not production quality but it doesn't have to be. Often simpler is better, and parsing a text string is good enough, and the work has already been done
Thank you for your suggestions and when I have some down time I may very well revisit this and make it a bit more robust, and I will likely use your suggestions!
the best option of what you are doing is creating an chart trader replica in a strategy. that way you dont have to "poll" and you can take advantage of the events.
checking the orders is a better way than reading the log files. if the log file is being used by nt, then you can have exceptions. if the log file is too big, then that will also be an issue. just some random thoughts. best of luck on whichever path you take.
I haven't looked at the API's yet so don't know if it's on the minutes, hours or days list, any pointers for easiest C# way to go appreciated, it should fit well with my current futures.io (formerly BMT) and local logging schemes. Let me know if you go for it, cheers.