Pesavento Patterns Indicator for MultiCharts

Studies that have been contributed to the community by other users. If you’ve got something useful to share, that’s great!
User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Pesavento Patterns Indicator for MultiCharts

Postby Andrew Kirillov » 08 Apr 2008

Attachments
Pesavento_Patterns.zip
(12.24 KiB) Downloaded 748 times
Pesavento_Patterns.png
(88.43 KiB) Downloaded 5691 times

2haerim
Posts: 502
Joined: 01 Sep 2006
Been thanked: 2 times

Application error when double-click the PLA

Postby 2haerim » 08 Apr 2008

After downloading and unzipping, I double-clicked the PLA file but got application error. It's ok when importing after running PLEditor first, though.

Please check.

SP
Posts: 455
Joined: 06 Feb 2006
Has thanked: 36 times
Been thanked: 283 times

Postby SP » 09 Apr 2008

Thanks Andrew for this nice feature.
One question: Is it possible to plot the zigzag to the latest curlow/curhigh barnumber if we have the same low or high price before reversing?

See the yellow markers.
Attachments
pesavento_patterns_2.PNG
(89.85 KiB) Downloaded 4631 times

btrader2
Posts: 31
Joined: 15 Jul 2007
Been thanked: 1 time

Postby btrader2 » 10 Apr 2008

Thank You Andrew, Very much appreciated!

zukkaweb
Posts: 125
Joined: 08 Feb 2008

Postby zukkaweb » 28 Apr 2008

Are there any other pattern that you coul post by pesavento?

Do you see ensign software?

zukkaweb
Posts: 125
Joined: 08 Feb 2008

Postby zukkaweb » 21 Aug 2008

have you got Gartley Pattern to share?

ax
Posts: 34
Joined: 21 Nov 2005
Has thanked: 15 times
Been thanked: 2 times

Gartley22

Postby ax » 03 Sep 2008

Try this one

ax
Attachments
Gartley22.zip
(4.24 KiB) Downloaded 762 times
Last edited by ax on 03 Sep 2008, edited 1 time in total.

ax
Posts: 34
Joined: 21 Nov 2005
Has thanked: 15 times
Been thanked: 2 times

Postby ax » 03 Sep 2008

Gartley 22 xml
Attachments
Gartley22.xml
(20.06 KiB) Downloaded 685 times

zukkaweb
Posts: 125
Joined: 08 Feb 2008

Postby zukkaweb » 04 Sep 2008

thanks, i try to convert in c# but it doesn't work, error in array and in body 1

ax
Posts: 34
Joined: 21 Nov 2005
Has thanked: 15 times
Been thanked: 2 times

Gartley22

Postby ax » 06 Sep 2008

Code: Select all

[LegacyColorValue = true];

{Gartley 222

Original Code written by Mark Conway

=================
Modified
by
deMicron
Oct. 09, 2004

1. Option to Delete Multiple Re-Draw Lines
2. Added 2-more Lines to complete the pattern
================


}

Inputs:
Length(100),
Strength(8),
Tolerance(0.10),
BullColor(Blue),
BearColor(Red),
thickness(2),
DelMulti(TRUE); { Deletes Multiple Re-Draw Lines}

Variables:
F1(0.618),
F2(0.786),
F3(1.27),
F4(1.618),
P1Bar(-1),
P2Bar(-1),
T1Bar(-1),
T2Bar(-1),
P1(0.0),
P2(0.0),
T1(0.0),
T2(0.0),
PTValid(False),
HLValid(False),
InZone(False),
GD(0.0),
XA(0.0),
AB(0.0),
BC(0.0),
CD(0.0),
AD(0.0),
C1(False),
C2(False),
C3(False),
C4(False),
ABdXA(0.0),
BCdAB(0.0),
CDdBC(0.0),
ADdXA(0.0),
TL1(-1),
TL2(-1),
TL3(-1),
TL4(-1),
TL5(-1),
TL6(-1),
TL7(-1),
TL8(-1);



P1Bar = SwingHighBar(1, High, Strength, Length);
P2Bar = SwingHighBar(2, High, Strength, Length);
T1Bar = SwingLowBar(1, Low, Strength, Length);
T2Bar = SwingLowBar(2, Low, Strength, Length);
If P1Bar <> -1 and
P2Bar <> -1 and
T1Bar <> -1 and
T2Bar <> -1 Then Begin
{Test for a bullish 222}
{Trough X is T2}
T2 = Low[T2Bar];
{Peak A is P2}
P2 = High[P2Bar];
{Trough B is T1}
T1 = Low[T1Bar];
{Peak C is P1}
P1 = High[P1Bar];
{D is the buy point}
GD = Low;
PTValid = P1Bar < T1Bar and T1Bar < P2Bar and P2Bar < T2Bar;
HLValid = P1 < P2 and T1 > T2 and P1 > T1;
InZone = GD < T1 and GD > T2 and P2 >= Highest(High, T2Bar);
If PTValid and HLValid and InZone Then Begin
XA = P2 - T2;
AB = P2 - T1;
BC = P1 - T1;
CD = P1 - GD;
AD = P2 - GD;
ABdXA = AB / XA; {AB should be 61.8% of XA}
C1 = ABdXA > F1 - Tolerance and ABdXA < F1 + Tolerance;
BCdAB = BC / AB; {BC should be 61.8-78.6% of AB}
C2 = BCdAB > F1 - Tolerance and BCdAB < F2 + Tolerance;
CDdBC = CD / BC; {CD should be 127-161.8% of BC}
C3 = CDdBC > F3 - Tolerance and CDdBC < F4 + Tolerance;
ADdXA = AD / XA; {AD should be 78.6% of XA}
C4 = ADdXA > F2 - Tolerance and ADdXA < F2 + Tolerance;
If C1 and C2 and C3 and C4 Then Begin
TL1 = TL_New(Date[T2Bar], Time[T2Bar], T2, Date[P2Bar], Time[P2Bar], P2);
If TL1 >= 0 Then Begin
TL_SetColor(TL1, BullColor);
TL_SetStyle(TL1, Tool_Solid);
TL_SetSize(TL1, 2);
End;
TL2 = TL_New(Date[P2Bar], Time[P2Bar], P2, Date[T1Bar], Time[T1Bar], T1);
If TL2 >= 0 Then Begin
TL_SetColor(TL2, BullColor);
TL_SetStyle(TL2, Tool_Solid);
TL_SetSize(TL2, 2);
End;
TL3 = TL_New(Date[T1Bar], Time[T1Bar], T1, Date[P1Bar], Time[P1Bar], P1);
If TL3 >= 0 Then Begin
TL_SetColor(TL3, BullColor);
TL_SetStyle(TL3, Tool_Solid);
TL_SetSize(TL3, 2);
End;

if (DelMULTI) then
begin
if (TL4>0) then TL_Delete(TL4);
if (TL5>0) then TL_Delete(TL5);
if (TL5>0) then TL_Delete(TL6);
end;


TL4 = TL_New(Date[P1Bar], Time[P1Bar], P1, Date, Time, GD);
If TL4 >= 0 Then Begin
TL_SetColor(TL4, BullColor);
TL_SetStyle(TL4, Tool_Solid);
TL_SetSize(TL4, thickness);
End;

TL5 = TL_New(Date[T1Bar], Time[T1Bar], T1, Date, Time, GD);
If TL5 >= 0 Then Begin
TL_SetColor(TL5, BullColor);
TL_SetStyle(TL5, Tool_Dotted);
TL_SetSize(TL5, thickness);
End;
TL6 = TL_New(Date[T2Bar], Time[T2Bar], T2, Date, Time, GD);
If TL6 >= 0 Then Begin
TL_SetColor(TL6, BullColor);
TL_SetStyle(TL6, Tool_Dotted);
TL_SetSize(TL6, thickness);
End;

TL7 = TL_New(Date[P2Bar], Time[P2Bar], P2, Date[P1Bar], Time[P1Bar], P1);
If TL7 >= 0 Then Begin
TL_SetColor(TL7, BullColor);
TL_SetStyle(TL7, Tool_Dotted);
TL_SetSize(TL7, thickness);
End;

TL8 = TL_New(Date[T2Bar], Time[T2Bar], T2, Date[T1Bar], Time[T1Bar], T1);
If TL8 >= 0 Then Begin
TL_SetColor(TL8, BullColor);
TL_SetStyle(TL8, Tool_Dotted);
TL_SetSize(TL8,thickness);
End;


End;
End;
{Test for a bearish 222}
{Peak X is P2}
{Trough A is T2}
{Peak B is P1}
{Trough C is T1}
{GD is the short point}
GD = High;
PTValid = T1Bar < P1Bar and P1Bar < T2Bar and T2Bar < P2Bar;
HLValid = T1 > T2 and P1 < P2 and T1 < P1;
InZone = GD > P1 and GD < P2 and T2 <= Lowest(Low, P2Bar);
If PTValid and HLValid and InZone Then Begin
XA = P2 - T2;
AB = P1 - T2;
BC = P1 - T1;
CD = GD - T1;
AD = GD - T2;
ABdXA = AB / XA; {AB should be 61.8% of XA}
C1 = ABdXA > F1 - Tolerance and ABdXA < F1 + Tolerance;
BCdAB = BC / AB; {BC should be 61.8-78.6% of AB}
C2 = BCdAB > F1 - Tolerance and BCdAB < F2 + Tolerance;
CDdBC = CD / BC; {CD should be 127-161.8% of BC}
C3 = CDdBC > F3 - Tolerance and CDdBC < F4 + Tolerance;
ADdXA = AD / XA; {AD should be 78.6% of XA}
C4 = ADdXA > F2 - Tolerance and ADdXA < F2 + Tolerance;
If C1 and C2 and C3 and C4 Then Begin

TL1 = TL_New(Date[P2Bar], Time[P2Bar], P2, Date[T2Bar], Time[T2Bar], T2);
If TL1 >= 0 Then Begin
TL_SetColor(TL1, BearColor);
TL_SetStyle(TL1, Tool_Solid);
TL_SetSize(TL1, thickness);
End;

TL2 = TL_New(Date[T2Bar], Time[T2Bar], T2, Date[P1Bar], Time[P1Bar], P1);
If TL2 >= 0 Then Begin
TL_SetColor(TL2, BearColor);
TL_SetStyle(TL2, Tool_Solid);
TL_SetSize(TL1, thickness);
End;
TL3 = TL_New(Date[P1Bar], Time[P1Bar], P1, Date[T1Bar], Time[T1Bar], T1);
If TL3 >= 0 Then Begin
TL_SetColor(TL3, BearColor);
TL_SetStyle(TL3, Tool_Solid);
TL_SetSize(TL3, thickness);
End;


if (DelMULTI) then
begin
if (TL4>0) then TL_Delete(TL4);
if (TL5>0) then TL_Delete(TL5);
if (TL5>0) then TL_Delete(TL6);
end;

TL4 = TL_New(Date[T1Bar], Time[T1Bar], T1, Date, Time, GD);
If TL4 >= 0 Then Begin
TL_SetColor(TL4, BearColor);
TL_SetStyle(TL4, Tool_Solid);
TL_SetSize(TL4, thickness);
End;


TL5 = TL_New(Date[P1Bar], Time[P1Bar], P1, Date, Time, GD);
If TL5 >= 0 Then Begin
TL_SetColor(TL5, BearColor);
TL_SetStyle(TL5, Tool_Dotted);
TL_SetSize(TL5, thickness);
End;

TL6 = TL_New(Date[P2Bar], Time[P2Bar], P2, Date, Time, GD);
If TL6 >= 0 Then Begin
TL_SetColor(TL6, BearColor);
TL_SetStyle(TL6, Tool_Dotted);
TL_SetSize(TL6, thickness);
End;

TL7 = TL_New(Date[P2Bar], Time[P2Bar], P2, Date[P1Bar], Time[P1Bar], P1);
If TL7 >= 0 Then Begin
TL_SetColor(TL7, BearColor);
TL_SetStyle(TL7, Tool_Dotted);
TL_SetSize(TL7, thickness);
End;

TL8 = TL_New(Date[T2Bar], Time[T2Bar], T2, Date[T1Bar], Time[T1Bar], T1);
If TL8 >= 0 Then Begin
TL_SetColor(TL8, BearColor);
TL_SetStyle(TL8, Tool_Dotted);
TL_SetSize(TL8,thickness);
End;



End;
End;
End;

zukkaweb
Posts: 125
Joined: 08 Feb 2008

Postby zukkaweb » 07 Sep 2008

thanks, i am trying it

blaster79
Posts: 6
Joined: 10 Nov 2008
Location: Perugia, Italy

Postby blaster79 » 12 Nov 2008

Hello, when compiling Pesavento indicator i got this error:

syntax error, unexpected 'else'
errLine 406, errColumn 9, errLineEnd 406, errColumnEnd 9

if i remove that else it compiles correctly, but i don't think this is good

i'm using MC 4.0 1724

User avatar
TJ
Posts: 7227
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 991 times
Been thanked: 2056 times

Postby TJ » 13 Nov 2008

are you compiling Gartley 222 from the post above?

there is no line 406 ???

blaster79
Posts: 6
Joined: 10 Nov 2008
Location: Perugia, Italy

Postby blaster79 » 13 Nov 2008

Hello TJ, no i'm compiling the Pesavento Pattern indicator (downloaded from the first post of this thread)!

User avatar
TJ
Posts: 7227
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 991 times
Been thanked: 2056 times

Postby TJ » 13 Nov 2008

mine compiled alright

you can compare your code to mine. I don't remember if I had made adjustments to it.
Attachments
Pesavento Patterns.txt
(21.4 KiB) Downloaded 1110 times

blaster79
Posts: 6
Joined: 10 Nov 2008
Location: Perugia, Italy

Postby blaster79 » 15 Nov 2008

thank you TJ, your sources compiled successfully! :D

LTG
Posts: 30
Joined: 08 Sep 2009

Postby LTG » 14 Jan 2010

Is there a way to modify the Gartley indicator to use the same zig-zag feature as the pesavento pattern.

It looks like the Gartley indicator is based off swinghigh/low so it doesn't work as well as it could.

Welcome any ideas.

Scriver
Posts: 3
Joined: 02 Jan 2018

Re: Pesavento Patterns Indicator for MultiCharts

Postby Scriver » 19 Jan 2018

Hi,

I am not able get the "Pesavento Patterns" to go back more then 200 bars, can some one help me with this ?
Really new to the Multicharts platform :)

Also I am only introesset in the following ratio:

0,618
0,786
1,618
1,127
2

I have tried to delete the ratios in the code. But they are still on the chart aften it compiled successfuly..


Return to “User Contributed Studies and Indicator Library”