PriceVoice

This is a demonstration indicator to demonstrate the use of Microsoft speech within Ninjascript. The indicator will automatically install a reference to the speech libraries.

As a demonstration, the indicator will announce a new bar, announce a doji bar, announce EMA trade direction and if the moving average gap is increasing or decreasing. This is just a demonstration only. Please test on a 1‐minute bar type.

The code is commented to assist with understanding the requirements. Here are the critical requirements and notes that concern performance:

1) Must have a reference to C:Program FilesReference AssembliesMicrosoftFrameworkv3.0System.Speech.dll by installing this indicator, this reference will automatically be added to your NinjaTrader references when you install this indicator.

2) In state,SetDefaults, IsSuspendedWhileInactive must be set to false , otherwise, if you minimize or make the chart inactive, all of the voices announcements would queue up causing all of the announcements to be read when the chart is again active.

3) *** Must have the voice run only when data is in State.RealTime, otherwise the historical announcements will queue up.

The method and properties related to speech can also be used in strategies.

Created By NinjaTrader_Paul
NinjaTrader Version 8
File Size 5.5 KB
Create Date 07/31/2018
# of Downloads 462

Importing to NinjaTrader 8 is Easy!

To import your 3rd party app or add-on to NinjaTrader, simply follow these 3 steps:

  1. Download the app or add-on file to your desktop
  2. From the NinjaTrader Control Center window, select the menu Tools > Import > NinjaScript Add-On…
  3. Select the downloaded file from your desktop

Questions?

Visit the NinjaScript File Sharing discussion in the NinjaTrader user forum to interact with fellow traders and the NinjaTrader support team.