Fibonacci Expansion tool live

Hi,

Would there be any way to make the Fibonacci Expansion tool live?
For example, when using it to find a 100 percent level of a prior swing
below a high, the level will automatically adjust up as the chart makes
new highs. So in this way it could be used as a sort of trailing stop.
(The way the ‘Moving Retracement’ tool does.)

Hi David,

You could do that with a simple script based on one of the swing types (Gann, Point, Percent, Volatility etc).

Search the forum for Gann Swings as there are many examples of how you could do it.

All the best

Mathew


//Define swing criteria; 
PS1 = PERCENTSWING(PERCENT=.05); 
//Get current swing range; 
R1 = SWINGEND(PS1) - SWINGSTART(PS1); 
//Get previous (same direction) swing range; 
R2 = SWINGEND(PS1)[1] - SWINGSTART(PS1)[1]; 
R3 = SWINGEND(PS1)[2] - SWINGSTART(PS1)[2];
R4= SWINGEND(PS1); 

V1 = R4 + R2; 
V1

Hi Matthew,
Thankyou for telling me it is possible. I came up with this. It works.
I’m using it as a “Show Plot”. Is this the best way to do it?
Also, would there be any way to have the option of just showing
the most recent occurrence?

–Thanks again,
David

Hi David,

The script looks good. With regards to your second query, you can wrap the V1 line around a LAST() function, this will have the line plot only the latest value (like a Horizontal Line).

//Define swing criteria; 
PS1 = PERCENTSWING(PERCENT=.05); 
//Get current swing range; 
R1 = SWINGEND(PS1) - SWINGSTART(PS1); 
//Get previous (same direction) swing range; 
R2 = SWINGEND(PS1)[1] - SWINGSTART(PS1)[1]; 
R3 = SWINGEND(PS1)[2] - SWINGSTART(PS1)[2];
R4= SWINGEND(PS1); 
V1 = R4 + R2; 
LAST(V1)

I didn’t know about the Last Function. Thanks again.