NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 03-29-2011, 10:14 AM   #1
skyholder84
Member
 
Join Date: Sep 2010
Posts: 84
Thanks: 0
Thanked 0 times in 0 posts
Default Email Notification Frequency Control

Hi,

A few weeks into Live trading, and everything's running smoothly.

I have just one last grouse, which is the system I have set up to notify myself each time a strategy triggers.

Each time my strategy finds that conditions match, it

1) Enters a trade and
2) Sends an mail

Thanks to the "Entries per direction" function, my strategy won't go haywire and multiply my risk infinitely. Unfortunately, I can't seem to achieve the same outcome with emails.

Every time the strategy conditions fall into place, I receive tonnes of emails at one minute intervals. And I can understand why (because the trade conditions are still valid!), but I don't know how I can control this! Any ideas?
skyholder84 is offline  
Reply With Quote
Old 03-29-2011, 10:28 AM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hello skyholder84,

The control for this must be custom coded, commonly through bool flags. Brief example (pseudo code, not everything will compile) of this below:




Code:
private bool okToEmail = true; //declare in variables region

if (tradeConditions)
{
EnterLong();

if(okToEmail)
{
SendMail();
okToEmail = false;
}
}

if (Position.MarketPosition == MarketPosition.Flat) //resets bool back to true when you're flat
okToEmail = true;
Last edited by NinjaTrader_RyanM; 03-29-2011 at 10:30 AM.
NinjaTrader_RyanM is offline  
Reply With Quote
Old 03-29-2011, 10:34 AM   #3
skyholder84
Member
 
Join Date: Sep 2010
Posts: 84
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks for the advice & quick reply! It'll be a bit of a nightmare to implement this, but I'll work on it.
skyholder84 is offline  
Reply With Quote
Old 03-29-2011, 10:39 AM   #4
skyholder84
Member
 
Join Date: Sep 2010
Posts: 84
Thanks: 0
Thanked 0 times in 0 posts
Default

On this issue, I would like to make a new suggestion for possible implementation in upcoming versions.

Perhaps there could be an easier way to specify the number of mails which go out? Something like the entriesperdirection function which ensures that only one trade is made. In this case, the control would ensure that only one email goes out per trigger event.

Just trying my luck. Thanks!
skyholder84 is offline  
Reply With Quote
Old 03-29-2011, 11:14 AM   #5
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Thank you for the feature request. We have added it to our internal tracking system with ID: #811
NinjaTrader_RyanM is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sms/email notification xasou Strategy Development 10 02-20-2011 06:01 PM
One paranoid thought: protecting our code and automatic email notification TakisTakis Version 7 Beta General Questions & Bug Reports 3 07-09-2010 06:42 AM
Notification of user cancel symphys Strategy Development 3 06-17-2010 08:35 AM
Scroll/Resize Notification aslane Version 7 Beta General Questions & Bug Reports 2 01-25-2010 09:13 AM
Tradestation email orders-email functionality jsl12 Automated Trading 5 09-13-2008 03:28 PM


All times are GMT -6. The time now is 09:17 AM.