Jump to content

⤴️-Paid Ad- Check advertising disclaimer here. Add your banner here.🔥

Recommended Posts

Posted (edited)

Maybe someone would be kind enough to code it for you

 

Gann Swing Oscillator

Overview

The Gann Swing Oscillator has been adapted from Robert Krausz's book, "A W.D. Gann Treasure

Discovered".

The Gann Swing Oscillator helps define market swings. A market swing up is defined by 2 higher highs

while a market swing low is defined by 2 lower lows. An up-swing is indicated by a +1 value of the

oscillator while a down-swing is indicated by a -1 value.

Interpretation

The Gann Swing Oscillator is meant to be used in conjunction with the Gann HiLo Activator and Gann

Trend indicators to form a trading system methodology commonly referred to as the "New Gann Swing

Chartist Plan". Within this methodology the Gann Swing Oscillator is used to help determine market

direction for trading only with the current market trend.

{Market swing is defined as: Up = 2 higher highs, Down = 2 lower lows}

Us:= BarsSince(Sum(H>Ref(H,-1),2)=2);

Ds:= BarsSince(Sum(L<Ref(L,-1),2)=2);

Hc:= HighestSince(1,Us=0,H);

Lc:= LowestSince(1,Ds=0,L);

Sd1:= If(Us=0, If((L<>Lc) AND (Ref(L,-1)<>Lc), 1, 0), If(Ds=0, If((H<>HC) AND (Ref(H,-

1)<>Hc), -1, 0), 0));

Sd2:= If(Sd1=1,If(Ref(BarsSince(Sd1=1),-1) > Ref(BarsSince(Sd1=-1),-1), 1, 0), If(Sd1=-1,

If(Ref(BarsSince(Sd1=1),-1) < Ref(BarsSince(Sd1=-1),-1), -1, 0), 0));

TD1:= ValueWhen(1,Sd2<>0,Sd2);

 

Gann Trend Oscillator

Overview

The Gann Trend Oscillator has been adapted from Robert Krausz's book, "A W.D. Gann Treasure

Discovered".

The Gann Trend Oscillator helps define overall market trend direction. An up-trending market is

defined by a +1 value of the oscillator while a down-trending market is indicated by a -1 value.

Interpretation

The Gann Trend Oscillator is meant to be used in conjunction with the Gann HiLo Activator and Gann

Swing indicators to form a trading system methodology commonly referred to as the "New Gann

Swing Chartist Plan". Within this methodology the Gann Trend Oscillator is used to determine the

overall trend direction of the market.

{Market swing is defined as: Up = 2 higher highs, Down = 2 lower lows}

Us:= BarsSince(Sum(H>Ref(H,-1),2)=2);

Ds:= BarsSince(Sum(L<Ref(L,-1),2)=2);

Hc:= HighestSince(1,Us=0,H);

Lc:= LowestSince(1,Ds=0,L);

Sd1:= If(Us=0, If((L<>Lc) AND (Ref(L,-1)<>Lc), 1, 0), If(Ds=0, If((H<>HC) AND (Ref(H,-

1)<>Hc), -1, 0), 0));

Sd2:= If(Sd1=1,If(Ref(BarsSince(Sd1=1),-1) > Ref(BarsSince(Sd1=-1),-1), 1, 0), If(Sd1=-1,

If(Ref(BarsSince(Sd1=1),-1) < Ref(BarsSince(Sd1=-1),-1), -1, 0), 0));

TD1:= ValueWhen(1,Sd2<>0,Sd2);

{Swing Direction}

Sd:= TD1;

{Swing Change High}

Sch:= If(Sd=1 AND Ref(sd,-1)=-1, 1, 0);

{Swing Change Low}

Scl:= If(Sd=-1 AND Ref(Sd,-1)=1, 1, 0);

{Peak Value}

Pv:= If(Scl=1, HighestSince(1,Sch=1,H), 0);

{Trough Value}

Tv:= If(Sch=1, LowestSince(1,Scl=1,L), 0);

{Trend Direction}

Td:= If(H>ValueWhen(1,Pv>0,Pv), 1, If(L<ValueWhen(1,Tv>0,Tv), -1, 0));

{UpTrend=1 | DownTrend =-1}

Tdv:= ValueWhen(1,Td<>0,Td);

Edited by dk1aussie

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

⤴️-Paid Ad- Check advertising disclaimer here. Add your banner here.🔥

×
×
  • Create New...