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 > 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 10-09-2006, 02:29 AM   #1
gregw
Junior Member
 
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Hi

I am building an application that will monitor a watch list of stocks and if conditions are met send a trading order to NT using the autotrader. it is not a charting application but my own stand alone app.

the watch list of stocks changes every day, do I need to manually add the stock symbols to the NT data base? or can I specify the stock symbol from within the code to execute the trade
Can you point me to any information you may have about autotrading stocks, sample scripts anything at all

Thanks

Greg
gregw is offline  
Reply With Quote
Old 10-09-2006, 03:21 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Post imported post

Greg,

You do not have to enter symbols in the Instrument Managerfor stocks. Just specify the stock symbol.

Ray
NinjaTrader_Ray is offline  
Reply With Quote
Old 10-12-2006, 08:25 AM   #3
gregw
Junior Member
 
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Thanks Ray,

Unlike trading futures, when I trade stock I can have as many as 20 + on my watch list.
In an attempt to better manage these I wasconsidering building a stand alone application to work with Ninja.
While trying to describe how I envisioned this working, I found it easier to cut and paste together the actual form. I simply used the Ninja Orders page and made some modifications that would allow a stock trader, to enter, exit and monitor trades from a single page.

below is the graphic of what I am trying to achieve.

2 Questions.
1, could you incorporate these changes in a future release of NT or
2. Are there / do you know of any talented programmers, familiar with NT who could program this for me as an add on


Thanks

Greg

http://www.thetradingzone.com/i5/NtStockTrades.JPG



gregw is offline  
Reply With Quote
Old 10-12-2006, 10:15 AM   #4
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Post imported post

Hi Greg,

NT6 has automated system development capabilities. You may be able to accomplish what you want using NinjaScript. It will be out in beta end of the month. You would need to have someone program. There are currently no individuals familiar with what we have yet to release.

Ray
NinjaTrader_Ray is offline  
Reply With Quote
Old 10-13-2006, 08:07 AM   #5
gregw
Junior Member
 
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Thanks Ray, I will wait for the release.

Question regarding Close At Time.
Today I entered a bunch of Stockorders in the SIM account. For each one I selected "close at time" by right clicking and placing the check mark when I created the order
Under tools>options>misc , i put in 3:51 pm, and did NOT check flatten all, as I did not want my positions in my regular account to be flattened

Well 3:51 came and went, and my stock position in CMVT was still open, so I closed it manually.

Did I set this up correctly? Is there a time time zone to consider that I did not?
gregw is offline  
Reply With Quote
Old 10-13-2006, 09:37 AM   #6
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Post imported post

Were they strategies?I just tested here and worked as designed. They will only close strategies in the DOM.

Ray
NinjaTrader_Ray is offline  
Reply With Quote
Old 10-13-2006, 11:59 AM   #7
gregw
Junior Member
 
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Yes they were all entered as a strategy called stock1, and were entered using the Basic Entry Window

At one point I loaded an active trade into a DOM window, and I did notice that the check mark was not present for the Close at Time. I went back and loaded it again in a Basic Window, and the check was there. So there was an inconsistency to begin with.

While monitoring my positions on the Orders pagem there is no way of knowing if Close at Time is active or not

I don't know of any other way to check if Close At Time was activated or not

the strategy worked fine, stop limit entries, scale out, trailing stops...

gregw is offline  
Reply With Quote
Old 10-16-2006, 08:24 AM   #8
gregw
Junior Member
 
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Again today, 3 stock positions all of which had Close At Time, selected and 3:51 pm as the time to close. None of the positions were closed.

Any suggestions?

Greg
gregw is offline  
Reply With Quote
Old 10-16-2006, 09:55 AM   #9
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Post imported post

Yes,

Tomorrow, set time to close a few minutes ahead of the current time.
Open a position in Sim101 account, enable close at time.
When the time comes, does it close?

Please let me know as it does work here. This would be the first step, then we can take it from there.
NinjaTrader_Ray is offline  
Reply With Quote
Old 10-17-2006, 03:50 AM   #10
gregw
Junior Member
 
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

I did about 10 trials today.

Entering a position, and setting the Close at time a few minutes ahead

About 50 % of the time it worked, and 50% it did not.

It seems like when I went to Close at Time, and turned it on/off (about 5 times), while in the trade, it worked

When I just left it checked, without toggling it, it did not work

I would think that a check box in the advanced options would be easier to use,

Also, once in a position there is nowhere to check if it is selected asone of positions to close
gregw is offline  
Reply With Quote
Old 10-17-2006, 09:54 AM   #11
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Post imported post

Greg,

Thanks for your help here. Can you only try the following.

Set the time 5 minutesahead.
Open a new DOM
Open a strategy inSim101
Enable TimeToClose (only check it once)

Does it close?

Thanks
NinjaTrader_Ray is offline  
Reply With Quote
Old 10-17-2006, 11:12 AM   #12
gregw
Junior Member
 
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Hi Ray,

I did 2 tests, and both worked fine

One was entered via the DOM, and the other via the BEW.

Seleted time to close ahead ~ 5 min, and both positions were successfully closed.

I don't think I did anything differently in this test than I did in the others.
Only yhing I can think of is that when it failed to trigger I had multiple positions on.

I will try it again with a few positions



Greg
gregw is offline  
Reply With Quote
Old 10-17-2006, 11:18 AM   #13
gregw
Junior Member
 
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Here is a thought

When the TimeToClose failed, all the orders I entered were Stop Limit Orders to enter, I invoked the TimeToClose when I originally entered the order, Not once it was filled.
In these tests I have been selecting TimeToClose, only once the order is filled.
Could it be that the TimeToClose needs to be activated only after a position is in the market. Or is it enough to select it when the order is initially placed

Greg
gregw is offline  
Reply With Quote
Old 10-17-2006, 11:38 AM   #14
gregw
Junior Member
 
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Ok I'm stumped

multiple positions worked.
Selecting TimeToClose when order is submitted worked

The only one I have not tried is the Stop Limit entry, because it's after hours and the market is not moving enough to triggera fill

Otherwise it seems to be working, go figure, any thoughts?

Greg
gregw is offline  
Reply With Quote
Old 10-17-2006, 11:48 AM   #15
gregw
Junior Member
 
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

sorry for all these posts,

But as I went to shut down NT, it alerted me to open positions. 1 of the 3 that were on at the same time did not close out.

I reloaded it into a BEW, and on right click it showed a check mark for TimeToClose.

I changed the time for 3 min ahead, and deselected and reselected TimeToClose, and it did close out.

So I am not sure if the problem is intermittent, or maybe I made an error when I entered the order. But, it clearly showed a check next to TimetoClose, so I would be led to believe that it was working

As I mentioned in an earlier post, maybe a radio button or check box in the advanced section, or a column on the orders page, would make it easier to track which positions are set to close out

Thanks

Greg
gregw 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


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