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)
Ok, guys, I have been able to get an indicator to process voice commands. I've attached the cs file because I have a lot of references for other stuff on my system that probably would stop a zip import on your system.
possibly you might need to install the .NET speech recognition references on your system. At the moment, I don't remember how I did that...
It seems there are just two problems remaining. there are print commands to trace what is happening.
1) the indicator will process the voice command only once. then I have to reload the indicator before it will listen again
2) the indicator is actively listening even if the chart it is on is not in focus....it needs to only listen when the panel/chart it is on is in focus so that it does not process commands when the user is not looking at the chart
Well, if anyone knows how to solve these two items, it seems those of us who want to talk to Ninja instead of having our hand on the mouse, this is one step closer.
now I need to find a way to know when the chart is active .... then I will try to start and stop the listener thread. I'll start the thread when the chart has focus and stop it when the chart looses focus...but so far I'm not having luck with the GOTFOCUS and LOSTFOCUS events for ChartControl.
ChartControl.ChartPanel.GotFocus += new EventHandler (ThisGotFocus);
ChartControl.ChartPanel.LostFocus += new EventHandler (ThisLostFocus);
but, now I'm not sure about starting a Thread (for the voice recognition) inside Ninja, if it is going to cause problems.
Because it seems when I press F5 (to reload the indicator) the existing thread is not terminated and a duplicate is started...not sure but it seems to be this way, and if so this is going to cause problems.
this is skeleton code for command processing...not a finished product...for other coders to play with
the indicator will only process commands when the Chart Panel it is on has focus. This means the indicator can be on many charts and the voice commands will only be processed on the Chart that has focus.