Re: Two Candles Pattern"s"

ahmedalhoseny wrote:
krog wrote:

Enter as 1 or -1, and it will convert to the opposite for shorts. If you enter "1,1,1,-1,-1,-1" (w,w,w,b,b,b) for long entry, it will also include "-1,-1,-1,1,1,1" (b,b,b,w,w,w) for short entry.

Could you make it non directional indicator i mean for example "1,1,1" to be tested for buy and sell ,also"-1,-1,-1" to be tested for sell and buy  !!!!

I find the answer  Bullish , bearish  smile 

But what is the use of draw only and if it is draw only why that option appear in some strategies by generator !!!!

Re: Two Candles Pattern"s"

I don't know, it's pretty fast so you can add a lot. But the bigger problem is, at some point, if you add too many, you get a signal for everything, just a bunch of random noise. Ex, If you have 3-bar patterns, there are only 8 possible combinations (2^3). If you have 8 patterns, I think you would get a signal on every 3rd bar in your data.
I don't use this indicator that often, because it needs a lot of thinking and review, when you get results, to look at the trades and statistics and figure out if the results are meaningful, or random noise.


Draw Only -- this lets me remove the indicator signals without removing it from the strategy slot, to see the indicator's effect. It is a shortcut, if I remove an indi from the strategy, I usually forget what parameters I just had up, and have to re-add, takes over 3 seconds so I lose my thought. It's unfortunate it comes up in Generator, it wastes cycles. Also, If it's in Close Filter, I don't think it's disabled, it causes problems.

Re: Two Candles Pattern"s"

krog wrote:

I don't know, it's pretty fast so you can add a lot. But the bigger problem is, at some point, if you add too many, you get a signal for everything, just a bunch of random noise. Ex, If you have 3-bar patterns, there are only 8 possible combinations (2^3). If you have 8 patterns, I think you would get a signal on every 3rd bar in your data.
I don't use this indicator that often, because it needs a lot of thinking and review, when you get results, to look at the trades and statistics and figure out if the results are meaningful, or random noise

so in this case you mean that all
aiCodes[0] = new int[] {-1,1,-1,1,1,1,-1,-1,-1};     
aiCodes[1] = new int[] {1,1,1,1,1,1,1,1,1};           
aiCodes[2] = new int[] {1,-1,1,1,1};     

will trigger the entry at each strategy  so i will find three different candle formation each time !!

29 (edited by ahmedalhoseny 2012-08-21 10:53:19)

Re: Two Candles Pattern"s"

krog , i find a different bar formation in the chart completely different from the coded formations!!!!!

what iam doing wrong!!!!

See attached Picture http://www.flickr.com/photos/85383260@N … hotostream

Re: Two Candles Pattern"s"

krog, initial testing is excellent, dropped the coding for one pattern and its inverse and identified them all. Once again thanks.

footon, in your coding you have doji2 as component(1) value and I cannot see where it gets it's value from, could this be the error problem?

Re: Two Candles Pattern"s"

I don't understand fully what parameters you can include in the combo box, is there anyway you could input the binary code of the pattern your looking for in the combo box instead of altering the coding and then reloading the indicator?
Thanks
Mick

Re: Two Candles Pattern"s"

1st error msg
http://www.flickr.com/photos/85383260@N … hotostream

Re: Two Candles Pattern"s"

Jagmanmick wrote:

footon, in your coding you have doji2 as component(1) value and I cannot see where it gets it's value from, could this be the error problem?

No value, it goes for short condition to keep it quiet, patterns it finds are long only.

Re: Two Candles Pattern"s"

I talked about it in my post.

35 (edited by Jagmanmick 2012-08-21 15:03:33)

Re: Two Candles Pattern"s"

footon, Just a thought.
I've done a spreadsheet for the 9 bar patterns in the format for krog's indi attached hope they're correct. Can just copy and paste across.
Mick

Post's attachments

Patternator 9 bar codes..xls 51.5 kb, 8 downloads since 2012-08-21 

You don't have the permssions to download the attachments of this post.

Re: Two Candles Pattern"s"

ahmedalhoseny wrote:
krog wrote:

I don't know, it's pretty fast so you can add a lot. But the bigger problem is, at some point, if you add too many, you get a signal for everything, just a bunch of random noise. Ex, If you have 3-bar patterns, there are only 8 possible combinations (2^3). If you have 8 patterns, I think you would get a signal on every 3rd bar in your data.
I don't use this indicator that often, because it needs a lot of thinking and review, when you get results, to look at the trades and statistics and figure out if the results are meaningful, or random noise

so in this case you mean that all
aiCodes[0] = new int[] {-1,1,-1,1,1,1,-1,-1,-1};     
aiCodes[1] = new int[] {1,1,1,1,1,1,1,1,1};           
aiCodes[2] = new int[] {1,-1,1,1,1};     

will trigger the entry at each strategy  so i will find three different candle formation each time !!

This is a good example, this indicator is not user-friendly, and it is a lot of noise.

aiCodes[2] is a subset of aiCodes[0]. It will always find [2] first because it is shorter. And there is a lot of overlap -- if you look at the Histogram and try to see the pattern, it is almost impossible, the alternating up-and-down bars look the same.

Re: Two Candles Pattern"s"

Jagmanmick wrote:

I don't understand fully what parameters you can include in the combo box, is there anyway you could input the binary code of the pattern your looking for in the combo box instead of altering the coding and then reloading the indicator?
Thanks
Mick

(If you mean my indicator)
Unfortunately, no, the parameters for an indicator don't have one for user entry, only list combo boxes, the numeric steppers (only 6 of them), and the 2 check boxes. I agree, recompiling is a drag.

Search Mode (with the check box and the index and length parameters) may help with this. It will sample patterns in your data, no need to type them in. Also, of all combinations, there are probably quite a few that never occur. If you type it in, you'll spend the time to recompile, then see has 0 trades; if you sample from existing data, you can be sure the pattern occurred at least once.

Re: Two Candles Pattern"s"

Jagmanmick wrote:

footon, Just a thought.
I've done a spreadsheet for the 9 bar patterns in the format for krog's indi attached hope they're correct. Can just copy and paste across.
Mick

Other format please, can't open xls for some unknown reason. What you want me to do with it?

Did you get my "search engine" working? What you think, is it light at the end of the tunnel or just the train? More comments maybe?

I had an idea yesterday after I had finished it, it was how to make it simpler, but now I don't remember it exactly... These things are set in life that the first version tends to be (over)complicated, after some thought it becomes simpler and more efficient.

Re: Two Candles Pattern"s"

footon wrote:

Other format please, can't open xls for some unknown reason. What you want me to do with it?

Did you get my "search engine" working? What you think, is it light at the end of the tunnel or just the train? More comments maybe?

I had an idea yesterday after I had finished it, it was how to make it simpler, but now I don't remember it exactly... These things are set in life that the first version tends to be (over)complicated, after some thought it becomes simpler and more efficient.

Sorry which format is that or should I have read it somewhere at the beginning of the topic?
Do with it what you wish, I've done it because as I test each one I mark them up for wins and losses so I know which one's to add to my strategy. They have been done in the format you enter them into krogs indi (1,-1,1, etc) I copy and paste saves me typing.
Decided to read your explanation after looking at the coding and the error is bar number related. Couldn't load it at first so I dropped the number of bars below 10000 and it loads and runs OK.(I don't read manuals or explanations until I have a problem). Will continue testing tomorrow and report back then.
More often than not Simplest is best things can get too complicated.

Re: Two Candles Pattern"s"

krog wrote:

(If you mean my indicator)
Unfortunately, no, the parameters for an indicator don't have one for user entry, only list combo boxes, the numeric steppers (only 6 of them), and the 2 check boxes. I agree, recompiling is a drag.

Search Mode (with the check box and the index and length parameters) may help with this. It will sample patterns in your data, no need to type them in. Also, of all combinations, there are probably quite a few that never occur. If you type it in, you'll spend the time to recompile, then see has 0 trades; if you sample from existing data, you can be sure the pattern occurred at least once.

Thought that was the case but best to check thanks, if you don't ask you'll never know either way. I've tested loads of patterns in the strategy I'm trying to build and many are giving no trades and many are predominantly losers and a few are predominantly winners and your indi should make testing a lot quicker.

Re: Two Candles Pattern"s"

footon, Open Document spreadsheet attached, you probably won't be interested in it.

Post's attachments

Patternator 9 bar codes..ods 8.31 kb, 4 downloads since 2012-08-21 

You don't have the permssions to download the attachments of this post.

Re: Two Candles Pattern"s"

krog wrote:
ahmedalhoseny wrote:
krog wrote:

I don't know, it's pretty fast so you can add a lot. But the bigger problem is, at some point, if you add too many, you get a signal for everything, just a bunch of random noise. Ex, If you have 3-bar patterns, there are only 8 possible combinations (2^3). If you have 8 patterns, I think you would get a signal on every 3rd bar in your data.
I don't use this indicator that often, because it needs a lot of thinking and review, when you get results, to look at the trades and statistics and figure out if the results are meaningful, or random noise

so in this case you mean that all
aiCodes[0] = new int[] {-1,1,-1,1,1,1,-1,-1,-1};     
aiCodes[1] = new int[] {1,1,1,1,1,1,1,1,1};           
aiCodes[2] = new int[] {1,-1,1,1,1};     

will trigger the entry at each strategy  so i will find three different candle formation each time !!

This is a good example, this indicator is not user-friendly, and it is a lot of noise.

aiCodes[2] is a subset of aiCodes[0]. It will always find [2] first because it is shorter. And there is a lot of overlap -- if you look at the Histogram and try to see the pattern, it is almost impossible, the alternating up-and-down bars look the same.

Krog , lets imagine we have two patterns only [0] and [1] is it possible to build indicator and to select one pattern each time using"? 1 : 0;"  and then do the calculations for patterns separately!!!!

Re: Two Candles Pattern"s"

krog wrote:
ahmedalhoseny wrote:
krog wrote:

I don't know, it's pretty fast so you can add a lot. But the bigger problem is, at some point, if you add too many, you get a signal for everything, just a bunch of random noise. Ex, If you have 3-bar patterns, there are only 8 possible combinations (2^3). If you have 8 patterns, I think you would get a signal on every 3rd bar in your data.
I don't use this indicator that often, because it needs a lot of thinking and review, when you get results, to look at the trades and statistics and figure out if the results are meaningful, or random noise

so in this case you mean that all
aiCodes[0] = new int[] {-1,1,-1,1,1,1,-1,-1,-1};     
aiCodes[1] = new int[] {1,1,1,1,1,1,1,1,1};           
aiCodes[2] = new int[] {1,-1,1,1,1};     

will trigger the entry at each strategy  so i will find three different candle formation each time !!

This is a good example, this indicator is not user-friendly, and it is a lot of noise.

aiCodes[2] is a subset of aiCodes[0]. It will always find [2] first because it is shorter. And there is a lot of overlap -- if you look at the Histogram and try to see the pattern, it is almost impossible, the alternating up-and-down bars look the same.

I have Two Questions
Q1: So it will search the three patterns starting from the shortest one BUT is it search each pattern separately or search for the three at the same time " so we could see a strategy having mix of two or three patterns!"

Q2: in my post 29 and when test visually i find  a subset of  aiCodes[2] = new int[] {1,-1,1,1,1};   which is
{1,-1,1,1,};  Is that possible !!

Regards

44 (edited by ahmedalhoseny 2012-08-22 11:24:31)

Re: Two Candles Pattern"s"

Krog
i think i found a bug
the indicator takes trade while it still counting the bars " it take the trade while it still counting last bar !!!!!"

I checked and i found you select previous bar "how come" !!! 

Example aiCodes[2] = new int[] {1,-1,1,1,1};  it should count 5 bars then go in the 6th bar as follow

(up) (dn) (up) (up) (up) (Go)  but what actually happen (up) (dn) (up) (up) (up&go) 

Correct me if iam wrong

45 (edited by ahmedalhoseny 2012-08-22 12:14:31)

Re: Two Candles Pattern"s"

footon wrote:

Reading the indi - the bar with the trade shows three numbers - first, second and third. That's the combination of the triggering pattern, you have to match the number to the matrix to figure out what pattern it exactly is. That's pretty straightforward

types of trades found in a strategy using indicator i found these 4 bar patterns
2,5,8
2,4,8
2,4,7
1,4,7
Q1: Now i need to compare to matrix !!!!! what matrix ?

Q2: all trades are long only even when applied the same strategy with other time frames !!!!

Re: Two Candles Pattern"s"

Q2: that's correct, all trades are long. If you want to know how it fairs when your proposed conditions are for short, then you have to change components values,
from

Component[0].Value     = golong;
Component[1].Value     = doji2;

to

Component[0].Value     = doji2;
Component[1].Value     = golong;

Q1: it's in the source:

cndtn[iBar,0] = High[iBar - 1] > High[iBar - 2] ? 1 : 0;
                cndtn[iBar,1] = High[iBar - 1] > Low[iBar - 2] ? 1 : 0;
                cndtn[iBar,2] = High[iBar - 1] > Close[iBar - 2] ? 1 : 0;

                cndtn[iBar,3] = Low[iBar - 1] > High[iBar - 2] ? 1 : 0;
                cndtn[iBar,4] = Low[iBar - 1] > Low[iBar - 2] ? 1 : 0;
                cndtn[iBar,5] = Low[iBar - 1] > Close[iBar - 2] ? 1 : 0;

                cndtn[iBar,6] = Close[iBar - 1] > High[iBar - 2] ? 1 : 0;
                cndtn[iBar,7] = Close[iBar - 1] > Low[iBar - 2] ? 1 : 0;
                cndtn[iBar,8] = Close[iBar - 1] > Close[iBar - 2] ? 1 : 0;

Look at the second dimension in the index, it's from 0-8.

258 means:

cndtn[iBar,2] = High[iBar - 1] > Close[iBar - 2] 
cndtn[iBar,5] = Low[iBar - 1] > Close[iBar - 2] 
cndtn[iBar,8] = Close[iBar - 1] > Close[iBar - 2] 

Re: Two Candles Pattern"s"

@ footon

1- So this indicator is a two candles pattern indicator Not a three candles pattern Right!!

2- I notice "untill now" it select one condition from each group "0,1,2" "3,4,5" "6,7,8" so we cannot see for example 0 and 2 combined with a third number!!!!!  is that true !!!

3- We have two have two versions one for buy and another for sell " they donot have to select a matched pattern "

Re: Two Candles Pattern"s"

ahmedalhoseny wrote:

@ footon

1- So this indicator is a two candles pattern indicator Not a three candles pattern Right!!


Find 10 differences between YOUR and MY previous posts:

in first post ahmedalhoseny wrote:

Using Three Combinations:
High[iBar - 1] > Close[iBar - 2] && Low[iBar - 1] > Close[iBar - 2] && Close[iBar - 1] > Close[iBar - 2]

in post nr 46 Footon wrote:

cndtn[iBar,2] = High[iBar - 1] > Close[iBar - 2]
cndtn[iBar,5] = Low[iBar - 1] > Close[iBar - 2]
cndtn[iBar,8] = Close[iBar - 1] > Close[iBar - 2]

ahmedalhoseny wrote:

2- I notice "untill now" it select one condition from each group "0,1,2" "3,4,5" "6,7,8" so we cannot see for example 0 and 2 combined with a third number!!!!!  is that true !!!

I wrote a bloody paragraph about it in post nr 18, and before in post nr 9, I'm not going to repeat it no more... I CANNOT EXPLAIN IT ANY SIMPLER, SORRY!

Loop goes like this:
036
037
038
046
047
etc

49 (edited by ahmedalhoseny 2012-08-22 13:58:12)

Re: Two Candles Pattern"s"

Please fotton Cheers up
we are testing new indicators so  we need a room to discuses
Donot be angry smile ok


And to explain more
1- in my 1st post i copied and past a part from my excel sheet which cover the two candles only and when i asked the 1st question in post 47 i mean if that concept " loops" could be extended to cover three and four candles !!!

2- again when i asked the second question in post 47 i mean if you could make it more dynamic
and i will take your loop example as a reference
Loop goes like this:
036
037
038
046
047

could it goes like this
03
04
05
06
07
......etc then
036
037
038
...... etc

Thanks again for your efforts

50 (edited by Jagmanmick 2012-08-22 15:48:12)

Re: Two Candles Pattern"s"

footon looks like you should have your relaxing music on.
Had a look at your indi, Idea's great, like the fact that you can see which three parameters it's using. The memory error problem is a pain at the minute when loading the indi if you haven't reduced the number of bars but your coding looks OK so why it's happening is a mystery.
It wouldn't be difficult to change the parameters to a specific pattern search using the open as a parameter instead of High Low or Close or even use the first group for parameters between 1 & 2, second group between 2 & 3 and third group between 3 & 4 bar numbers. I may play with that if that's OK.
Jag