Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw.FibonacciRetracements()

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

    Draw.FibonacciRetracements()

    Hello,

    I have not been able to make it work yet. But will it looks like fibonacci manual retracement using F8? Are we able to change the % levels in the indicator chart and add new one's like 165% for exemple or we are stuck with preset levels?

    I suppose this thing is going in OnBarUpdate. Why do we need a int startBarsAgo after all you just need the X and Y . Like X for the lowest point (price ) in the chart and Y for the price where you want the line to stop on the Y axis?

    Ty

    #2
    Hello frankduc, thanks for your post.

    The FibonacciRetracement obejct has a PriceLevels property that your script can access. I found this post that already demonstrates getting the value of these price levels:



    Kind regards.

    Comment


      #3
      ChrisL,

      Yes i have found it as well and its working.
      If i click the fibo retracement line in the chart i can access the drawing object proprieties and change the levels.

      But is it possible to include in the code the levels you want to show on your fibo retracement line? 161, 200, 261%, they are not included and must be entered manually. If you refresh the ninjascript those levels disappear unless it is save and than load.

      Frank
      Thank you

      Comment


        #4
        Hello, thanks for your reply.

        I was able to change the PriceLevel elements with this test:

        Code:
                FibonacciRetracements myRetracements;
                protected override void OnBarUpdate()
                {
                    if(State == State.Historical) return;
        
                    myRetracements = Draw.FibonacciRetracements(this, "fib", true, 20, High[20], 2, Low[2]);
                    Print(myRetracements.PriceLevels[0].Value);
                    myRetracements.PriceLevels[0].Value = 100;
                    Print(myRetracements.PriceLevels[0].Value);
                }
        Please let me know if I can assist any further.

        Comment


          #5
          ChrisL,

          Is it limited to 7 price levels? Cause as you can see on the chart attach there is 7 fibo lines but i have one more line code for 424% and it wont show up. It seems eveytime i add a new level, every level between 0 and 76 disappear.

          Also is there a way i can remove the diagonal line?

          Frank
          Thank you
          Attached Files

          Comment


            #6
            Hello frankduc, thanks for your reply.

            Yes, there are 7 levels to the retracements. If you would need a different kind of retracements, a custom drawing tool would need to be made for that.To remove the anchor line, go into the drawing tool settings and change the Anchor color to Transparent.

            Please let me know if I can assist any further.

            Comment


              #7
              Chris,

              I meant removing the line in the chart wihout removing the extentions by coding in the indicator. Transparent, users can still click on the line even invisible.

              Comment


                #8
                Hello frankduc, thanks for your reply.

                Unfortunately, I am not aware of a way to do that with the existing Fibonacci indicator. You would need to create a custom drawing tool that does not allow clicking the price anchors.

                Kind regards.

                Comment

                Latest Posts

                Collapse

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