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 DJ888, 04-16-2024, 06:09 PM
                6 responses
                18 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by Jon17, Today, 04:33 PM
                0 responses
                1 view
                0 likes
                Last Post Jon17
                by Jon17
                 
                Started by Javierw.ok, Today, 04:12 PM
                0 responses
                6 views
                0 likes
                Last Post Javierw.ok  
                Started by timmbbo, Today, 08:59 AM
                2 responses
                10 views
                0 likes
                Last Post bltdavid  
                Started by alifarahani, Today, 09:40 AM
                6 responses
                41 views
                0 likes
                Last Post alifarahani  
                Working...
                X