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 caacapital, Today, 10:10 AM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_ShawnB  
        Started by DiverG20, Today, 10:23 AM
        0 responses
        21 views
        0 likes
        Last Post DiverG20  
        Started by SuneSorgenfrei, Today, 09:29 AM
        0 responses
        19 views
        0 likes
        Last Post SuneSorgenfrei  
        Started by dodoei, Today, 07:24 AM
        0 responses
        14 views
        0 likes
        Last Post dodoei
        by dodoei
         
        Started by thecashguys, Today, 06:13 AM
        0 responses
        13 views
        0 likes
        Last Post thecashguys  
        Working...
        X