![]() |
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
|
|||||||
| ATM Strategies (Discretionary Trading) Support for Advanced Trade Management, AutoTrail, AutoBreakeven, Stop Strategy and Simulated Stops etc... |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Nov 2011
Posts: 147
Thanks: 58
Thanked 1 time in 1 post
|
Hi ... I have 2 questions:
1) I am executing an ATM strategy from within my ninjascript code. When it's active (ie, I'm in a trade) my Position.MarketPosition call says it's "Flat" when in fact I'm "Long". What am I doing wrong ... how do I check my current trade position using an ATM strategy? 2) If an ATM strategy is executing and I issue an "ExitLong()" or "ExitShort()", will it cancel the ATM strategy? thanks
|
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Mar 2012
Location: Denver, CO
Posts: 1,200
Thanks: 137
Thanked 183 times in 182 posts
|
Hello pman777,
1. Could you either post in the forums or send an email to support [at] ninjatrader [dot] com (In the body put ATTN: JC with reference to this thread) with a copy of a toy* of your NinjaScript code replicating the behavior so that I may be of further assistance. 2. Using an ATM Strategy you would want to use the AtmStrategyClose() method to exit target orders and positions. See the following link for more information about the AtmStrategyClose() method. http://www.ninjatrader.com/support/h...ategyclose.htm Happy to be of further assistance. *Toy - a basic version of code that is not necessarily the entire logic/conditions. Making it easier to identify lines of code.
JC
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_JC for this post: |
|
|
|
#3 |
|
Senior Member
Join Date: Nov 2011
Posts: 147
Thanks: 58
Thanked 1 time in 1 post
|
thank you ... after I submitted the post I saw that the call I should be using is GetAtmStrategyMarketPosition(orderId) ... I should be OK!
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Mar 2012
Location: Denver, CO
Posts: 1,200
Thanks: 137
Thanked 183 times in 182 posts
|
Hello pman777,
You are quite welcome and as aways, let us know if we can be of further assistance.
JC
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Nov 2011
Posts: 147
Thanks: 58
Thanked 1 time in 1 post
|
Actually, I do have another question. When I run my strategy in regular trading mode (ie, issue trades via EnterLong()/EnterShort() ) my chart looks fine. I get my trades plotted as expected. However, when I run it in ATM Strategy mode, my executed trades are not plotted. I'm running in 'real time' using market replay, so it doesn't seem to be a historical data issue. Any guidance is appreciated. tx
|
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,783
Thanks: 160
Thanked 566 times in 557 posts
|
Hello,
The Strategy methods and ATM Strategy methods are not the same. A strategy will only show trades that were made from Strategy methods. If you are calling ATM Strategy methods from your NinjaScript strategy, the chart with the strategy will not show these trades. You would need to open a second chart and set Chart Trader to the account you are running the strategy and it will show the orders generated by the ATM Strategy.
Matthew
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Matthew for this post: |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Position.MarketPosition == MarketPosition.Long (doesnt work) | davedxb | Automated Trading | 5 | 09-06-2011 08:59 AM |
| MarketPosition.Flat | ScottB | ATM Strategies (Discretionary Trading) | 2 | 07-26-2010 09:37 AM |
| MarketPosition question | tradervick | Strategy Development | 3 | 07-30-2008 10:37 AM |
| MarketPosition question | effebi | Strategy Development | 10 | 05-19-2008 04:21 AM |
| use Positions[0].MarketPosition | Folls | Strategy Development | 2 | 10-17-2007 06:19 AM |