Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stochastics Overlay

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

    Stochastics Overlay

    Stochastics Overlay


    This indicator takes the normal Stochastics indicator and overlays it on top of the price panel.

    Changelog:
    v0.1.3 - Fixed color parameters
    v0.1.2 - Fixed error in calculations for D and K lines
    v0.1.1 - Added ability to customize scale
    v0.1.0 -
    Public Release
    Attached Files
    Last edited by NinjaTrader_JoshP; 03-16-2008, 11:40 PM.
    Josh P.NinjaTrader Customer Service

    #2
    Thank you very much for this. I've downloaded the code and will check it out tomorrow.

    Paul

    Comment


      #3
      Josh, thanks. This is very useful. I would like to apply this to other indicators. Can you explain what is necessary to modify in the ninjascript to plot an indicator as an overlay on price?

      Thanks,

      Steve

      Comment


        #4
        There is actually a decently advanced routine to accomplish this. I overrode the Plot() method to get it to plot the way it does. Basically I had to create my own "scale" on the price panel based on pixel count of the height/width of the window.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks for the explanation. Sounds like it's more complicated than I thought. You wouldn't by chance want to program the Ninjatrader TRIX indicator to plot in overlay mode would you? If I thought I had the expertise, I'd try to do it myself.

          Thanks,

          Steve

          Comment


            #6
            Unfortunately I just don't have the spare time to commit to handling custom indicator requests at the moment. Maybe someone from the community can hack up my code for you.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              I understand, no problem.

              Comment


                #8
                I also want the %K overlaid on the price.
                I downloaded the zip files but I cannot tell what format the file is in.

                Any ideas would be appreciated
                many thanks

                Comment


                  #9
                  You need to import the Zip file.

                  RayNinjaTrader Customer Service

                  Comment


                    #10
                    Josh,

                    I have applied this method to an indicator I wrote, and it works like a charm.

                    My question is how would I modify the plot method to plot things like trendlines or text objects (from calls to drawLine() and drawText()) on the indicators scale?

                    I would think this is similar code, in that you would iterate thru the collections of drawing objects and plot them based on the indicator scale. Any help would be greatly appreciated.

                    Comment


                      #11
                      I'm not sure if I understand what you are trying to do exactly, but if you are trying to use the draw objects on the price panel you can already do that. Setting the property DrawOnPricePanel to true in the Initialize() method of your indicator should do the trick.
                      Josh P.NinjaTrader Customer Service

                      Comment


                        #12
                        I have an indicator that is similar to your stochastic, and I have used your plot code to plot it on the price panel but using a different scale. In that same indicator, I would like to do something like draw a trendline between specific peaks of the indicator or place a text object at a peak, again on the indicator scale not the price scale.

                        In the indicator, the plot method was overriden to get the indicator on the price scale. I am asking how would I get other draw objects to show up on the price panel but with the indicaotrs scale.

                        Comment


                          #13
                          I do not remember the exact algorithms I used in the overlay, but the general idea is to normalize the drawing field and then plotting to absolute pixels. You will need to do the same with the draw objects.

                          Unfortunately the answer is not a simple one and beyond the brief overview above it is beyond the level of support we can provide due to bandwidth issues. Thanks for understanding.
                          Josh P.NinjaTrader Customer Service

                          Comment


                            #14
                            Understood. I can try to figure it out if you can at least point me to how to access the collection of objects that have been added via the drawLine or drawText methods. Thanks.

                            Comment


                              #15
                              Unfortunately this is beyond what we provide support for.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by cre8able, Yesterday, 09:15 PM
                              2 responses
                              14 views
                              0 likes
                              Last Post cre8able  
                              Started by Trader146, Today, 09:17 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post Trader146  
                              Started by ttrader23, 05-08-2024, 09:04 AM
                              9 responses
                              43 views
                              0 likes
                              Last Post ttrader23  
                              Started by ZeroKuhl, Yesterday, 04:31 PM
                              8 responses
                              46 views
                              0 likes
                              Last Post ZeroKuhl  
                              Started by reynoldsn, Today, 07:04 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post reynoldsn  
                              Working...
                              X