Not an EA, but an indicator

Place your new trading idea here to see if someone can automate it.
GT3RS
Trader
Posts: 198
Joined: Fri Dec 23, 2011 1:58 pm

Not an EA, but an indicator

Post by GT3RS »

Hi all,

I would really appreciate it if someone could code an indicator for a pattern I am working with.

It's called a swing failure pattern or SFP for short.

Basically, say we have a high on our charts.

A swing failure would be when price drops away from the first high and then comes back to re-test it. the retest BREAKS the previous high, but then closes BELOW the previous high.

Reverse for swing failure low.

There needs to be at least 10 candles between the original high/low and the SFP high/low.

I've attached a couple of charts to show what I mean. Ideally I would like arrows to pick these patterns out, so I can scan my charts better, and continue to develop what I'm working on.

It would be good if it could somehow be multi timeframe as well!

And of course, I'm happy to share the strategy when it comes to fruition!! :mrgreen: :mrgreen:

Although I'm sure that by just looking at the charts posted below, you will see why I am interested in these patterns!!! :lol: :lol: :lol:

Many thanks,

Rob
You do not have the required permissions to view the files attached to this post.
GT3RS
Trader
Posts: 198
Joined: Fri Dec 23, 2011 1:58 pm

Re: Not an EA, but an indicator

Post by GT3RS »

And here's another one just to demonstrate.

This was also a SFP on D1 timeframe.

Look what happened after............

:shock: :shock: :shock: :shock:
You do not have the required permissions to view the files attached to this post.
GT3RS
Trader
Posts: 198
Joined: Fri Dec 23, 2011 1:58 pm

Re: Not an EA, but an indicator

Post by GT3RS »

I hope someone can see the benefit of coding this little indicator now!!

:D :D
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: Not an EA, but an indicator

Post by gaheitman »

GT3RS wrote:Hi all,

I would really appreciate it if someone could code an indicator for a pattern I am working with.

It's called a swing failure pattern or SFP for short.

Basically, say we have a high on our charts.

A swing failure would be when price drops away from the first high and then comes back to re-test it. the retest BREAKS the previous high, but then closes BELOW the previous high.

Reverse for swing failure low.

There needs to be at least 10 candles between the original high/low and the SFP high/low.
Quick question. Looking at the "diagram" below, can you fill in the blanks?


[X bars] [Swing High Bar] [Y bars >= 10 bars] [Swing Failure Bar]

What are the maximum and minimum values of X to determine we have a Swing High, and what is the maximum value for Y?

I think the indicator would be fairly easy to write if we can set those values. It might even be a reasonable though not necessary excuse to use recursion. :D

George
GT3RS
Trader
Posts: 198
Joined: Fri Dec 23, 2011 1:58 pm

Re: Not an EA, but an indicator

Post by GT3RS »

gaheitman wrote:
GT3RS wrote:Hi all,

I would really appreciate it if someone could code an indicator for a pattern I am working with.

It's called a swing failure pattern or SFP for short.

Basically, say we have a high on our charts.

A swing failure would be when price drops away from the first high and then comes back to re-test it. the retest BREAKS the previous high, but then closes BELOW the previous high.

Reverse for swing failure low.

There needs to be at least 10 candles between the original high/low and the SFP high/low.
Quick question. Looking at the "diagram" below, can you fill in the blanks?


[X bars] [Swing High Bar] [Y bars >= 10 bars] [Swing Failure Bar]

What are the maximum and minimum values of X to determine we have a Swing High, and what is the maximum value for Y?

I think the indicator would be fairly easy to write if we can set those values. It might even be a reasonable though not necessary excuse to use recursion. :D

George
Hi George,

I'm not sure I fully understand you!! Sorry, maths was never my strong point!!

If you could possibly rephrase your question and just assume you're dealing with a complete imbecile, I'll see if I can answer!!

Many thanks,

Rob
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: Not an EA, but an indicator

Post by gaheitman »

GT3RS wrote:Hi George,

I'm not sure I fully understand you!! Sorry, maths was never my strong point!!

If you could possibly rephrase your question and just assume you're dealing with a complete imbecile, I'll see if I can answer!!

Many thanks,

Rob
We have two bars we care about, the first swing high (SH) and the second swing high (SHF) that fails to close above the first swing high. You've told us that the distance between the SH bar and the SHF bar has to be at least 10 bars, so we have the minimum distance. What is the maximum number of bars that can be between SH and SHF? Also, the SH is a swing high because it is higher than a certain number of bars before it and after it. We know that there has to be at least 10 bars after it, but how many bars before it?

So, to diagram it a different way, each letter below is a bar. The swing high will be "H" and the swing high failure will be F.


AAAAAAAAAAAAHBBBBBBBBBBFCCCCCCCCC

All the A bars have lower highs than the H bar, all the B bars have lower highs than the H and the F bar, and we don't actually have any C bars yet, since we detect the F bar at the close of the F bar.

How many A bars do we have to have for H to be considered a swing high, and what is the maximum number of B bars we can have between H and F for it to still count as a valid pattern?

George
GT3RS
Trader
Posts: 198
Joined: Fri Dec 23, 2011 1:58 pm

Re: Not an EA, but an indicator

Post by GT3RS »

Hi George,

Thanks for being patient with me!!

OK, hopefully this will do it!!!

Minimum number of bars between original swing and Swing Failure = 10, as already stated.

Maximum number of bars between original swing and Swing failure = 150.

The difficult one to define is the number of bars before the original swing.

How about if we use 10 as a starting point and see how the indicator paints?

I appreciate that there will still be some discretion involved in picking out what I see as being valid Swing Failure Patterns.

For example, price might form a high, then only come back down 10 pips, BUT stay there for another 10 bars before creating a SFP.

We probably need a minimum number of pips in the swing between the original high and the SFP high, but this will be different depending on the pair and timeframe you are looking at, so best to ignore for now.

If you can code something which picks out the following, it would be a great starting point:

Swing hi defined as having at least 10 lower candles preceding it.

Swing Failure high must be at least 10 candles AFTER the original high.

Maximum distance between swing highs is 150 candles.

I think if you can get that much into the indicator, I can eyeball the charts and maybe we can refine it further?

Many thanks in advance!!

Rob
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: Not an EA, but an indicator

Post by gaheitman »

GT3RS wrote:
Swing hi defined as having at least 10 lower candles preceding it.

Swing Failure high must be at least 10 candles AFTER the original high.

Maximum distance between swing highs is 150 candles.

I think if you can get that much into the indicator, I can eyeball the charts and maybe we can refine it further?

Many thanks in advance!!

Rob
How does this look?

This is your cable example.
pic_01 2012-01-31 04.46.gif
George

EDIT: Attachment deleted.
You do not have the required permissions to view the files attached to this post.
GT3RS
Trader
Posts: 198
Joined: Fri Dec 23, 2011 1:58 pm

Re: Not an EA, but an indicator

Post by GT3RS »

Hey George!!

This looks like a fantastic start! Let me have a good look at it and I'll get back to you.

In the meantime, MANY MANY thanks!!

Rob
GT3RS
Trader
Posts: 198
Joined: Fri Dec 23, 2011 1:58 pm

Re: Not an EA, but an indicator

Post by GT3RS »

Hi George,

Just a first look.

Attached Cable H1 chart.

There appears to be several missing SFPs. This is almost certainly due to my "mathematical" definitions.......

I have pointed out a couple of areas which I would consider to be Swing Failure Patterns.

Not sure how to describe them mathematically though!!
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Ideas for Possible Automation”