Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Looking for inside bar indicator

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

    #31
    Hello sonia0101,

    Thanks for your post.

    You can use the Draw.text() method to draw any text you wish, where you wish.


    We will leave this thread open for any forum member that would like to assist you with the modifications you seek.

    Alternately, if you would like it created for you, we can provide references to 3rd party programmers avaialble in the NinjaTrader ecossytem that can provide the programming service.
    Paul H.NinjaTrader Customer Service

    Comment


      #32
      Originally posted by NinjaTrader_PaulH View Post
      Hello sonia0101,

      Thanks for your post.

      You can use the Draw.text() method to draw any text you wish, where you wish.
      https://ninjatrader.com/support/help...?draw_text.htm

      We will leave this thread open for any forum member that would like to assist you with the modifications you seek.

      Alternately, if you would like it created for you, we can provide references to 3rd party programmers avaialble in the NinjaTrader ecossytem that can provide the programming service.
      Hi thanks for response as I have read yall are not here to write scripts but any chance you/or any helping member could point me in right direction to where in the code what I would change to accomplish what I seek?
      Thanks in advance

      trying to do it in strategy wizard but I can only get it to plot on the most current bar.. Plus even if successful don't know how to make indicator out of a strategy. Is there a wizard for indicators somewhat like the strategy wizard?
      Again thanks for any help.
      Last edited by sonia0101; 09-15-2020, 03:51 PM.

      Comment


        #33
        Hello sonia0101,

        Thanks for your reply.

        Correct, thanks for your understanding. We will leave this thread open for any forum member that would like to assist in making modifications to the indicator.

        In the Strategy Builder, when you create the draw text it will only show the latest occurrence of the text. To have all prior text remain you have to create a unique "Tag name" for the text object. Here is a short video that shows how to create unique tag names to allow all previous objects to remain on the chart: https://paul-ninjatrader.tinytake.co...NV8xMDk5MDc5Nw

        There is a Ninjascript indicator wizard but it would not function the same as the Strategy Builder, the indicator wizard would create the base structure needed for the inputs, plots and other data series. It does not provide a condition builder such as is in the Strategy Builder.
        Paul H.NinjaTrader Customer Service

        Comment


          #34
          Originally posted by NinjaTrader_PaulH View Post
          Hello sonia0101,

          Thanks for your reply.

          Correct, thanks for your understanding. We will leave this thread open for any forum member that would like to assist in making modifications to the indicator.

          In the Strategy Builder, when you create the draw text it will only show the latest occurrence of the text. To have all prior text remain you have to create a unique "Tag name" for the text object. Here is a short video that shows how to create unique tag names to allow all previous objects to remain on the chart: https://paul-ninjatrader.tinytake.co...NV8xMDk5MDc5Nw

          There is a Ninjascript indicator wizard but it would not function the same as the Strategy Builder, the indicator wizard would create the base structure needed for the inputs, plots and other data series. It does not provide a condition builder such as is in the Strategy Builder.
          Hi ok tks any chance you could point me in the direction of how once one has created the conditions they like/need in strategy builder and it works as such(strategy) what are the steps to make said strategy a indicator? Please understanding the only reason am messing with strategy builder is because I can't code and at least I got 1 bar to print the 1-LOL if I am lucky enough to get it to work properly how i want, then how to make a indicator
          Thanks in advance

          edit: As well anyone I am sure from all the talent here this is a no brainer for somebody? Much appreciated if one could please code a indicator that will print a number "1" on a chart under "inside bars" and share here would be great. I have tried altering the indi that I thanked AlanP for creating but I was not good, I don't know which part of the code to change to get result I am looking for?
          Thanks again for any help
          Last edited by sonia0101; 09-16-2020, 04:48 PM.

          Comment


            #35
            Hello sonia0101,

            Thanks for your reply.

            It would be difficult for someone that does not know coding to convert a strategy to an indicator.

            In the inside bar indicator is this code:

            if(High[0]<High[1] && Low[0]>Low[1])
            {
            BarBrush = BorderBrush;

            }


            You can add the draw.text() below BarBrush, like this:

            if(High[0]<High[1] && Low[0]>Low[1])
            {
            BarBrush = BorderBrush;
            Draw.Text(this, "test"+CurrentBar, "1", 0, Low[0] - 4 * TickSize); // Draw 1 4 ticks below the low of the bar
            }
            Paul H.NinjaTrader Customer Service

            Comment


              #36
              Originally posted by NinjaTrader_PaulH View Post
              Hello sonia0101,

              Thanks for your reply.

              It would be difficult for someone that does not know coding to convert a strategy to an indicator.

              In the inside bar indicator is this code:

              if(High[0]<High[1] && Low[0]>Low[1])
              {
              BarBrush = BorderBrush;

              }


              You can add the draw.text() below BarBrush, like this:

              if(High[0]<High[1] && Low[0]>Low[1])
              {
              BarBrush = BorderBrush;
              Draw.Text(this, "test"+CurrentBar, "1", 0, Low[0] - 4 * TickSize); // Draw 1 4 ticks below the low of the bar
              }
              Hi PaulH-
              THANK YOU! exactly what was trying to do. Of course now I see I need a few tweaks(for things I did not think about)- THANKS for a solid beginning. Much appreciated.

              Thanks for the NT support above and beyond!
              Last edited by sonia0101; 09-18-2020, 03:21 PM.

              Comment


                #37
                Hello all,

                I'm looking for something similar but wasn't able to find a suitable indicator. I found that indicator which uses the definition:
                An inside bar has a higher low and a lower high than the previous bar.
                I'd like to have a small but very important modification to it, suited for the dow theory where I want following trends.

                The definition is:

                An inner bar has closed within the range (high/low) of the previous bar which as result will be an active outer bar. The outer bar has activated a range derived from its high & low and that range will remain active as long as any of the following bars will close outside of that range. It plays no role if the break-out is above or below the range.

                For better understanding here's an illustration...


                Click image for larger version

Name:	inner-bar-dow.png
Views:	386
Size:	21.0 KB
ID:	1124142

                In the above example the last bar initiated the break-out and the sequence will continue to be long because the break-out happened above the range. In case the break-out would have occured below the range it would resulted in a sequence stop. The break-out direction does not make any matter for that indicator so I will omit.

                The next part of the indicator is the STOP which should be automagically in such a sequence. In following example we have again a long trade.

                The definition is:

                The customizeable stop-loss is set a few ticks below (for long trades as seen in this example) the previous bar at the time the new bar/period starts. Whenever the actual finishing bar will reveal an outer bar, the stop-loss should lowered/set to the previous bar for a more defensive stop. It should remain there until the outer bar break-out in trend direction.

                See following illustration example ...

                Click image for larger version

Name:	inner-bar-stop-calc.png
Views:	323
Size:	92.5 KB
ID:	1124143

                Anyone in here willing to assist and create this modification? It would be awesome to have the range highlighted with a customizeable color and opacity. The stop-loss should be also visible and able to be used as a stop-loss for the order in Ninjatrader8.

                Looking forward to your comments and feedback. Thanks to anyone in advance!!

                Comment


                  #38
                  Hello patricia70,

                  Thanks for your post.

                  Your post provides a good definition for anyone that wants to create that for you.

                  We will leave this thread open for any forum member that would like to assist in creating (or modifying) this indicator to your specifications.

                  If you would like it created by a 3rd party we can provide a link to 3rd party programmers through the NinjaTrader ecosystem.
                  Paul H.NinjaTrader Customer Service

                  Comment


                    #39
                    I'm looking forward to any help. Thank you Paul!

                    Comment


                      #40
                      I've started learning and trying to code myself. Here's a partial success I already achieved. Now I will move ahead and try to integrate the trailing stop method ...

                      Comment


                        #41
                        Hi,

                        How can I filter stock/instruments by the inside bar in market analyzer?

                        Thanks
                        G

                        Comment


                          #42
                          Hello gbajaj,

                          Thanks for your post.

                          "How can I filter stock/instruments by the inside bar in market analyzer?".

                          You would need an indicator that can determine the inside bar and when found, provide a signal level plot to the market analyzer. A signal level plot is simply a plot that has a value of 0 when no inside bar or a value of 1 when the bar pattern is found. The market analyzer can then work with the 0 or 1 value in its cell conditions which leads to filtering by the cell conditions.

                          The inside bar indicator references earlier in this thread does not provide that type of signal so it would need to be modified in order to accomplish your goal. You can modify by using the addPlot() method: https://ninjatrader.com/support/help...8/?addplot.htm In the OnBarUpdate() you would need to add a line Value[0] = 0.0; before the condition test and then add Value[0] = 1.0; inside the action part of the if statement (same place as where the BarBrush is set).

                          Paul H.NinjaTrader Customer Service

                          Comment


                            #43
                            Hello, is it possible to modify the script to only highlight when there are two consecutive inside bars?

                            Comment


                              #44
                              Hello Emael,

                              Thanks for your post and welcome to the NinjaTrader forums!

                              Yes you can do that using the BackBrush method: https://ninjatrader.com/support/help...?backbrush.htm

                              Note: When asking a question you may want to reference the post # so that everyone knows which script you are referring to specifically.

                              Paul H.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by warreng86, 11-10-2020, 02:04 PM
                              7 responses
                              1,360 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by Perr0Grande, Today, 08:16 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post Perr0Grande  
                              Started by elderan, Today, 08:03 PM
                              0 responses
                              9 views
                              0 likes
                              Last Post elderan
                              by elderan
                               
                              Started by algospoke, Today, 06:40 PM
                              0 responses
                              10 views
                              0 likes
                              Last Post algospoke  
                              Started by maybeimnotrader, Today, 05:46 PM
                              0 responses
                              14 views
                              0 likes
                              Last Post maybeimnotrader  
                              Working...
                              X