NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 06-17-2008, 11:05 AM   #1
ATI user
Senior Member
 
Join Date: Apr 2006
Location: , ,
Posts: 1,316
Thanks: 1
Thanked 7 times in 7 posts
Default auto vs manual positions

I am making trades from my strategy and also manually

Is there a way to have my strategy check for positions that are made manually?...or can it only check the status of positions originated by the strategy?

I would like to check for any positions in the account so the strategy will not enter a new trade if I have a manual trade on.

Would this code do the trick for instance?

protected override void OnPositionUpdate(IPosition position)
{
if (position.MarketPosition == MarketPosition.Flat)
{
// Do something
}
}

Thanks
ATI user is offline  
Reply With Quote
Old 06-17-2008, 11:12 AM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

>> Is there a way to have my strategy check for positions that are made manually?
Unfortunately not at this time. We'll consider improving the "sync strategy to live account" with NT7 though.
NinjaTrader_Dierk 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
Request: Auto Connect on Startup and auto restart when connection down skynetman Suggestions And Feedback 24 03-07-2009 11:25 AM
I copied this out of the NT manual and put it into Tradestation. sp139214 Automated Trading 3 05-22-2008 10:44 PM
Strategies and manual orders tecmisc1 Strategy Development 1 04-10-2008 12:01 PM
Limitis of Ninjascript? Manual? fliesch Indicator Development 2 03-16-2006 09:50 PM
User Manual PDF Format. Ripcat Miscellaneous Support 1 09-26-2005 09:03 AM


All times are GMT -6. The time now is 08:55 PM.