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 Schools, 03-14-2025, 03:32 PM
                3 responses
                36 views
                0 likes
                Last Post Schools
                by Schools
                 
                Started by kevinenergy, 11-28-2023, 11:04 AM
                2 responses
                68 views
                0 likes
                Last Post Brightredmegaphone  
                Started by danjurgens, 01-14-2025, 04:30 PM
                17 responses
                472 views
                0 likes
                Last Post Mirasol
                by Mirasol
                 
                Started by several, Today, 03:53 AM
                0 responses
                16 views
                1 like
                Last Post several
                by several
                 
                Started by lucyb, Today, 03:38 AM
                0 responses
                5 views
                0 likes
                Last Post lucyb
                by lucyb
                 
                Working...
                X