![]() |
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
|
|||||||
| 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. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Mar 2006
Location: Bellingham, WA , USA
Posts: 329
Thanks: 0
Thanked 11 times in 8 posts
|
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)
"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 |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
|
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.
Austin
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |