NexusFi: Find Your Edge


Home Menu

 





Let's Teach NinjaTrader how to talk


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Zondor with 13 posts (22 thanks)
    2. looks_two ZTR with 4 posts (6 thanks)
    3. looks_3 LukeGeniol with 3 posts (0 thanks)
    4. looks_4 samWest with 3 posts (1 thanks)
      Best Posters
    1. looks_one Fat Tails with 3 thanks per post
    2. looks_two sam028 with 2 thanks per post
    3. looks_3 Zondor with 1.7 thanks per post
    4. looks_4 ZTR with 1.5 thanks per post
    1. trending_up 21,436 views
    2. thumb_up 46 thanks given
    3. group 23 followers
    1. forum 45 posts
    2. attach_file 8 attachments




 
Search this Thread

Let's Teach NinjaTrader how to talk

  #1 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: Ninjatrader®
Broker: CQG, Kinetick
Trading: Gameplay Klownbine® Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731

Windows has text to speech capability that can be used by NinjaTrader. That means that instead of having a bunch of indicators that play back humorous but meaningless and confusing .wav files, your indicators can recite text that can be controlled programatically and/or entered by the user.

As an example, when a trendline gets violated, instead of a doorbell, you could have a synthetic voice saying something like " Rising trendline for CL hyphen zero eight hyphen ten contract crossed at price of seventy six point seven five at nine zero five A M".

For an introduction to this topic see the following NinjaTrader forum thread which is being helpfully updated by Roonius. Suggestion: SAY - speaks provided text - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

I will post some more code showing how to use this and hopefully we can get a discusssion going here about how to enable the functionality and how to use it. I see this as an extremely valuable feature.

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Online prop firm The Funded Trader (TFT) going under?
Traders Hideout
Are there any eval firms that allow you to sink to your …
Traders Hideout
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Futures True Range Report
The Elite Circle
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
60 thanks
Funded Trader platforms
43 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #3 (permalink)
 
ZTR's Avatar
 ZTR 
 
Experience: Advanced
Platform: NinjaTrader7
Broker: Mirus RCG/Zen-Fire
Trading: CL & 6e, looking at ES, ZB and AU again.
Posts: 2,096 since Nov 2009
Thanks Given: 1,099
Thanks Received: 1,393


This uses a mixture of fixed string and variables. It can tell you the name of the instrument and the parameters of the condition. More to come!

R.I.P. Andy Zektzer (ZTR), 1960-2010.
Please visit this thread for more information.
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: Ninjatrader®
Broker: CQG, Kinetick
Trading: Gameplay Klownbine® Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731

If you have a favorite indicator that gives signals based on programmatic conditions such as crossovers, and you want it to give SPOKEN alerts that can include things like the instrument name and a recitation of the condition that was met, let me know and I will consider adding voice alerts to it. Especially if I can see that it's a popular indicator.

I also request that anyone who has any thoughts on this topic post them here. I think this has HUGE potential !!!

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #5 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: Ninjatrader®
Broker: CQG, Kinetick
Trading: Gameplay Klownbine® Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731

On the NT Forums, Roonius posted a sample indicator that gives spoken alerts when two ma's cross over or under each other. I made a few changes to highlight the text to speech capability a little more. Here is the cs file.

Before installing it you must do the following to enable the text to speech capability within Ninjatrader.

  1. Find the file, System.Speech.dll. It is located in C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0. Just note where it is.
  2. Open ANY indicator for editing in the Ninjascript editor. Right click anywhere in the intellisense editor window and select References from the context menu.
  3. Click the add button. A file chooser dialog box will open. Navigate to, and select, the System.Speech.dll file.

Now install the attached cs file. If you set the EMA's to very fast values you will get a lot of crossovers that will trigger the speech alerts.

TimmyB suggested two indicators that are great candidates for voice alerts: The Tick Molester and jtEconNews. I mentioned this to the creators of both of those fine indicators.

Attached Files
Elite Membership required to download: EMACrossOverVoiceAlert.cs
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #6 (permalink)
 
shodson's Avatar
 shodson 
OC, California, USA
Quantoholic
 
Experience: Advanced
Platform: IB/TWS, NinjaTrader, ToS
Broker: IB, ToS, Kinetick
Trading: stocks, options, futures, VIX
Posts: 1,976 since Jun 2009
Thanks Given: 533
Thanks Received: 3,709

If you like inside and outside bars you may want to read about these combinations of inside and [AUTOLINK]outside bar[/AUTOLINK] patterns.

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #7 (permalink)
 zeller4 
Orlando Florida
 
Experience: Intermediate
Platform: NT8
Trading: CL, NQ, ES, RTY
Posts: 477 since Jun 2009
Thanks Given: 1,416
Thanks Received: 404

Hey Zondor,

Thanks for the speech code - so far I can't get it to work with 6.5 - changed GridCategory to just Category.

The error message I get now is:

 
Code
                            
'NinjaTrader.Indicator.MACrossOverVoiceAlert.OnStartUp()'no suitable method found to override
 
lines 43 and 48 
 
Code
protected override void OnStartUp()//line 43
        {
            _speaker = new SpeechSynthesizer();
        }
        protected override void OnTermination()//line48
        {
            _speaker.Dispose();
        }
Will I be able to get this to work with v6.5?

thanks,
Kirk

Reply With Quote
  #8 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629


zeller4 View Post
Hey Zondor,

Thanks for the speech code - so far I can't get it to work with 6.5 - changed GridCategory to just Category.

The error message I get now is:

 
Code
                            
'NinjaTrader.Indicator.MACrossOverVoiceAlert.OnStartUp()'no suitable method found to override
 
lines 43 and 48 
 
Code
protected override void OnStartUp()//line 43
        {
            _speaker = new SpeechSynthesizer();
        }
        protected override void OnTermination()//line48
        {
            _speaker.Dispose();
        }
Will I be able to get this to work with v6.5?

thanks,
Kirk


Check this one for 6.5:
EMACrossOverVoiceAlert6.5.cs

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
Thanked by:
  #9 (permalink)
 
ZTR's Avatar
 ZTR 
 
Experience: Advanced
Platform: NinjaTrader7
Broker: Mirus RCG/Zen-Fire
Trading: CL & 6e, looking at ES, ZB and AU again.
Posts: 2,096 since Nov 2009
Thanks Given: 1,099
Thanks Received: 1,393

Zondor and I only use NT7 and will not be developing anything for 6.5. Some are back compatible and will work 6.5. However, we encourage others still using 6.5 to post speaking modifications here.

Thank you Sam for posting this 6.5 version.

Once the new downloads module is functional I will start collection indicators and posting them.

R.I.P. Andy Zektzer (ZTR), 1960-2010.
Please visit this thread for more information.
Visit my NexusFi Trade Journal Reply With Quote
  #10 (permalink)
 
ZTR's Avatar
 ZTR 
 
Experience: Advanced
Platform: NinjaTrader7
Broker: Mirus RCG/Zen-Fire
Trading: CL & 6e, looking at ES, ZB and AU again.
Posts: 2,096 since Nov 2009
Thanks Given: 1,099
Thanks Received: 1,393


Latest Speaking MACrossover, with text to output window. Which is my preference.

It is also possible to output to the Alerts Window using:

 
Code
                            
Alert("Alert"Priority.HighInstrumentName+": $"+Close[0]+", Rising Above Trendline "+LineNamesoundFileR1Color.BlackColor.Lime); 

 
Code
                            
//====================================================================================
     
void SetSounds()
  {
 
  if (
soundF  ==  soundEnumF.Checkout)   soundFileF="Alert2.Wav";
  if (
soundF  == soundEnumF.Doorbell)   soundFileF="Alert4.Wav";
  if (
soundF  == soundEnumF.Klaxon)    soundFileF="Alert1.Wav";
  if (
soundF  == soundEnumF.Revolver)  soundFileF="Alert3.Wav";
  if (
soundF  == soundEnumF.AustinPowerssoundFileF="austin_mail.Wav";
  if (
soundF  == soundEnumF.GoodBadUgly)  soundFileF="gbu.Wav";
 
  if (
soundR  == soundEnumR.Checkout)  soundFileR="Alert2.Wav";
  if (
soundR  == soundEnumR.Doorbell)  soundFileR="Alert4.Wav";
  if (
soundR  == soundEnumR.Klaxon)   soundFileR="Alert1.Wav";
  if (
soundR  == soundEnumR.RevolversoundFileR="Alert3.Wav";
  if (
soundR  == soundEnumR.AustinPowerssoundFileR="austin_mail.Wav";
  if (
soundR  == soundEnumR.GoodBadUgly)  soundFileR="gbu.Wav";
 
 
 
  }
/// ================================================================================= 

 
Code
                            
//==================================================================================
        #region Properties
 
   
[Description("Sound when price falls below Trendline")]
  [
Category("Settings")]
  [
Gui.Design.DisplayName("Falling Alert Sound")]
 
   public 
soundEnumF SoundF
  
{
   
get { return soundF; }
   
set {  soundF=value;}
  }     
  [
Description("Sound when price rises above Trendline")]
  [
Category("Settings")]
  [
Gui.Design.DisplayName("Rising Alert Sound")]
 
   public 
soundEnumR SoundR
  
{
   
get { return soundR; }
   
set {  soundR=value;}
  }     
 
 
        
#endregion
 
public enum soundEnumR
   
Revolver,Klaxon,Checkout,Doorbell,AustinPowersGoodBadUgly }
 
 public 
enum soundEnumF
   
Revolver,Klaxon,Checkout,Doorbell,AustinPowersGoodBadUgly }
    }


R.I.P. Andy Zektzer (ZTR), 1960-2010.
Please visit this thread for more information.
Attached Thumbnails
Click image for larger version

Name:	Alert.PNG
Views:	429
Size:	95.2 KB
ID:	15627  
Attached Files
Elite Membership required to download: MACrossOverVoiceAlert.cs
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on May 15, 2016


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts