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

Range Bar Gap Indicator

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

    Range Bar Gap Indicator

    Hello,
    I would like to learn how to use NinjaScript to create a simple Indicator. I want the indicator to highlight the gaps in Range bars.
    For example, in the image below you can see the location where the chart moved up one tick and never went back to fill it in, leaving a gap.
    Any help creating this Indicator would be greatly appreciated. I would also love any tutorials people have on how to create NinjaScripts.

    I have not programmed for a while but back in the day dabbled in C++, Java, Pearl, Python, PHP and SQL so I get the concepts of programming but don't know any of the syntax for NinjaScript.

    I could probably reverse engineer another indicator that is similar if anybody knows of one

    Thank you again for any help you can provide.
    Last edited by WeyldFalcon; 12-10-2020, 07:10 PM.

    #2
    I can do this.

    But are you willing to pay me ??

    Comment


      #3
      Thank you for the offer. You misunderstood me, I am seaking pointers on how to create it myself. I am not trying to hire someone to do it for me.

      Although now that you mention it I am curious what NinjaScript coding costs. What would you charge for a simple script like this?

      Comment


        #4
        WeyldFalcon

        This code is very simple only.
        ** Unable to charge you also.

        Here you go with the sample below.

        If you really need someone to write a full program(Indicator && Strategy) next time, then only find me.
        Attached Files

        Comment


          #5
          Wow! Thank you very much. That was super fast. I will take this apart this weekend and see how it works and what changes I can make to it. I think my first attempt will be to see if I can make the color a variable that can be changed from the GUI. You rock!
          As I move further into my trading career I will most definitely keep you in mind for more complex projects or just paying you to teach me to build my own. It sounds fun to get back into coding to further my trading career.
          Have a stupendous day and a wonderful holiday season!

          Comment


            #6
            Hello WeyldFalcon, thanks for posting.

            All of the price series arrays are documented here:


            Please also review this guide on working with price series:


            Please let me know if I can assist any further.
            Chris L.NinjaTrader Customer Service

            Comment


              #7
              If anybody is interested here is the updated version with variable color and sound.
              All credit goes to cincai. I just modified the code to add variable color and sound.
              Thanks again cincai!
              Attached Files

              Comment


                #8
                Originally posted by cincai View Post
                WeyldFalcon

                This code is very simple only.
                ** Unable to charge you also.

                Here you go with the sample below.

                If you really need someone to write a full program(Indicator && Strategy) next time, then only find me.
                I am curious what the going rate is for Indicator and Strategy creation is?

                for example, I would like an Indicator that highlights trades based on a few rules that can be variables in the Indicator. After writing this I realize it is long so if you don't have time or want to review this just to give me an estimate let me know and I can just save this as an example for somebody else.

                Variables:
                String NameOfTradeFormation = ability to name multiple versions of this indicator differently and based on different variable settings they would all highlight based on different rules
                Int NumberOfCandles = number of candles in Trade formation (between 3 and 6)
                Bool Continuation = if this trade formation works with continuations
                Bool Reversal = if this trade formation works with reversals
                Int EMA1 = EMA value to test off of
                Int EMA2 = used to test void must be larger than EMA1
                Int EMA3 = used to test void must be larger than EMA2
                Bool EMAOrder = if the EMA must be in the correct order or not (correct order defined as EMA1 above EMA2 above EMA3 when buying & EMA3 above EMA2 above EMA1 when selling
                Bool Void = if this trade formation works when touching, otherwise don't take trades when any part of the trade formation touches EMA1, 2 or 3
                Bool EMA2Bad = if any part of the trade formation can touch the EMA2 or not
                Bool EMA3Bad = if any part of the trade formation can touch the EMA3 or not
                Int EMAdeg = degrees EMA must be greater than or less than to take the trade (greater than if continuation, less than if reversal)
                Float PercRangeEMAMin = minimum percentage of range the closest part of the current trade formation is away from the EMA1 listed above (can be negative, and go above 100%) (for example if you are 5 ticks away from EMA1 at range 10 you are 50%)
                Float PercRangeEMAMax = maximum percentage of range the closest part of the current trade formation is away from the EMA1 listed above (can be negative, and go above 100%)
                Int NumberCandlesPrior = number of candles prior to the trade that must exist prior to the trade that is higher or lower than trade dip
                Int Gaps = Number of candles prior to Trade formation that must not have Gaps (defined as you already defined in your RangeBarGap Indicator)
                Int LastPeak = ticks since last micro peak,
                Float CandlePWickMaxPerc = maximum percentage of candle previous to Trade Formation that can be wick
                Float CandlePWickMinPerc = minimum percentage of candle previous to Trade Formation that can be wick
                Float Candle1WickMaxPerc = maximum percentage of the first candle of the trade formation that can be wick
                Float Candle1WickMinPerc = minimum percentage of the first candle of the trade formation that can be wick
                Float Candle2WickMaxPerc = maximum percentage of the second candle of the trade formation that can be wick
                Float Candle2WickMinPerc = minimum percentage of the second candle of the trade formation that can be wick
                Float Candle3WickMaxPerc = maximum percentage of the third candle of the trade formation that can be wick - Only shows up if NumberOfCandles is above 3
                Float Candle3WickMinPerc = minimum percentage of the third candle of the trade formation that can be wick - Only shows up if NumberOfCandles is above 3
                Float Candle4WickMaxPerc = maximum percentage of the fourth candle of the trade formation that can be wick - Only shows up if NumberOfCandles is above 4
                Float Candle4WickMinPerc = minimum percentage of the fourth candle of the trade formation that can be wick - Only shows up if NumberOfCandles is above 4
                Float Candle5WickMaxPerc = maximum percentage of the fifth candle of the trade formation that can be wick - Only shows up if NumberOfCandles is above 5
                Float Candle5WickMinPerc = minimum percentage of the fifth candle of the trade formation that can be wick - Only shows up if NumberOfCandles is above 5
                Float CandleTWickMaxPerc = maximum percentage of the first candle of the trade formation that can be wick
                Float CandleTWickMinPerc = minimum percentage of the trade candle of the trade formation that can be wick
                Float CandleP1OverlapMax = maximum percentage overlap candle 1 and candle P have
                Float CandleP1OverlapMin = minimum percentage overlap candle 1 and candle P have
                Float Candle12OverlapMax = maximum percentage overlap candle 2 and candle 1 have
                Float Candle12OverlapMin = minimum percentage overlap candle 2 and candle 1 have
                Float Candle23OverlapMax = maximum percentage overlap candle 3 and candle 2 have - Only shows up if NumberOfCandles is above 3
                Float Candle23OverlapMin = minimum percentage overlap candle 3 and candle 2 have - Only shows up if NumberOfCandles is above 3
                Float Candle34OverlapMax = maximum percentage overlap candle 4 and candle 3 have - Only shows up if NumberOfCandles is above 4
                Float Candle34OverlapMin = minimum percentage overlap candle 4 and candle 3 have - Only shows up if NumberOfCandles is above 4
                Float Candle45OverlapMax = maximum percentage overlap candle 5 and candle 4 have - Only shows up if NumberOfCandles is above 5
                Float Candle45OverlapMin = minimum percentage overlap candle 5 and candle 4 have - Only shows up if NumberOfCandles is above 5
                Float CandleTOverlapMax = maximum percentage overlap candle Trade and candle prior to Trade candle have
                Float CandleTOverlapMin = minimum percentage overlap candle Trade and candle prior to Trade candle have
                Bool CongestionBad = if congestion prior to Trade Formation is okay (Congestion defined as more than 3 candles with more than 80% overlap, for example, 4 full candles back and forth

                Wow, after writing this down I realize why it has been hard for me to do this visually by memory

                Depending on how the Indicator works I would be interested in purchasing a strategy based on this as well.

                Thank you for reading this far if you did
                Have a wonderful day!
                Last edited by WeyldFalcon; 01-26-2021, 07:32 AM.

                Comment


                  #9
                  Hello @cincai
                  Since I have not heard back I am going to reach out to the community to see how much others would charge for this. I am not going to need this indicator for a little while anyway so if I do hear back from you before I need this indicator you are still my first choice.

                  Comment


                    #10
                    cincai I could use some help with an indicator for a fee. Are you open to helping?
                    Need this gap indicator you created to also capture 3 candle gaps where candle A and C dont share price. Id also like to be able to extend them across my chart. There is a FVG indicator in Trading view that I would like to mirror in NT. Please let me know if anyone out there can help. Thank You

                    Comment


                      #11
                      Hi Can this indicator be used for minute chart. Anybody can help to advise the changes needed? Appreciate the help.

                      Comment


                        #12
                        Agent187,

                        Welcome to the NinjaTrader forums!


                        WeyldFalcon, Agent187,

                        You can search our extensive library of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more!

                        https://ninjatraderecosystem.com/sea...mming-services

                        Educators - https://ninjatraderecosystem.com/sea...ures=education
                        You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third party services for NinjaTrader all pricing and support information will need to be obtained through the consultant.

                        This NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

                        Should want to work on creating this yourself, I am happy to answer any questions and provide guidance.


                        neshnix89,

                        Time based bar types will not typically have gaps between the high/low of the previous bar and the high/low of the current bar, but it is possible and I am not seeing any reason this indicator would not work on that as well. Have you tested this and found this to not be working as expected?
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          I'm also looking for this classic candlestick pattern indicator. I had one built for Esignal way back. I like them to mark out the top of the falling window & the bottom of the falling window with different lines properties and a lable. Also a line for how far the gap has been breached and shading for the gap. All done as rays.
                          Attached Files

                          Comment


                            #14
                            Hello dtaylor,

                            NinjaTrader does include a CandleStickPattern indicator.

                            You could call or copy this indicator to customize this to draw rays with Draw.Ray().


                            For shading, you could draw a rectangle with Draw.Rectangle().


                            Or set two Series<double> objects and use this for Draw.Region().



                            If you are new to coding, below is a link to a forum post with helpful resources on getting started with C# and NinjaScript.
                            Chelsea B.NinjaTrader Customer Service

                            Comment


                              #15
                              Originally posted by WeyldFalcon View Post
                              If anybody is interested here is the updated version with variable color and sound.
                              All credit goes to cincai. I just modified the code to add variable color and sound.
                              Thanks again cincai!
                              this works nicely. But is there a way to extend these boxes/gaps till they are filled?

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by DJ888, 04-16-2024, 06:09 PM
                              4 responses
                              12 views
                              0 likes
                              Last Post DJ888
                              by DJ888
                               
                              Started by terofs, Today, 04:18 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post terofs
                              by terofs
                               
                              Started by nandhumca, Today, 03:41 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post nandhumca  
                              Started by The_Sec, Today, 03:37 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post The_Sec
                              by The_Sec
                               
                              Started by GwFutures1988, Today, 02:48 PM
                              1 response
                              9 views
                              0 likes
                              Last Post NinjaTrader_Clayton  
                              Working...
                              X