Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

fibo time extension

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

    fibo time extension


    Hello, I am developing a strategy based on levels of fibo time extension. The fibo is currently plotted from the last low to the new high calculated at each tick. The problem is that I am not able to anchor the start of the fibo to the candle that marked the last minimum, but remains in the value of candles behind that is established (2). Could you help me? Thank you

    #2
    Hello kunkun80,

    Thank you for the post.

    If I have understood the question I believe you are asking how to know how many BarsAgo to use to find a specific bar when using OnEachTick, is that correct?

    If you have a certain bar which should be stored you generally would use the CurrentBar value at that time and store that to a variable. You can then subtract that from the CurrentBar at any point to find the total BarsAgo between those two points. Is that what you are trying to accomplish?

    I look forward to being of further assistance.

    Comment


      #3

      Hi Jesse, The candle that starts the momentum is defined. My long fibo has to start at the low of the first candle that starts a new swing (ninja indicator), the end of the fibo is updated according to new highs (I have solved that part). I guess it won't be too complex but I'm a bit of a ninja novice. Thank you

      Comment


        #4
        Hello kunkun80,

        Thank you for the reply.

        Just to clarify did you still need assistance with part of this? I am not certain from your reply if you still had a question or if you are working on a solution. If you still needed assistance can you provide more detail about what you needed help with?

        I look forward to being of further assistance.

        Comment


          #5
          Hello kunkun80,

          Thank you for the reply.

          What specifically did you need help with in regard to the beginning of the fibo?

          Was my comment in post 2 accurate on what you needed assistance with? I understand you are having trouble with something related to the placement but you would need to be much more specific as to what you need help with in your code.

          Did you already code something? If so what did you code and what part of that is not working? If you have a sample of the code you used and can provide a description of what is not working as you expect with that code that would help to better explain the question.

          I look forward to being of further assistance.

          Comment


            #6
            Hello kunkun80,

            Thank you for the reply.

            Are you trying to make the stationary start bar the same bar as when you set InicioSwing?

            If so you can use an int variable to store the CurrentBar at that time, the BarsAgo can then be calculated like the following:



            Code:
            [B]private int storedStartBar = 0;[/B]
            protected override void OnBarUpdate()
            {
                if (BarsInProgress != 0)
                    return;
            
                if (CurrentBars[0] < 2)
                    return;
            
                    // Set 1
                if ((Low[0] >= Swing1.SwingLow[0])
                        && (Buscamax == 0)
                        && (BuscaSwing == 0))
                {
                    Maximo = High[0];
                    Buscamax = 1;
                    InicioSwing = Low[0];
                    BuscaSwing = 2;
            [B]storedStartBar = CurrentBar;[/B]
            
                }
            
                    // Set 2
                if ((Buscamax == 1)
                        && (BuscaSwing == 2))
                {
                    Draw.FibonacciRetracements(this, @"swing Fibonacci retracements_1", false, 2, InicioSwing, 0, Maximo);
                    Draw.FibonacciTimeExtensions(this, @"swing FTE", false, [B]CurrentBar - storedStartBar[/B], InicioSwing, 0, Maximo);
                }
            I look forward to being of further assistance.

            Comment


              #7
              It works! Thanks!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by NullPointStrategies, Today, 05:17 AM
              0 responses
              51 views
              0 likes
              Last Post NullPointStrategies  
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              127 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              69 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              42 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              46 views
              0 likes
              Last Post TheRealMorford  
              Working...
              X