January 14, 2021 at 2:51 pm #61997Ian
- Topics: 5
- Replies: 5
- Posts: 10
On a Gann Swing Chart, I’d like to be able identify gaps in the swing, such as the one pictured below. These sort of gaps often, but not always, indicate a change of trend or strengthening of a trend.
In the first example attached, there was an initial slow and steady uptrend (a few higher swing highs and higher swing lows), then after the gap, the uptrend accelerated. The gap can be an early clue that sentiment has shifted. The swing down that created the gap was < 50%, which can be another clue as to strength.
A second example is also attached.
I’ve looked at the GANNSWING() function and the inbuilt scripts, Gann Swing Bull Gap Greater and Gann Swing Bull Gap Less but they don’t seem to be written to identify gaps.
Not sure where to start with this but hopefully someone can help.
You must be logged in to access attached files.January 15, 2021 at 12:01 pm #62003Mathew
- Topics: 32
- Replies: 1,648
- Posts: 1,680
The first thing I always do with Swings is draw out the pattern I am interested in and then number the swings. Remember that it is not until the last swing turns up that we will have our signal, so that is where we expect to see the arrow. In the image below I have my numbers just to the left of each line.
Also, remember that we can reference previous swings by using square brackets. If there are no square brackets, I am working with the last swing line (0). I use the variables “g1” to make the script easier to read.
Given that, the code will be12345678910// add the swing to the variable g1g1 = GANNSWING(SWINGCOUNT=2, USEINSIDE=True);// is swing line 0 upc1 = SwingEnd(g1) > SwingStart(g1);// is the start of swing 0 higher than the start of swing 3c2 = SwingStart(g1) > SwingStart(g1);c1 and c2
Hope that helps
MathewJanuary 15, 2021 at 1:25 pm #62007Tim
- Topics: 10
- Replies: 17
- Posts: 27
Hi Ian, below is a script, if you tell me what your after I can give you a bit of a hand even though my scripting skills are poor
GS1 = GANNSWING(SWINGCOUNT=1, USEINSIDE=True, METHOD=Use Outside Bar, USECLUSTERS=True);
c1 = SWINGUP(GS1);
c2 = SWINGSTART(GS1) < SWINGSTART(GS1, 1);
c3 = SWINGSTART(GS1, 1) > SWINGSTART(GS1, 3);
c4 = SWINGSTART(gs1) > SWINGSTART(gs1,3);
s1 = SWINGEND(GS1);
U1 = SWINGUP(GS1);
V1 = IF(S1 < SWINGEND(GS1),SWINGEND(GS1),S1) ;
c7 = high() CrossesAbove V1 and U1 == 1;
c1 and c2 and c3 and c4 and c7
- You must be logged in to reply to this topic.