![]() |
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
|
|||||||
| 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. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Junior Member
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Greg,
You do not have to enter symbols in the Instrument Managerfor stocks. Just specify the stock symbol. Ray
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
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
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
|
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? |
|
|
|
|
|
#6 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Were they strategies?I just tested here and worked as designed. They will only close strategies in the DOM.
Ray
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
|
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... |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#9 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
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.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#10 |
|
Junior Member
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#11 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
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
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#12 |
|
Junior Member
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#13 |
|
Junior Member
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#14 |
|
Junior Member
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#15 |
|
Junior Member
Join Date: Dec 2004
Location: montreal, Quebec, Canada
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|