Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Edgar_Herrera), 1,110 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Pattern algo how work ? #482108
12/25/20 22:08
12/25/20 22:08
Joined: Jun 2016
Posts: 49
F
faustf Offline OP
Newbie
faustf  Offline OP
Newbie
F

Joined: Jun 2016
Posts: 49
hi guys , i am new of Zorro , i try to understand a script Workshop7 , what type of pattern is this ?? and how can create it, if i have for example a shouting star ? ?
Code
if(adviseLong(PATTERN+FAST+2+RETURNS,0,
		priceHigh(2),priceLow(2),priceClose(2),
		priceHigh(1),priceLow(1),priceClose(1),
		priceHigh(1),priceLow(1),priceClose(1),
		priceHigh(0),priceLow(0),priceClose(0)) > 50)
		enterLong();


thanks at all

Re: Pattern algo how work ? [Re: faustf] #482110
12/26/20 09:37
12/26/20 09:37
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
That has, as said, nothing to do with traditional patterns.
So you can't create a shouting star, nor the shooting star, or maybe you can.

Maybe you should have a look at the latest article of Petra on the TFH about Perry Kaufmann patterns.
You may find some clear difference.

But the pattern analyzer can also analyze different things, you could use the shooting star and maybe also the shouting star fom TA-LIB and take the return value of that (100 or -100) as one value of your pattern, besides other values, e.g. bool is close above or below SMA and so on.

if(adviseLong(PATTERN+2+RETURNS,0, <<------- PATTERN+2 devides the patterns in two groups, therefore input must be possible to be divided by two, RETURNS is the training target, the 0 is the number of features within a signals array if more than 3 are used.
priceHigh(2),priceLow(2),priceClose(2), <<------- PATTERN+2 means the lines are divided in two groups, which are compared, in this very case, the actual bar, and the previous bar, are grouped (0) and (1), then the other group previous bar (1) and (2) are grouped.
priceHigh(1),priceLow(1),priceClose(1),
priceHigh(1),priceLow(1),priceClose(1),
priceHigh(0),priceLow(0),priceClose(0)) > 50) <<----- then those price developments are comapred and the advise decides if go long or short on the pattern (compare within pattern groups)
enterLong();
if(adviseShort() > 50)
enterShort();
}


priceHigh(2),priceLow(2),priceClose(2), <<-------- group 1
priceHigh(1),priceLow(1),priceClose(1),


priceHigh(1),priceLow(1),priceClose(1), <<-------- group 2
priceHigh(0),priceLow(0),priceClose(0)

Last edited by danatrader; 12/26/20 15:31.
Re: Pattern algo how work ? [Re: faustf] #482112
12/26/20 10:13
12/26/20 10:13
Joined: Jun 2016
Posts: 49
F
faustf Offline OP
Newbie
faustf  Offline OP
Newbie
F

Joined: Jun 2016
Posts: 49
where i find the article Petra on the TFH about Perry Kaufmann patterns. ??

Re: Pattern algo how work ? [Re: faustf] #482113
12/26/20 12:45
12/26/20 12:45
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357

Re: Pattern algo how work ? [Re: faustf] #482117
12/26/20 23:40
12/26/20 23:40
Joined: Jun 2016
Posts: 49
F
faustf Offline OP
Newbie
faustf  Offline OP
Newbie
F

Joined: Jun 2016
Posts: 49
thanks , i read it , but i think .......i not undesrtand o_O , i understand she write in article: "from the TA library, the pattern functions return +100 for a bullish pattern, -100 for a bearish pattern, and 0 for no pattern.", but how generate this portion of code ? if(priceLow(0) > priceHigh(1) && priceClose(0) < priceOpen(0))
this part of code , rapresents this ? https://ibb.co/JBJ9zpj
how is possible describe a pattern if you not give min and max pips ? , example priceClose(0) < priceOpen(0) , if priceClose is 0.91235 and priceOpen is 0.91236 is true but have low pips body candel and have a sense , if priceClose is 0.91235 and priceOpen is 0.92325 , is another type of candel and have another sense , how zorro undesrtand what type of pattern i want ?

Re: Pattern algo how work ? [Re: faustf] #482119
12/27/20 00:43
12/27/20 00:43
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
Workshop 7 is just a sequence of highs, lows , close, independant of size, the aim is to identify patterns of high, low, close sequence with a prediction power of three days.
It also states "BTW, this strategy does not work", it is just an example.

So of course you can also do something more exact, e.g. with ranges, if(priceHigh()-priceLow() > ATR(4)) and so on.
One thing is rice candle patterns, the other thing is "patterns".

Patterns can be anything, it can also be, if price on wednesday is lower than on tuesday but higher than on monday.

BTW, the patterns in TA-LIB have the definition as they are delivered by the TA-LIB developers.
Of course you may still code your script to only take the one bigger than, or smaller than ... into account, or just the ones above or below a moving average, and so on.

Last edited by danatrader; 12/27/20 00:49.
Re: Pattern algo how work ? [Re: faustf] #482120
12/27/20 10:37
12/27/20 10:37
Joined: Jun 2016
Posts: 49
F
faustf Offline OP
Newbie
faustf  Offline OP
Newbie
F

Joined: Jun 2016
Posts: 49
i try to insert different expression but return me error
if(adviseLong(PATTERN+FAST+2+RETURNS,0,
price(2)>price(1) && price(1)<priceClose(1)))
enterLong();

Syntax error : cant go flase goto:double
price(2)>price(1) && price(1)<priceClose(1)))

Re: Pattern algo how work ? [Re: faustf] #482122
12/27/20 11:55
12/27/20 11:55
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
Well, first, if(adviseLong(PATTERN+FAST+2+RETURNS,0, <<<---- the "2" defines that you have two pattern groups

price(2)>price(1) && price(1)<priceClose(1))) <<<---- "&&" connects your two statements, so you do not have two pattern groups

if(adviseLong(PATTERN+FAST+2+RETURNS,0,
bla,bla,bla,
bla,bla,bla,
bla,bla,bla,
bla,bla,bla,) > 50) <<<---- replace? you did also remove the condition what to do with the prediction result
enterLong();


And at last, the PATTERN function searches in historic data for patterns, defined by characteristics, so you don't feed a pattern, you define the characteristics you want it to "search" for patterns.

This:
price(2)>price(1) && price(1)<priceClose(1) <<<---- you try to feed it with a pattern.

I would strongly advise you, to read all the TFH, buy the black book, go from there.
BTW, the black book is probably the fastest way to get you up and running.

Last edited by danatrader; 12/27/20 11:56.
Re: Pattern algo how work ? [Re: faustf] #482123
12/27/20 16:29
12/27/20 16:29
Joined: Jun 2016
Posts: 49
F
faustf Offline OP
Newbie
faustf  Offline OP
Newbie
F

Joined: Jun 2016
Posts: 49
another questions sorry , zorro use price = Returns the mean price , but how calculate the mean price ? use high and low /2 is possible ask at price use for example open + close /2 instead of close+open/2 ?
thankz
and why if i use this
Code
if(adviseLong(PATTERN+FAST+1+RETURNS,0,
		price(2)>price(1) && price(1)<priceClose(1))>50)  
		enterLong();


not return nothing like if not open operation o_O

Last edited by faustf; 12/27/20 16:37.
Re: Pattern algo how work ? [Re: faustf] #482124
12/27/20 16:37
12/27/20 16:37
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
if(adviseLong(PATTERN+FAST+1+RETURNS,0, <<---- don't know if 1 works, never tried, but...
price(2)>price(1) && price(1)<priceClose(1))>50) <<---- this is not certeinly characteristics to "search for a pattern" this is a condition
enterLong();


This could work:
if(adviseLong(PATTERN+FAST+1+RETURNS,0,
price(2),price(1),price(0),
priceClose(2),priceClose(1),priceClose(0))>50)
enterLong();

Last edited by danatrader; 12/27/20 17:09.
Page 1 of 2 1 2

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1