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 > ATM Strategies (Discretionary Trading)

ATM Strategies (Discretionary Trading) Support for Advanced Trade Management, AutoTrail, AutoBreakeven, Stop Strategy and Simulated Stops etc...

Reply
 
Thread Tools Display Modes
Old 08-28-2012, 02:16 PM   #1
pman777
Senior Member
 
Join Date: Nov 2011
Posts: 147
Thanks: 58
Thanked 1 time in 1 post
Default ATM and MarketPosition

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
pman777 is offline  
Reply With Quote
Old 08-28-2012, 02:26 PM   #2
NinjaTrader_JC
NinjaTrader Customer Service
 
NinjaTrader_JC's Avatar
 
Join Date: Mar 2012
Location: Denver, CO
Posts: 1,200
Thanks: 137
Thanked 183 times in 182 posts
Default

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.
NinjaTrader_JC is offline  
Reply With Quote
The following user says thank you to NinjaTrader_JC for this post:
Old 08-28-2012, 02:34 PM   #3
pman777
Senior Member
 
Join Date: Nov 2011
Posts: 147
Thanks: 58
Thanked 1 time in 1 post
Default

thank you ... after I submitted the post I saw that the call I should be using is GetAtmStrategyMarketPosition(orderId) ... I should be OK!
pman777 is offline  
Reply With Quote
Old 08-28-2012, 02:41 PM   #4
NinjaTrader_JC
NinjaTrader Customer Service
 
NinjaTrader_JC's Avatar
 
Join Date: Mar 2012
Location: Denver, CO
Posts: 1,200
Thanks: 137
Thanked 183 times in 182 posts
Default

Hello pman777,

You are quite welcome and as aways, let us know if we can be of further assistance.
NinjaTrader_JC is offline  
Reply With Quote
Old 08-28-2012, 05:56 PM   #5
pman777
Senior Member
 
Join Date: Nov 2011
Posts: 147
Thanks: 58
Thanked 1 time in 1 post
Default

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
pman777 is offline  
Reply With Quote
Old 08-28-2012, 06:34 PM   #6
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,783
Thanks: 160
Thanked 566 times in 557 posts
Default

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.
NinjaTrader_Matthew is offline  
Reply With Quote
The following user says thank you to NinjaTrader_Matthew for this post:
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
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


All times are GMT -6. The time now is 04:43 PM.