NinjaTrader Support Forum  

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 09-22-2007, 01:20 PM   #1
daven
Senior Member
 
Join Date: Mar 2006
Location: Bellingham, WA , USA
Posts: 331
Thanks: 0
Thanked 11 times in 8 posts
Default Initiating ATM Strategies in a NinjaScript

I'm wondering about the interaction between a named ATM Strategy (Call it "ATM1") and the DOM when it is invoked in a NinjaScript strategy. In order for it to work does the DOM have to have the same ATM strategy displayed (on the proper instrument of course) or does it work anyway, but if not tracking it in the DOM you can't see it? If it does have to be on the DOM to work, do the properties setting have to be set in a particular way?
daven
daven is offline  
Reply With Quote
Old 09-22-2007, 06:31 PM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
Default

No, the DOM is independant. The ATM strategy is its own entity that can be viewed through a SuperDOM window, Chart Trader or any other order entry window.
NinjaTrader_Ray is offline  
Reply With Quote
Old 09-22-2007, 08:50 PM   #3
daven
Senior Member
 
Join Date: Mar 2006
Location: Bellingham, WA , USA
Posts: 331
Thanks: 0
Thanked 11 times in 8 posts
Default ATM Strategies and NinjaScript

When an ATM strategy is launched from an NT Script, is all control passed to the ATM and retained as long as there is a position open? I have some checks that I use to reverse a position if the market suddenly reverses but they don't appear to be working in the strategy. That's certainly okay but I will have to rework my approach knowing that all control resides in the ATM while the position is open.
By the way. Thank you and your team for all your help. I never dreamed I good actually get this working but I now have a strategy running, launching an ATM, and taking control back when the ATM closes. It is really really cool, and C# isn't quite as intimidating as it was two weeks ago.
Thank you most sincerely for all the help you provide.
daven
daven is offline  
Reply With Quote
Old 09-22-2007, 10:55 PM   #4
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

Hi daven,

Glad to hear you are conquering the C# beast. You can close ATM strategies through NinjaScript if you deem it necessary too. You can do so through the use of AtmStrategyClose().
NinjaTrader_Josh is offline  
Reply With Quote
Old 09-23-2007, 07:38 PM   #5
jstockman
Member
 
Join Date: Aug 2007
Location: California
Posts: 41
Thanks: 0
Thanked 0 times in 0 posts
Default C#

Quote:
Originally Posted by daven View Post
When an ATM strategy is launched from an NT Script, is all control passed to the ATM and retained as long as there is a position open? I have some checks that I use to reverse a position if the market suddenly reverses but they don't appear to be working in the strategy. That's certainly okay but I will have to rework my approach knowing that all control resides in the ATM while the position is open.
By the way. Thank you and your team for all your help. I never dreamed I good actually get this working but I now have a strategy running, launching an ATM, and taking control back when the ATM closes. It is really really cool, and C# isn't quite as intimidating as it was two weeks ago.
Thank you most sincerely for all the help you provide.
daven
daven,

What are the sources you are using to learn C#? I am a little overwhelmed.

Regards,

jstockman
jstockman is offline  
Reply With Quote
Old 09-24-2007, 09:13 AM   #6
daven
Senior Member
 
Join Date: Mar 2006
Location: Bellingham, WA , USA
Posts: 331
Thanks: 0
Thanked 11 times in 8 posts
Default Sources for Learning C#

Quote:
Originally Posted by jstockman;

What are the sources you are using to learn C#? I am a little overwhelmed.

Regards,

jstockman


I bought a couple of books, "Build a Program Now" Microsoft Visual C#2005 Express Edition by Patrice Pelland, and "Microsoft Visual C# 2005 in 24 hours" by James Foxal. The second book is a SAMS book. You can download a free copy of C#2005 Express Edition from the downloads page at microsoft. There is also a very extensive tutorial on Visual#2005 on the Microsoft website, http://msdn2.microsoft.com/en-us/vstudio/Aa700773.aspx. Go through the learning videos at the link above. You may not need the books at all, though I personally like to read something on paper, and both books take you through a process of developing software that actually does something.

The one thing to keep in mind, be absolutely scrupulous about making sure you have the proper things in () and in {}. If you keep good track of those elements you will prevent most of the problems with programming. Its kind of simplistic, and frankly the error messages one gets from the compiler are not terribly helpful, but I found that if I looked real closely at the line the error message first referenced, I generally found I was missing a ( or), or a { or }, or I misspelled a variable. I also went through the NT tutorials multiple times, and of course, asked a lot of dumb questions in the forum. The guys at NT are incredibly helpful, as long as you don't ask them to write your code for you, or tell you what is wrong with a long piece of code. They just don't have that kind of time and we want them working on enhancements anyway.
Hope it helps.
daven
Last edited by daven; 09-24-2007 at 09:22 AM. Reason: Left out quote
daven is offline  
Reply With Quote
Old 09-24-2007, 07:13 PM   #7
jstockman
Member
 
Join Date: Aug 2007
Location: California
Posts: 41
Thanks: 0
Thanked 0 times in 0 posts
Default Homework

Quote:
Originally Posted by daven View Post
I bought a couple of books, "Build a Program Now" Microsoft Visual C#2005 Express Edition by Patrice Pelland, and "Microsoft Visual C# 2005 in 24 hours" by James Foxal. The second book is a SAMS book. You can download a free copy of C#2005 Express Edition from the downloads page at microsoft. There is also a very extensive tutorial on Visual#2005 on the Microsoft website, http://msdn2.microsoft.com/en-us/vstudio/Aa700773.aspx. Go through the learning videos at the link above. You may not need the books at all, though I personally like to read something on paper, and both books take you through a process of developing software that actually does something.

The one thing to keep in mind, be absolutely scrupulous about making sure you have the proper things in () and in {}. If you keep good track of those elements you will prevent most of the problems with programming. Its kind of simplistic, and frankly the error messages one gets from the compiler are not terribly helpful, but I found that if I looked real closely at the line the error message first referenced, I generally found I was missing a ( or), or a { or }, or I misspelled a variable. I also went through the NT tutorials multiple times, and of course, asked a lot of dumb questions in the forum. The guys at NT are incredibly helpful, as long as you don't ask them to write your code for you, or tell you what is wrong with a long piece of code. They just don't have that kind of time and we want them working on enhancements anyway.
Hope it helps.
daven
daven,

Thanks for your input. I have my homework cut out for me.

jstockman
jstockman is offline  
Reply With Quote
Old 08-18-2010, 10:47 PM   #8
luxurious_04
Senior Member
 
Join Date: Jul 2010
Location: Philippines
Posts: 248
Thanks: 7
Thanked 6 times in 4 posts
Send a message via Skype™ to luxurious_04
Default

Hello Daven can you please sent me sample of your program that will launch ATM strategy in script? Share it please. luxurious_04@yahoo.com
luxurious_04 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
NinjaScript Strategies vs Indicators whitmark General Programming 7 08-29-2007 02:55 PM
Clearing old strategies from the strategies tab? mazachan Miscellaneous Support 1 07-10-2007 06:10 PM
Ninjascript Columns svrz Market Analyzer 5 05-26-2007 06:01 PM
NT6 NinjaScript Vs NT5 underground Indicator Development 2 11-22-2006 05:44 AM
Limit Position Strategies displayed in Combo Box & Inactive Strategies signals Suggestions And Feedback 4 04-10-2005 12:02 PM


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