NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM 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 08-06-2011, 01:28 PM   #1
daven
Senior Member
 
Join Date: Mar 2006
Location: Bellingham, WA , USA
Posts: 329
Thanks: 0
Thanked 11 times in 8 posts
Default Preventing Multiple ATM Entries

I am running an automated strategy which executes an ATM when entry order conditions are met. To prevent having multiple entries occur while I still have an active ATM running I test to see that there are no ATMs active at the time I would be entering another order using the following code:

Code:
&& GetAtmStrategyMarketPosition("BCMTW_ATM_CL") == MarketPosition.Flat)
This is one line embedded along with all the other market entry conditions I am using.

"BCMTW_ATM_CL" is the name of the ATM I invoke when I want to enter the trade. Is this the proper way to test for the presence of an active atm, because it doesn't appear to be working. Because of my market entry conditions it is possible to get multiple entries on the same trend up or down, but since I am using an ATM, and it has a runner in it, I will usually have a single contract running up or down, depending on the trend direction. That is how I want it, but I am getting multiple entries, and it can create too much account risk for the account size I am trading.

Is there a better way to check for the presence of an active ATM before entering a new trade using an atm?

Thanks

DaveN
daven is offline  
Reply With Quote
Old 08-06-2011, 06:04 PM   #2
NinjaTrader_Austin
NinjaTrader Customer Service
 
NinjaTrader_Austin's Avatar
 
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
Default

Dave, have you seen the sample built into NinjaTrader that shows how to track various ATM statistics? You can find it from Tools -> Edit NinjaScript -> Strategy -> SampleAtmStrategy.
NinjaTrader_Austin 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
Multiple entries texasnomad General Programming 4 10-14-2010 11:50 AM
Multiple Entries witn an ATM Strategy daven Automated Trading 10 07-23-2010 01:22 PM
ATM strategy selection modes and multiple entries tomgilb ATM Strategies (Discretionary Trading) 12 10-08-2009 02:26 PM
Chart Trader: Condition based entries, time-axis entries, multiple OCO pairs etc. Elliott Wave Suggestions And Feedback 1 11-25-2008 03:23 AM
multiple entries jrtrader General Programming 1 11-04-2008 12:19 PM


All times are GMT -6. The time now is 01:04 AM.