Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

StartBehavior.AdoptAccountPosition behaviour question

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

    StartBehavior.AdoptAccountPosition behaviour question

    Hi,

    I have a strategy that uses StartBehavior.AdoptAccountPosition to enable it to resume after the forced IB daily disconnect.

    If the strategy is in a position and it disables itself due to connection loss, I then reconnect and enable it, and it does a "Virtual entry execution" to keep in sync, which is fine.

    The problem arises later on, when the strategy logic encounters an exit signal such as:

    Code:
    ExitLong(entryName+"LIFail",entryName);
    where the original entryName (fromEntrySignal) is no longer recognized by the strategy, and therefore this Exit order is never triggered. This in an intra-bar signal.

    Is this normal behavior? If so, how do I deal with these virtual entries to make sure all the exit signals are triggered after a virtual entry?

    Thanks.

    #2
    Hello ours_solaire,

    Thank you for your note.

    May I ask, do you have both the following under State.SetDefaults?

    Code:
    IsAdoptAccountPositionAware = true;
    IsInstantiatedOnEachOptimizationIteration	= true;
    If so, if you hardcode "enterLong" as the name for both the entry and exit, do you get the exit upon the conditions being met after a restart?

    I look forward to your reply.
    Last edited by NinjaTrader_AlanP; 09-26-2017, 06:58 AM.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hi Alan,

      Yes those parameters are correctly set in State.SetDefaults.

      I can see that if you don't specify a fromEntrySignal in your EXIT() method by using an empty string, the exit order will always trigger, however, if I want to keep a track of which entry signal generated the exit (using fromEntrySignal), I can't use this method.

      Ideally, there would be a boolean such as IsVirtualEntry that could be used to catch these instances and deal with them differently.

      Perhaps you can add this to the list of requests / modifications for a future update of NT?

      Comment


        #4
        Hello ours_solaire,

        Interesting, I'd like to look more into this.

        Could you please send an email to platformsupport[at]ninjatrader[dot]com with Attn: Alan P in the Subject line. Also within the email please include a link to this thread, and attach the log and trace files for the day in subject which you can find in My Documents>NinjaTrader8>Log and My Documents>NinjaTrader8/Trace folders.

        I look forward to your email.
        Alan P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by jonfan45, Today, 06:06 PM
        0 responses
        6 views
        0 likes
        Last Post jonfan45  
        Started by rustyspring, Today, 05:15 PM
        0 responses
        8 views
        0 likes
        Last Post rustyspring  
        Started by xulu13, Today, 05:01 PM
        0 responses
        12 views
        0 likes
        Last Post xulu13
        by xulu13
         
        Started by Pbarrionuevo, Today, 04:30 PM
        0 responses
        9 views
        0 likes
        Last Post Pbarrionuevo  
        Started by vantojo, Today, 01:39 PM
        0 responses
        20 views
        0 likes
        Last Post vantojo
        by vantojo
         
        Working...
        X