• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bars since Entry, Bars since Exit

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

    Bars since Entry, Bars since Exit

    I have watched numerous video and cannot find the simple answer to the following:
    I want the strategy to enter a position based on the Condition of a crossover but only after 10 bars have painted since the last exit.
    What do I put in the left box and where?
    What do I put in the right box and where?

    #2
    Hello TrendFollowingCapital,

    Thanks for your post.

    For the bar since exit execution, you have correctly selected the condition on the left. On the right side you need to select the "Misc" folder and from there select "Numeric value" and then enter the value of 10.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hi Paul
      Thank you for your reply.
      I added in the variables exactly as you said now the strategy will not execute any positions at all.

      I heard on a video or a post somewhere you need to put in a -1 or something like that, but not able to remember where?

      There should really be a training video on this, it is very briefly mentioned in the Strategy builded 301 video or one of those but absolutely no clarification or working examples.
      I cannot find 1 vide on YouTube to explain how this feature works, perhaps you know of one?

      Comment


        #4
        Hello TrendFollowingCapital,

        Thanks for your reply.

        With reference to the help guide here: https://ninjatrader.com/support/help...texecution.htm that is correct, if there is no previous exit the method returns a -1. When used as an entry condition, this would prevent the first trade from occurring (and all other trades) unless you also accounted for the -1 value.

        In the strategy builder, you would have to create a "group" that is set to "If any" and then place both conditions in there of >10 and = -1. The "if any", in the group set only, creates the "or" condition. With the conditions set that way, when used as an entry condition the -1 value will be true allowing the first trade to occur and thereafter the -1 will no longer be returned and the method will return the number of bars since the latest exit.

        For your convenience, I have attached a screenshot that shows the "condition group" inside the condition of set 1 to help you recreate.

        Click image for larger version

Name:	TFC-1.PNG
Views:	1
Size:	35.0 KB
ID:	1057804

        For further references on how to create a group condition, please see " How to create time filters" on this page: https://ninjatrader.com/support/help...on_builder.htm
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Thank you Paul, this works perfectly, and the 1st time I have ever seen this explained properly.
          Kind regards, Jason

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by ntbone, Yesterday, 08:10 PM
          0 responses
          7 views
          0 likes
          Last Post ntbone
          by ntbone
           
          Started by chrislou, 08-28-2015, 03:27 AM
          14 responses
          2,881 views
          0 likes
          Last Post nkhoi
          by nkhoi
           
          Started by outofstock, Yesterday, 06:40 PM
          2 responses
          8 views
          0 likes
          Last Post outofstock  
          Started by saeed, Yesterday, 12:32 PM
          3 responses
          40 views
          0 likes
          Last Post NinjaTrader_PatrickG  
          Started by motog4, Yesterday, 11:42 AM
          3 responses
          21 views
          0 likes
          Last Post NinjaTrader_PatrickG  
          Working...
          X