Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Strategies and manual orders

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Strategies and manual orders

    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
    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.
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by AaronKoRn, Today, 09:49 PM
    0 responses
    6 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Today, 08:42 PM
    0 responses
    9 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Today, 07:51 PM
    0 responses
    10 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,976 views
    3 likes
    Last Post jhudas88  
    Started by rbeckmann05, Today, 06:48 PM
    0 responses
    9 views
    0 likes
    Last Post rbeckmann05  
    Working...
    X