Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnTermination() not called when NT message event occurs

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

  • NinjaTrader_Brett
    replied
    Sure,

    please let me know when you have some more information and we will analyze it. Thanks for reporting.

    -Brett

    Leave a comment:


  • neoikon
    replied
    My indicator adds a few object in OnStartUp() and removes them in OnTermination(). When I hit F5, all works as expected.

    However, I'm seeing my objects added twice when an NT error occurs (such as trying to go to an instrument that doesn't exist... that causes that loud error sound). I'm assuming what is happening is that OnTermination() is not called to remove my objects, but OnStartUp is called, thus my objects are added a second time.

    I'm trying to nail down the exact situation where my objects are not being removed properly. I'm also looking into just putting in additional checks to make sure, even in this situation, they won't be added twice.

    I'll let you know if I can find more information.

    Leave a comment:


  • NinjaTrader_Brett
    replied
    On Termination should be called any time the strategy is terminated.

    Are you saying the strategy is getting terminated however On Termination is not being called?

    If so can you give me details on how to duplicate this so that I can test on my side.

    -Brett

    Leave a comment:


  • OnTermination() not called when NT message event occurs

    Hello,

    I am running into an issue where if there is some kind of NT message event (such as invalid instrument or invalid time frame, etc) then the OnTermination() function is NOT called, but Initialize() is called again. This is causing issues with my indicator since things are not correctly disposed within OnTermination, yet they are re-added during Initialize().

    Does my situation make sense?

    EDIT: Actually, I think it's OnStartUp() that is called again (rather than Initialize()) and OnTermination() is not.

    Thanks!
    Daniel
    Last edited by neoikon; 04-19-2012, 02:32 PM.

Latest Posts

Collapse

Topics Statistics Last Post
Started by mic414, Yesterday, 11:52 PM
0 responses
1 view
0 likes
Last Post mic414
by mic414
 
Started by fmcap, Yesterday, 10:49 PM
0 responses
2 views
0 likes
Last Post fmcap
by fmcap
 
Started by iradielt, Yesterday, 10:06 PM
0 responses
2 views
0 likes
Last Post iradielt  
Started by gbajaj, Yesterday, 03:35 PM
2 responses
11 views
0 likes
Last Post gbajaj
by gbajaj
 
Started by space_trader, Yesterday, 03:19 PM
2 responses
8 views
0 likes
Last Post space_trader  
Working...
X