(Disclaimer: Not supported code by NinjaTrader)
I am in the process of coding an indicator to provide voice commands (via headset mic) to ChartTrader (indicator). I don't like using the mouse actually, to make trades.
(I am using C# code snippets I found on the web)
Even without custom code, one can navigate and push buttons on Ninja Trader, under Windows 8, with Voice Recognition on...but it does not work well for several reasons. Thus this effort so I have full control over what happens.
It works! You can verify by loading it on a chart and opening the Output window. Then talking into the mic.
Voice Commands that it recognizes (these are not linked to actions in ChartTrader at the moment. This code is just to recognize the words.
LONG MARKET / BID / ASK (three different commands)
SHORT MARKET / LONG /ASK
REVERSE
GET OUT
TOGGLE OCO
and any others you might want.
But there are two issues to solve that perhaps a C# guru can fix.
Attached is the .cs file. You will need to install the Voice Recognition components of .NET 3.5 and then set up references them in NinjaTrader code editor.
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
Comment