Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

adding a drawing within strategy builder

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

    adding a drawing within strategy builder

    I am trying to add a drawing to a chart via a strategy i have created. However, i can't quite figure out how to do so via strategy builder. I want to draw a rectangle around the first 5 one-minute candles of the day... 9:30-9:35. is this possible in strategy builder?​Click image for larger version

Name:	image.png
Views:	187
Size:	18.0 KB
ID:	1323168

    #2
    Hello ageeholdings,

    In the condition builder add a condition
    Time > Time series, Equals, Time > Time value, set to 9:35 AM
    Click image for larger version  Name:	2024-10-30_6-27-09.png Views:	0 Size:	13.5 KB ID:	1323204

    In the actions select Drawing > Rectangle, set End bars ago to 0, set End Y to Price > High with Bars ago set to 0, set Start Y to Price > Low with Bars ago set to 5, set End bars ago to 5.
    In the Tag add a string to the string builder, select Misc > Current bar.
    Click image for larger version  Name:	2024-10-30_6-27-35.png Views:	0 Size:	28.3 KB ID:	1323205
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Fantastic... Thank you!

      Comment


        #4
        so i added the settings above, but get this vertical bars instead of rectangle around the area (highs and lows)... i did i miss something?
        Click image for larger version

Name:	image.png
Views:	167
Size:	6.1 KB
ID:	1323218

        Comment


          #5
          Hello ageeholdings,

          May I see the settings?

          May I see the entire chart window to confirm this is a 1 minute chart?
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            ​please see the image.Click image for larger version

Name:	image.png
Views:	157
Size:	135.4 KB
ID:	1323246

            Comment


              #7
              Hello ageeholdings,

              I see for the StartY you are using RangeHigh and for the EndY you are using RangeLow.

              Try using Price > Low with 'Bars ago' 5 as the StartY, and Price > High as the EndY as directed in post # 2.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                i now have a rectangle, but not of the high and low of the 5 min time frame... just the first bar. ​Click image for larger version

Name:	image.png
Views:	165
Size:	23.0 KB
ID:	1323257​​​​

                Comment


                  #9
                  Click image for larger version

Name:	image.png
Views:	161
Size:	31.8 KB
ID:	1323260​screen shot of settings

                  Comment


                    #10
                    Hello ageeholdings,

                    Set the EndY to Price > High with Bars ago set to 0.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      That still didn't work. I was looking around and maybe i need to capture the first bar and the last bar of the time frame and use those?

                      Comment


                        #12
                        Hello ageeholdings,

                        The prices you are using are just from the single bar of 5 bars ago, are you asking to get the high and low of the range of the bars within the rectangle in your image?

                        Comment


                          #13
                          This is what i am envisioning... a rectangle that encompasses the first 5 one-minute candles. That rectangle will go up to the highest and lowest price in the 5-minute time frame.​Click image for larger version

Name:	image.png
Views:	160
Size:	11.8 KB
ID:	1323477

                          Comment


                            #14
                            Hello ageeholdings,

                            Thank you for confirming that.

                            In that situation that would require manual coding to find the MIN/MAX of the area and then also figure out which is the High and Low bar to make sure the rectangle is matching the bar high and low values.

                            To do this would require that you find the highest and lowest prices within the range, in the builder this part would not be possible because the BarsAgo field cannot use a variable. In manual coding you could make a variable bars ago to find the highest/lowest prices since the start of the session on that series and then use those prices for the rectangle. A second step would be to determine which anchor the high and low prices go with so the rectangle fits on those bars and is not positioned incorrectly.



                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by NullPointStrategies, Yesterday, 05:17 AM
                            0 responses
                            64 views
                            0 likes
                            Last Post NullPointStrategies  
                            Started by argusthome, 03-08-2026, 10:06 AM
                            0 responses
                            139 views
                            0 likes
                            Last Post argusthome  
                            Started by NabilKhattabi, 03-06-2026, 11:18 AM
                            0 responses
                            75 views
                            0 likes
                            Last Post NabilKhattabi  
                            Started by Deep42, 03-06-2026, 12:28 AM
                            0 responses
                            45 views
                            0 likes
                            Last Post Deep42
                            by Deep42
                             
                            Started by TheRealMorford, 03-05-2026, 06:15 PM
                            0 responses
                            50 views
                            0 likes
                            Last Post TheRealMorford  
                            Working...
                            X