Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GreenDay Indicator

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

    GreenDay Indicator

    Hello all,

    I was able to get my strategy together but now I am having trouble with an indicator idea. It will be an engulfing concept but not like your typical engulfing candle. I am not sure (or I can't find it) this idea about this candle so I am trying to develop it. I don't know how to explain the language properly to put it into ninja. Can someone develop or help? Is it even possible? thanks
    Attached Files

    #2
    Hello wealthcig,

    Thanks for your post.

    This could be developed using price series comparisons, Draw.Text(), and Draw.ArrowDown() or Draw.ArrowUp().

    Based on the attached screenshot you shared, you could create a condition that checks if the current Open price (Open[0]) is less than or equal to the previous bar's Close price (Close[1]). The condition would also check if the absolute value of the current Close[0] - the current Open[0] is greater than the absolute value of the previous Close[1] - the previous Open[1]. The condition would look something like this.

    if (Open[0] <= Close[1] && (Math.Abs(Close[0] - Open[0]) > Math.Abs(Close[1] - Open[1])))

    Note that you may also want to check that the previous bar is an up bar (Close[1] > Open[1]) and if the current bar is a down bar (Close[0] < Open[0]).

    Then you would call Draw.Text() to draw the text "Green Day Short" on the chart and call Draw.ArrowDown() or Draw.ArrowUp() to draw an arrow on the chart.

    See the help guide documentation below for more information.

    Price Series: https://ninjatrader.com/support/help...riceseries.htm
    Draw.Text(): https://ninjatrader.com/support/help.../draw_text.htm
    Draw.ArrowDown(): https://ninjatrader.com/support/help..._arrowdown.htm
    Draw.ArrowUp(): https://ninjatrader.com/support/help...aw_arrowup.htm

    Let us know if we may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Thanks I will try use info in ninja

      Comment


        #4
        I am not having any luck. The information is very useful to a person who is versed in this area, not a newbie. I need a walking step by step on how to build. I tried inputting with new luck. any other advice?

        Comment


          #5
          Hello wealthcig,

          Thanks for your note.

          Please see the attached example script which demonstrates using price series comparisons, Draw.TextFixed(), and Draw.ArrowDown() to accomplish your goal.

          You could compare the example script to the script you are creating and modify your script accordingly.

          Let us know if we may assist further.
          Attached Files
          <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

          Comment


            #6
            Thanks, BrandonH. This gives me a good starting point.

            Comment


              #7
              Can anyone help with the bullish side of the candle? With the help of Brandon, he got me started. I tried copying and putting code in by typing opposite conditions to look for candles on the bullish side candles but I keep getting syntax error messages on lines 127 and 128 and other areas. I have to add a colon or something but don't know where it goes. So in order for NT8 to work properly, I have to keep deleting this and re-adding it when I work on it

              Comment


                #8
                Hello wealthcig,
                Refer below:-
                Code:
                if ((Close[1] > Open[1]) && (Close[0] < Open[0]) && (Math.Abs(Close[0] - Open[0]) > Math.Abs(Close[1] - Open[1])) && (Open[0] <= Close[1]))[INDENT]{
                // text & arrow for bearish side
                }[/INDENT]
                 else if ((Close[1] < Open[1]) && (Close[0] > Open[0]) && (Math.Abs(Close[0] - Open[0]) > Math.Abs(Close[1] - Open[1])) && (Open[0] >= Close[1]))[INDENT]{
                // text & arrow for bullish side
                }[/INDENT]
                Hope it helps!
                Last edited by s.kinra; 07-29-2021, 11:38 PM.

                Comment


                  #9
                  I loaded everything in and it compiles great but when changing up the arrow and text alignment it is not plotting on the chart. Am I missing something in the code that I need to put in and where do I do it? Sorry for being such a newbie and I am really trying to understand this but it's hard to grasp.
                  Attached Files

                  Comment


                    #10
                    Hello wealthcig,
                    Can you export it again & send, be sure not to select compiled assembly.

                    Comment


                      #11
                      here it is. It should have to additions you help me with in it
                      Attached Files

                      Comment


                        #12
                        Hello wealthcig,
                        I've cleaned it & updated to remove text when no signal, adjusted the text location in bottom right for both long & short, adjusted the arrow up position. Refer attachment.
                        Attached Files

                        Comment


                          #13
                          Awesome! Thank You

                          Comment


                            #14
                            Hello wealthcig,

                            Thanks for your note.

                            I see that you have the following condition listed twice in your script. This condition would only need to be used once in your script and calls the drawing logic for text and arrows. Something you could do is remove the second instance of this condition.

                            if((Close[1] > Open[1]) && (Close[0] < Open[0]) && (Math.Abs(Close[0] - Open[0]) > Math.Abs(Close[1] - Open[1])) && (Open[0] <= Close[1]))

                            I also see that you are checking if (CurrentBar < 1) multiple times in your script. This would only need to be added to your script once at the beginning of OnBarUpdate().

                            And, in your bullish side drawing objects you are using the same drawing tag names at the bearish side drawing objects. Drawing objects will need to contain unique names. This means that you would need to set your drawing tags to something like "drawBullishText" and "drawBullishArrow". See the example below demonstrating this.

                            Code:
                            if ((Close[1] > Open[1]) && (Close[0] < Open[0]) && (Math.Abs(Close[0] - Open[0]) > Math.Abs(Close[1] - Open[1])) && (Open[0] <= Close[1]))
                            {
                                Draw.TextFixed(this, "drawBearishText", "Green Day Short", TextPosition.BottomLeft);
                                Draw.ArrowDown(this, "drawBearishArrow" + CurrentBar, true, 0, High[0] + TickSize, Brushes.Cyan);
                            }
                            else if ( //add your bullish condition)
                            {
                                //add your drawing objects logic
                            }
                            Let us know if we may assist further.
                            <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                            0 responses
                            571 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
                            548 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