NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


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 10-18-2011, 10:25 AM   #1
magic
Junior Member
 
Join Date: Oct 2011
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
Default Code to sound alarm in event of Position Mismatch

I had a 10 point move against my strategy the other day due to a rogue position mismatch.

I'd like to implement an audible alarm to catch such events more quickly.

Unfortunately i'm a complete newbie to NinjaTrader.

Does anyone have some EasyLanguage code they could share that would interface with NinjaTrader to accomplish this, or perhaps some suggestions how to code it?
magic is offline  
Reply With Quote
Old 10-18-2011, 10:35 AM   #2
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

Thanks for the forum post and welcome to the support forum!

Unfortunately I would not be able to assist on any tradestation code to do this however can point you to right direction to get this coding done on your own.

Eseentiall you will want to use this method in TradeStation to get your Account position and then match this agianst your tradestation position.

int NTMarketPosition(stringaccount)
Gets the market position for the selected instrument/account combination. Returns 0 for flat, negative for short and positive for long.


http://www.ninjatrader.com/support/h...functions2.htm


Let me know if I can be of further assistance.
NinjaTrader_Brett is offline  
Reply With Quote
Reply

Tags
alarm, alert, position mismatch

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
code for close position? olingerc Automated Trading 5 04-21-2011 02:01 PM
stop position from code ATI user Version 7 Beta General Questions & Bug Reports 2 03-15-2010 04:28 PM
Position Sizing Custom Code Anagoge Strategy Development 7 05-19-2009 06:55 PM
Pnl Mismatch hemlock SuperDOM and other Order Entry Windows 1 04-07-2009 08:16 AM
How to know in BarUpdate() or other event that code is called at end of backtest? ChiTrader2000 Strategy Development 1 01-20-2009 08:48 AM


All times are GMT -6. The time now is 10:36 AM.