Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question

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

    Question

    Hellow, I am making a simple script using the strategy wizard, without codintg and one of the rules is that the Bar has to be longer than X number of ticks and lower than Y number of ticks.

    For the 1st rule I set High >Low and offset X ticks, but I don't see what I have to enter for the seconf rule, can you help pls ?

    #2
    Is there a reason you're trying to do this without coding?

    It is essentially writing code through the strategy builder - this would be a very simple 5-10 line strategy that could be done in minutes.

    Comment


      #3
      I can not code, but I made a few scripts that I need without coding. This one is simple and does not need coding, but the problem is I can not find how to make a rule where a bar has to be lower than Y number of ticks, I can only setup a rule where a bar is bigger than X number of ticks.

      Comment


        #4
        Just write down the criteria in a clear manner and I can build this sometime today.

        My current understanding is that:
        1. The bar must be at least a certain height - defined as ____ ticks tall
        2. The bar must not be taller than a certain height - defined as ____ ticks tall
        3. If the bar meets these criteria (i.e. taller than 3 ticks but not taller than 6 ticks) you would want it to enter a trade in a specific direction (which direction?)


        Is that correct?

        Comment


          #5
          Thanks for the help, here are the rules:

          Strategy Name: FadeIt

          1. Bar Length is bigger than X number of ticks, but lower than Y number of ticks

          2. If 1 is met and close>open, than enter sell limit order at price=Bar High - Z ticks

          3. If 1 is met and close<open, enter buy olimit order at price=Barlow+Z ticks

          This is it!

          Comment


            #6
            Questions:

            1. What about exiting the position? Do you have a target in mind? Do you have a stop loss in mind?
            2. Are you fading the previous bar? In other words, when you're talking about X ticks or Y ticks tall, is that based on the previous bar?

            I need a little more detail but I've basically got it finished.

            Comment


              #7
              Try this on for size.

              Put the .CS file in the following directory:

              Replace "USER" with your username.

              "C:\Users\USER\Documents\NinjaTrader 8\bin\Custom\Strategies"
              Attached Files

              Comment


                #8
                I will enter the exit orders manualy, no worries, just the entry is important

                Comment


                  #9
                  Originally posted by sunlounger View Post
                  I will enter the exit orders manualy, no worries, just the entry is important
                  Not really my business, so feel free to tell me to shut up, but that is not a viable method, as the strategy will not know anything about your manual order actions. When you exit, the strategy is going to still be in a position. In effect, you will get to take exactly one trade and no more, as you will permanently be in a position.

                  However, as you can manually adjust Stop and Target orders, and the strategy will honor your adjusted prices, you are better off having stop and target orders placed by the strategy, and then you adjust them to where you prefer them to be.

                  Just my $0.02.

                  Comment


                    #10
                    Originally posted by koganam View Post
                    you are better off having stop and target orders placed by the strategy, and then you adjust them to where you prefer them to be.
                    It does not allow me to adjust targets and stops once they are placed by a strategy, this is why in this case I prefer to set them manualy, because my trailing stop is going to be moved manualy based on chart points, while with other scripts that I made, I am going to use mechanical trailing stop and in them I have stops and targets placed by strategy.

                    If you know what I have to do in order to be able to adjust stops and targets which are placed by the strategy, pleace tell, but every time when I change the place of a stop loss for example, it moves back to its initial position.

                    Comment


                      #11
                      If your strategy uses OnPositionUpdate to track orders then it should understand what you've changed, or at least that's been my experience.

                      Anyone have thoughts on that?

                      Comment


                        #12
                        Originally posted by armybender View Post
                        If your strategy uses OnPositionUpdate to track orders then it should understand what you've changed, or at least that's been my experience.

                        Anyone have thoughts on that?
                        I adjust Stops and Targets all the time when I am watching, and decide to take the money and run because I do not like what I am seeing.

                        Then again, maybe that is only possible because I use Exit...() orders, not Set...() methods for placing the protective orders? I would not know, as I very long ago abandoned the Set...() methods as being too restrictive anyway.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        566 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        330 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by Mindset, 02-09-2026, 11:44 AM
                        0 responses
                        101 views
                        0 likes
                        Last Post Mindset
                        by Mindset
                         
                        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                        0 responses
                        547 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        548 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X