Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Divergence spotter

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

    #16
    Hmm... Perhaps it could be set up so that if price is higher n bars ago and OBV is lower n bars ago, a dot appears below the candle and vice versa. With this type of setup it might be useful to run multiple instances of this indicator with different lookbacks to determine when price and OBV are divergent across the long, intermediate, and shorter timeframes. I've also pondered this type of indicator tied to a zigzag-type line, so that when say a 5% zig in price is compared to the same period for the indicator, divergences could be spotted be measuring the degree (or slope, or linear regression line) of the indicator during that period vs. price itself. Who knows, maybe even divergences could be color coded across a spectrum from green to red so that one could clearly see the severity of the divergences at a glance.

    I'm thinking out loud of course.

    In any case, I find that using DivergenceSpotter with two price momentum indicators and one volume indicator prove quite helpful.

    Thanks again

    Comment


      #17
      Or, alternatively, you could calculate a Stochastic of the OBV line and use that oscillator in the DivergenceSpotter code. I've done this with the A/D line before.


      Originally posted by jonesenberg View Post
      Hmm... Perhaps it could be set up so that if price is higher n bars ago and OBV is lower n bars ago, a dot appears below the candle and vice versa. With this type of setup it might be useful to run multiple instances of this indicator with different lookbacks to determine when price and OBV are divergent across the long, intermediate, and shorter timeframes. I've also pondered this type of indicator tied to a zigzag-type line, so that when say a 5% zig in price is compared to the same period for the indicator, divergences could be spotted be measuring the degree (or slope, or linear regression line) of the indicator during that period vs. price itself. Who knows, maybe even divergences could be color coded across a spectrum from green to red so that one could clearly see the severity of the divergences at a glance.

      I'm thinking out loud of course.

      In any case, I find that using DivergenceSpotter with two price momentum indicators and one volume indicator prove quite helpful.

      Thanks again

      Comment


        #18
        What would be the settings for a 14 CCI?

        Comment


          #19
          Sound?

          Hi,

          Has anyone managed to add an audible alert to this indicator?

          If so, would they care to share?

          Comment


            #20
            How?

            How do I import this divergance spotter into the program? Tried damn near everything to make it import and it doesnt seem to want to.

            Comment


              #21
              Originally posted by tomydispik View Post
              How do I import this divergance spotter into the program? Tried damn near everything to make it import and it doesnt seem to want to.

              Hi Tomy,
              What error message shows up when you try it? There may be a problem with some existing indicator on your platform that is causing the error and interfering with the import.

              Comment


                #22
                No error actually, I just cant see it in the menu when I go to use it

                Originally posted by sbgtrading View Post
                Hi Tomy,
                What error message shows up when you try it? There may be a problem with some existing indicator on your platform that is causing the error and interfering with the import.

                Comment


                  #23
                  After you load the source for an indicator onto your disk you have to compile the source before it will show up in the list of indicators that you can add to a chart.

                  Therefore, go to Tools/Edit NinjaScript/Indicators and open any indicator you see listed and press F5 to compile it.

                  Then you can close the indicator source editor and add whatever new indicators you've downloaded (and now compiled) to your charts.

                  Comment


                    #24
                    Would anybody please tell me how to use this indicator to create a strategy? In the equation, what should I enter on the right side if I want to use it as a buy signal?

                    Thank you!

                    Comment


                      #25
                      Originally posted by scyche View Post
                      Would anybody please tell me how to use this indicator to create a strategy? In the equation, what should I enter on the right side if I want to use it as a buy signal?
                      Hello Syche,

                      Here's an example:

                      double sig = DivergenceSpotter(3, DivergenceSpotter_IndicatorType.RSI, 0, 14, 1, 0).Plot0[0];

                      if(sig > Close[0]) {
                      //valid buy signal generated
                      }
                      if(sig < Close[0]) {
                      //valid sell signal generated
                      }


                      Ben
                      Last edited by sbgtrading; 07-14-2009, 05:31 PM.

                      Comment


                        #26
                        Thank you!

                        Thank you very much for your reply.

                        But I did not find any "BuySignal" or "SellSignal" in the indicator. Can I use it directly?


                        Originally posted by sbgtrading View Post
                        Hello Syche,

                        Here's an example:

                        double buysig = DivergenceSpotter(3,DivergenceSpotter_IndicatorTyp e.RSI, 0, 14, 1, 0).BuySignal[0];
                        double sellsig = DivergenceSpotter(3,DivergenceSpotter_IndicatorTyp e.RSI, 0, 14, 1, 0).SellSignal[0];
                        if(buysig != Close[0]) {
                        //valid buy signal generated
                        }
                        if(sellsig != Close[0]) {
                        //valid sell signal generated
                        }


                        Ben

                        Comment


                          #27
                          Originally posted by scyche View Post
                          But I did not find any "BuySignal" or "SellSignal" in the indicator. Can I use it directly?

                          My apologies...I changed the code snippet to reflect the DivergenceSpotter which was posted to this thread in Post 1. The "BuySignal" and "SellSignal" are not in the DivergenceSpotter code as posted.

                          Comment


                            #28
                            Also...you may consider viewing (and using) the indicator that's been posted to another thread...that indicator is called "D3Spotter".

                            It appears to be an enhanced version of the DivergenceSpotter.

                            Search the NinjaScript files section for "d3spotter"

                            Comment


                              #29
                              Thank you very much for your help!

                              Comment


                                #30
                                Created an indicator and strategy for Divergence

                                Check here....

                                I hope this works for you..... good luck!

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by ScottWalsh, Today, 04:52 PM
                                0 responses
                                1 view
                                0 likes
                                Last Post ScottWalsh  
                                Started by ScottWalsh, Today, 04:29 PM
                                0 responses
                                5 views
                                0 likes
                                Last Post ScottWalsh  
                                Started by rtwave, 04-12-2024, 09:30 AM
                                2 responses
                                22 views
                                0 likes
                                Last Post rtwave
                                by rtwave
                                 
                                Started by tsantospinto, 04-12-2024, 07:04 PM
                                5 responses
                                70 views
                                0 likes
                                Last Post tsantospinto  
                                Started by cre8able, Today, 03:20 PM
                                0 responses
                                7 views
                                0 likes
                                Last Post cre8able  
                                Working...
                                X