Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

"Virtual" (yellow) trades

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

    "Virtual" (yellow) trades

    Hello,

    I have my settings as follows:

    Wait until flat before executing live, Sync account position = false

    and I wanted to be sure I fully understand. As soon as I enable my strategy a few of the instruments turn yellow because they are NOT in sync with the portfolio (so far so good). Does it mean that they need to virtually hit the "profit" or "loss" I have configured before a new order is really placed (I have set 1 trade per instrument at the time and three bars min to calculate)? Is there any way to avoid this wait and start from zero when I enable the strategy?

    Thanks!

    #2
    Your understanding is correct TexFly, the scripts would be waiting until the historical 'virtual' position is in a flat state and then they would be taking the next fresh generated entry.

    One way to avoid this would be working with the Historical property to only enter trades on realtime data, this way you cannot have a historical position in the script.

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks Bertrand,

      I have added the historical instruction and now I have no "yellow" positions anymore. Just to confirm...since I have set 3 bars minimum to calculate and I have a daily bar I will need to wait at least three days before I can see a signal. Correct?

      Comment


        #4
        It would depend where this check is placed, if you generally return out of OnBarUpdate() for any historical bar, or if you would only allow entries to be triggered if Historical == false. This way a portion of OnBarUpdate() would still run historically.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          I have

          if (Historical)
          return;

          so..."since I have set 3 bars minimum to calculate and I have a daily bar I will need to wait at least three days before I can see a signal. Correct? "

          Thanks!

          Comment


            #6
            TexFly, looked further into it, you should see an immediate signal once you hit a realtime bar. OnBarUpdate() is called historically as well if you have historical data present, you just immediately return out of doing anything in it for the non realtime part.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              When you say I "should see an immediate signal " you mean if the strategy logic is triggered. Correct?

              Thanks Bertrand!

              Comment


                #8
                Of course, according to your conditions...
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Jonker, Today, 01:19 PM
                0 responses
                1 view
                0 likes
                Last Post Jonker
                by Jonker
                 
                Started by futtrader, Today, 01:16 PM
                0 responses
                5 views
                0 likes
                Last Post futtrader  
                Started by Segwin, 05-07-2018, 02:15 PM
                14 responses
                1,789 views
                0 likes
                Last Post aligator  
                Started by Jimmyk, 01-26-2018, 05:19 AM
                6 responses
                838 views
                0 likes
                Last Post emuns
                by emuns
                 
                Started by jxs_xrj, 01-12-2020, 09:49 AM
                6 responses
                3,294 views
                1 like
                Last Post jgualdronc  
                Working...
                X