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

Any way to keep lines from shrinking the chart

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

    Any way to keep lines from shrinking the chart

    Ninja 7.0.0.20

    I have an indicator that plots Suppt/Resist lines. It works quite well....but occasionally
    Price action creates S/R levels multiple points up or down from current price. When this
    happens, the Ninja Chart tries to keep all of the drawn lines visible....which in turns
    shrinks Price Action to the middle of the screen.
    I would prefer to simply have those extreme S/R levels temporarily 'scrolled off''
    the page until price reaches them.

    Is there a command I can use that will allow Price Action to remain at essentially
    the same proportion and simply draw those lines 'out of sight'?

    The lines would (of course) beocme visible on the chart if/when price moves to that
    area.

    Thanks..........

    #2
    Try setting the AutoScale property of the Indicator to False

    Comment


      #3
      I tried that before I sent the email. Doesn't alter the chart at all......

      (it seems like this should be simple, but I can't seem to find the answer).

      I've attached 'screen grabs' of......
      - the chart with no indicator
      - chart with the indicator
      - 'screen grab' of the indicator properties showing AutoScale 'false'
      Attached Files
      Last edited by photog53; 08-24-2010, 08:48 AM.

      Comment


        #4
        Normally AutoScale = false should do it - what are you using to show your S/R levels? Plots? Line objects?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Both "DrawLine" and DrawRay"......
          The indicator will draw a ray at the right edge....or if I use an 'offset' command it will draw
          'lines' starting several bars off the right edge and extending left into the chart by a
          set number of bars.

          Ex:
          DrawRay("ray1", false, leftoffset, zizgzagsD[1],0,zigzagsD[1],s1color,
          DashStyle.Solid, lnwidth);

          DrawLine("line1", false, leftoffset, zizgzagsD[1],rightedge,zigzagsD[1],s1color,
          DashStyle.Solid, lnwidth);
          Last edited by photog53; 08-24-2010, 11:37 AM.

          Comment


            #6
            photog53, we just fixed an AutoScale related issue in the DrawRaw() for B21 - is there any way I could test your indicator on my end here?
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Certainly.....
              (let me pull it off my trading machine and I will send it to you....)

              Comment


                #8
                Great, thanks, please send to support at ninjatrader dot com to my Attn.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  OK...here is the indicator.. (to get "ray" set Right Edge = 0......to get a "line" set RightEdge to 1 or greater) If you select 'lines' be sure to increase the default line length so you can see them better.

                  --------------------------------------------------------------------------------
                  I did more testing and got some unexpected behavior.

                  When I simply changed "AutoScale" from true to false in the indicator properties....hit enter...and then hit F5 to refresh the chart, nothing changed. AutoScale seemed to remained 'true'.
                  However, when I altered the actual code to use "false" instead of "true" as the default, recompiled, reloaded the indicator....then the chart allowed the ray/lines to paint out of visual range.
                  HOWEVER...just like the first test, changing AutoScale in indicator properties, saving, and hitting F5 refresh....did absolutely nothing. The chart seemed to remain on AutoScale 'false'.

                  It appears that I can override the Indicator Properties 'AutoScale' with whatever value I put in the actual "DrawLine' 'DrawRay'. I've become so accustomed to keying 'true' that it never occurred to me until now to put 'false' in each individual DrawRay or DrawLine

                  Not sure if this is me, or my indicator, or a Ninja behavior
                  Last edited by photog53; 08-26-2010, 08:12 PM.

                  Comment


                    #10
                    Thanks - I just replied to your note send to support.
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      Thanks for the reply.....

                      (I'm good with this....I changed the code and will go that way)

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Gerik, Today, 09:40 AM
                      2 responses
                      6 views
                      0 likes
                      Last Post Gerik
                      by Gerik
                       
                      Started by RookieTrader, Today, 09:37 AM
                      2 responses
                      10 views
                      0 likes
                      Last Post RookieTrader  
                      Started by alifarahani, Today, 09:40 AM
                      1 response
                      7 views
                      0 likes
                      Last Post NinjaTrader_Jesse  
                      Started by KennyK, 05-29-2017, 02:02 AM
                      3 responses
                      1,285 views
                      0 likes
                      Last Post NinjaTrader_Clayton  
                      Started by AttiM, 02-14-2024, 05:20 PM
                      11 responses
                      186 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Working...
                      X