![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Apr 2008
Posts: 4
Thanks: 0
Thanked 0 times in 0 posts
|
I have a strategy that I've coded in NT, including my typical exits so I can backtest it.
However, when running the strategy real-time, there are occasions when I might want to manually exit before the strategy dictates. From other posts I've read, it sounds like I can't use a NT script to create ATM orders, since I can't backtest those. It also seems that there is not a way to have a running strategy know that it's market position changed. So, the only 2 ways I can think of to manually exit a position in a running strategy are: a) Write a trading panel GUI in C# and have it send a manual 'close postion' command to the NT strategy. Is this doable in NT? If so, I realize it's beyond what you support, but could you give a place to start researching it? (I've written C# GUI's before, I just need to know how to hook them into NT) b) Use a DOM linked to the chart running my strategy, and close the account position when I need to exit early. I believe this would terminate the strategy, so I'd have to manually restart it. (The strategy would have a historical bar check so as to start flat) Are these the choices, or am I missing something with NT? As a suggestion for NT7, it would be VERY handy to allow an order entry window to manage/exit a position opened by a strategy, and have event methods available to the strategy so the user could have the strategy adjust accordingly. thanks for your help, Kurt |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
In NT 6.5, if you used advanced order handling approach and use a liveUntilCancelled order, you could modify this order external to the strategy and the strategy will pick up on it. So if you wanted to exit, modify a target (limit) that your strategy generated to fill immediately.
A) Yes this is possible although not necessary since you can do what I suggested above. B) Correct. PS - A strategy does know if it's position has changed. It is correct to say that it does not know that the underlying account's position has changed.
Ray
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| This is really frustrating, where is the reference manual for NinjaScript? | asalada | Suggestions And Feedback | 3 | 03-21-2008 12:40 PM |
| Manual target adjustment in Strategy | AllanH | Strategy Development | 1 | 11-11-2007 01:43 PM |
| Manual Stop Loss Submission | ozfader | Suggestions And Feedback | 1 | 11-27-2006 12:59 AM |
| 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 |