FINANCIAL CHRONICLE™
Dear Reader,

Registration with the Sri Lanka FINANCIAL CHRONICLE™️ would enable you to enjoy an array of other services such as Member Rankings, User Groups, Own Posts & Profile, Exclusive Research, Live Chat Box etc..

All information contained in this forum is subject to Disclaimer Notice published.


Thank You
FINANCIAL CHRONICLE™️
www.srilankachronicle.com


Join the forum, it's quick and easy

FINANCIAL CHRONICLE™
Dear Reader,

Registration with the Sri Lanka FINANCIAL CHRONICLE™️ would enable you to enjoy an array of other services such as Member Rankings, User Groups, Own Posts & Profile, Exclusive Research, Live Chat Box etc..

All information contained in this forum is subject to Disclaimer Notice published.


Thank You
FINANCIAL CHRONICLE™️
www.srilankachronicle.com
FINANCIAL CHRONICLE™
Would you like to react to this message? Create an account in a few clicks or log in to continue.
FINANCIAL CHRONICLE™

Encyclopedia of Latest news, reviews, discussions and analysis of stock market and investment opportunities in Sri Lanka

Click Link to get instant AI answers to all business queries.
Click Link to find latest Economic Outlook of Sri Lanka
Click Link to view latest Research and Analysis of the key Sectors and Industries of Sri Lanka
Worried about Paying Taxes? Click Link to find answers to all your Tax related matters
Do you have a legal issues? Find instant answers to all Sri Lanka Legal queries. Click Link
Latest images

Latest topics

» COCR IN TROUBLE?
by D.G.Dayaratne Yesterday at 9:31 am

» TAFL is the most undervalued & highly potential counter in the Poultry Sector
by bkasun Tue Apr 30, 2024 8:48 pm

» EXPO.N - Expo Lanka Holdings De-Listing
by eradula Tue Apr 30, 2024 3:21 pm

» Maharaja advise - April 2024
by celtic tiger Tue Apr 30, 2024 12:01 am

» Srilanka's Access Engineering PLC think and Win
by Dasun Maduwantha Mon Apr 29, 2024 11:40 pm

» PEOPLE'S INSURANCE PLC (PINS.N0000)
by ErangaDS Fri Apr 26, 2024 10:24 am

» UNION ASSURANCE PLC (UAL.N0000)
by ErangaDS Fri Apr 26, 2024 10:22 am

» ‘Port City Colombo makes progress in attracting key investments’
by samaritan Thu Apr 25, 2024 9:26 am

» Mahaweli Reach Hotels (MRH.N)
by SL-INVESTOR Wed Apr 24, 2024 11:25 pm

» THE KANDY HOTELS COMPANY (1983) PLC (KHC.N0000)
by SL-INVESTOR Wed Apr 24, 2024 11:23 pm

» ACCESS ENGINEERING PLC (AEL) Will pass IPO Price of Rs 25 ?????
by ddrperera Wed Apr 24, 2024 9:09 pm

» LANKA CREDIT AND BUSINESS FINANCE PLC (LCBF.N0000)
by Beyondsenses Wed Apr 24, 2024 10:40 am

» FIRST CAPITAL HOLDINGS PLC (CFVF.N0000)
by Beyondsenses Wed Apr 24, 2024 10:38 am

» LOLC FINANCE PLC (LOFC.N0000)
by Beyondsenses Wed Apr 24, 2024 10:20 am

» SRI LANKA TELECOM PLC (SLTL.N0000)
by sureshot Wed Apr 24, 2024 8:37 am

» Sri Lanka confident of speedy debt resolution as positive economic reforms echoes at IMF/WB meetings
by samaritan Mon Apr 22, 2024 9:28 am

» Construction Sector Boom with Purchasing manager's indices
by rukshan1234 Thu Apr 18, 2024 11:24 pm

» Asha Securities and Asia Securities Target AEL (Access Enginnering PLC )
by Anushka Perz Wed Apr 17, 2024 10:30 pm

» Sri Lanka: China EXIM Bank Debt Moratorium to End in April 2024
by DeepFreakingValue Tue Apr 16, 2024 11:22 pm

» Uncertainty over impending elections could risk Lanka’s economic recovery: ADB
by God Father Tue Apr 16, 2024 2:47 pm

» Sri Lanka's Debt Restructuring Hits Roadblock with Bondholders
by God Father Tue Apr 16, 2024 2:42 pm

» BROWN'S INVESTMENTS SHOULD CONSIDER BUYING BITCOIN
by ADVENTUS Mon Apr 15, 2024 12:48 pm

» Bank run leading the way in 2024
by bkasun Sun Apr 14, 2024 3:21 pm

» ASPI: Undoing GR/Covid19!
by DeepFreakingValue Thu Apr 11, 2024 10:25 am

» Learn CSE Rules and Regulations with the help of AI Assistant
by ChatGPT Tue Apr 09, 2024 7:47 am

LISTED COMPANIES

Submit Post
ශ්‍රී ලංකා මූල්‍ය වංශකථාව - සිංහල
Submit Post


CONATCT US


Send your suggestions and comments

* - required fields

Read FINANCIAL CHRONICLE™ Disclaimer



EXPERT CHRONICLE™

ECONOMIC CHRONICLE

GROSS DOMESTIC PRODUCT (GDP)



CHRONICLE™ YouTube

Disclaimer
FINANCIAL CHRONICLE™ Disclaimer

The information contained in this FINANCIAL CHRONICLE™ have been submitted by third parties directly without any verification by us. The information available in this forum is not researched or purported to be complete description of the subject matter referred to herein. We do not under any circumstances whatsoever guarantee the accuracy and completeness information contained herein. FINANCIAL CHRONICLE™ its blogs, forums, domains, subdomains and/or its affiliates and/or its web masters, administrators or moderators shall not in any way be responsible or liable for loss or damage which any person or party may sustain or incur by relying on the contents of this report and acting directly or indirectly in any manner whatsoever. Trading or investing in stocks & commodities is a high risk activity. Any action you choose to take in the markets is totally your own responsibility, FINANCIAL CHRONICLE™ blogs, forums, domains, subdomains and/or its affiliates and/or its web masters, administrators or moderators shall not be liable for any, direct or indirect, consequential or incidental damages or loss arising out of the use of this information. The information on this website is neither an offer to sell nor solicitation to buy any of the securities mentioned herein. The writers may or may not be trading in the securities mentioned.

Further the writers and users shall not induce or attempt to induce another person to trade in securities using this platform (a) by making or publishing any statement or by making any forecast that he knows to be misleading, false or deceptive; (b) by any dishonest concealment of material facts; (c) by the reckless making or publishing, dishonestly or otherwise of any statement or forecast that is misleading, false or deceptive; or (d) by recording or storing in, or by means of, any mechanical, electronic or other device, information that he knows to be false or misleading in a material particular. Any action writers and users take in respect of (a),(b),(c) and (d) above shall be their own responsibility, FINANCIAL CHRONICLE™ its blogs, forums, domains, subdomains and/or its affiliates and/or its web masters, administrators or moderators shall not be liable for any, direct or indirect, consequential or incidental violation of securities laws of any country, damages or loss arising out of the use of this information.


AI Live Chat

You are not connected. Please login or register

Technical Analytics & Charts (1)

+59
monash
laksharemk
wappula
yaka
ole
m2_yapa
Leon
rainmaker
balapas
prabath
klpfernando
The Alchemist
bakapandithaya
sandanuwan
suja
mark
Arena
VertexCSE
Expert
sahan8896
Fresher
pathfinder
takefawaz
nimantha80
UAEBOY
hairai
godswen
nkuda
Dr_CSE
dinusha.kiwulegedara
raybenz1984
Jiggysaurus
fairbullrun
LateTackle
kav4
Whitebull
kas
D.G.Dayaratne
Stefan
Slstock
Backstage
opfdo
market bull
Antonym
Green79
val2004
malanp
manula
Redbulls
Kumar
CSE.SAS
lemuria
smallville
K.Haputantri
sriranga
chamith
Rajaraam
stumpy
traderathome
63 posters

Go to page : Previous  1 ... 11 ... 18, 19, 20 ... 29 ... 40  Next

Go down  Message [Page 19 of 40]

451Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Thu Dec 06, 2012 10:29 am

traderathome


Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

can see a short break by the bears until we see 5375-5385...and then again a selling spree or testing lower to 5250 bom

care ful on your buying now....concentrate only on strong fundas

TAH

452Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Thu Dec 06, 2012 3:18 pm

traderathome


Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

NDB crossing today @125/-, but market rate 134/- Sad

TAH

453Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Thu Dec 06, 2012 6:25 pm

traderathome


Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

Todays market green will it last for some time by surpassing previous high....its yet to be seen ...... Very Happy

hoping more positive will outflow ..... Smile in coming days

TAH

454Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Thu Dec 06, 2012 6:28 pm

traderathome


Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

Foreign Savings
06 Dec, 2012 11:11:03
Sri Lanka's non bank lenders encouraged to borrow abroad
Dec 06, 2012 (LBO) - Sri Lanka's non-bank lenders should borrow abroad using newly relaxed rules to help boost resources available for investment, Central Bank Governor Nivard Cabral said.
"We would encourage you to access foreign funds, as well," Cabraal told a forum of top finance company executives in Colombo this week.
"Some of you have been accessing foreign funds in order to buttress your own capital - to buttress your Tier II capital. And we would like to encourage that situation in the future as well."

Investments

Sri Lanka's licensed finance and leasing companies which had asset of 564 billion rupees by end September 2012 and accounted for 6 percent of total financial sector assets plays in a sub-prime market just below commercial banks.

They fund investments through leasing, hire purchase, housing mortgages and gold-backed loans.

Cabraal said Sri Lanka needed greater savings and investment to keep economic growth high at around 8.0 percent.

"Domestic investment has also increased to about 30 percent," Cabraal said. "As you know Sri Lanka has a perennial difficulty about savings not been sufficient to promote the growth that we have.

"Now we have seen it increasing but still not to the levels we would want it to be."

In a budget for 2013, President Mahinda Rajapaksa said commercial banks could borrow up to 50 million US dollars without exchange control approval from the Central Bank and other firms could borrow up to 10 million US dollars without exchange control approval.


Foreign Window

Cabraal said finance companies could use the opportunity to borrow abroad.

"So these are opportunities that you have to make use of that we would encourage you to do so," Cabraal said.

"That would address the savings gap that Sri Lanka has as well."

People's Leasing and Finance Plc, Sri Lanka's largest non-bank lender has said it is exploring the possibility of borrowing 10 million US dollars as well as a 100 million US dollar syndicated loan.

Several leasing and finance companies had also tapped credit lines from development lenders abroad.

Cabraal said foreign savings could tapped as Tier I capital (equity) into banks and finance companies or Tier II (subordinated debt), as portfolio investment in the stock markets.

"And it can also come in to the government," Cabraal said. "So government has already taken the necessary loans, as well as the capital to support infrastructure.

"Now the ball is fairly and squarely on the private sector's court. So the private sector also must harness new deposits and take this country forward."

But analysts say Sri Lanka's lack of savings - especially compared to East Asian nations - is mostly due to excessive state spending, and private savings are understated.

Understated

Sri Lanka runs a current account deficit in the budget indicating that total revenues are not enough to fund recurrent spending.

In 2010 Sri Lanka recorded a domestic savings rate of 19.3 percent of GDP. Private domestic savings of 21.4 percent was dragged down by a negative 2.1 percent of GDP gap in the current account of the budget.

In 2010 foreign private transfers were 7.4 percent (which include Middle Eastern remittances) helping boost national savings to 25.4 percent of GDP. State enterprises ran large losses during the crisis, with energy utilities even taking loans to pay taxes to the central government, later information showed.

To muddle issues further state enterprises are classified as 'private sector' dragging down even the so-called private domestic savings number.

There are no published data readily available on the true private domestic savings rate in Sri Lanka, which critics may lead to even well-meaning officials as well as private analysts to flog a dead horse after comparing apples with oranges.

Nor is an aggregate figure for the surplus or deficit of non-financial public sector enterprises published now, though it had been available in some years.

In East Asian countries such as Malaysia, national savings rates are high because the central government and state enterprises run surpluses.

Bank Negara, Malaysia Central Bank said in 2010 private national savings were 22.2 percent of gross national product, and public sector savings, including profits of state enterprises were a positive 11.9 percent.

In 2011 public savings fell to 5.4 percent because surpluses of state enterprises reduced.

http://www.lankabusinessonline.com/fullstory.php?nid=1003660100

455Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Fri Dec 07, 2012 1:50 pm

traderathome


Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

/* HARMONIC PATTERN DETECTION


Automatic Detection of Harmonic Patterns - Gartley, Bat, Butterfly and Crab.

Zig Zag is not used in this AFL. It is based on fractals

Contact - joy.edakad@gmail.com

*/


_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorWhite ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("Gartley");

GBmin = Param("Swing B Min.",0.55,0.3,1,0.01);
GBmax = Param("Swing B Max.",0.72,0.4,1,0.01);
GCmin = Param("Swing C Min.",0.38,0.3,1.27,0.01);
GCmax = Param("Swing C Max.",1.0,0.4,1.27,0.01);
GDmin = Param("Swing D Min.(XA)",0.55,0.3,1,0.01);
GDmax = Param("Swing D Max.(XA)",1.0,0.4,1.0,0.01);

_SECTION_END();

_SECTION_BEGIN("Bat");

BatBmin = Param("Swing B Min.",0.38,0.3,1,0.01);
BatBmax = Param("Swing B Max.",0.55,0.4,1,0.01);
BatCmin = Param("Swing C Min.",0.38,0.3,1.62,0.01);
BatCmax = Param("Swing C Max.",1.27,0.4,1.62,0.01);
BatDmin = Param("Swing D Min.(XA)",0.5,0.3,1,0.01);
BatDmax = Param("Swing D Max.(XA)",1.0,0.4,1.0,0.01);

_SECTION_END();

_SECTION_BEGIN("Butterfly");

BtBmin = Param("Swing B Min.",0.55,0.3,1,0.01);
BtBmax = Param("Swing B Max.",0.9,0.4,1,0.01);
BtCmin = Param("Swing C Min.",0.38,0.3,1.62,0.01);
BtCmax = Param("Swing C Max.",1.27,0.4,1.62,0.01);
BtDmin = Param("Swing D Min.(XA)",1,1,1.8,0.01);
BtDmax = Param("Swing D Max.(XA)",1.8,1,1.8,0.01); // Max XA of Butterfly = (1.0 - 1.618)

_SECTION_END();

_SECTION_BEGIN("Crab");

CBmin = Param("Swing B Min.",0.38,0.3,1,0.01);
CBmax = Param("Swing B Max.",0.65,0.4,1,0.01);
CCmin = Param("Swing C Min.",0.38,0.3,1.62,0.01);
CCmax = Param("Swing C Max.",1.270,0.4,1.62,0.01);
CDmin = Param("Swing D Min.(XA)",1.25,1,1.8,0.01);
CDmax = Param("Swing D Max.(XA)",1.8,1,2,0.01);

_SECTION_END();

_SECTION_BEGIN("AB=CD");

abcd_Cmin = Param("Swing C Min.",0.3, 0.3 , 1, 0.01);
abcd_Cmax = Param("Swing C Max.",0.8, 0.8 , 1, 0.01);
abcd_Dmin = Param("Swing D Min.",1.2, 1, 2.7, 0.01);
abcd_Dmax = Param("Swing D Max.",3.7, 1, 4, 0.01);

_SECTION_END();

_SECTION_BEGIN("Patterns");

//strength = Param("Strength",5,2,15,1); // Best use: 3, 4, 5
strength = Param("BARS of each LINE",5,2,15,1); // So luong bar cho moi duong XA, AB, BC,
bu = ParamToggle("Bullish Pattern","Off|On",1); // So bar/lines se quyet dinh. mo^ hinh` duoc ve the' nao`
be = ParamToggle("Bearish Pattern","Off|On",1);

bi = Cum(1)-1;

function GetTop(bars) // Lay' gia' tri cao nhat' = di?nh
{
Top = H == HHV(H,2*bars) AND Ref(HHV(H,bars),bars) < H;
Top = Top AND LastValue(bi)-ValueWhen(Top,bi) > bars;
return Top;
}

function GetValley(bars) // La'y gia tri thap' nhat' = day'
{
Valley = L == LLV(L,2*bars) AND Ref(LLV(L,bars),bars) > L;
Valley = Valley AND LastValue(bi)-ValueWhen(Valley,bi) > bars;
return Valley;
}


// Build fractals array

P1 = GetTop(strength); // so' bar cho 1 duong` XA, AB, BC, CD
V1 = GetValley(Strength);

P1 = IIf(P1,IIf(ValueWhen(P1,bi,2) < ValueWhen(V1,bi),P1,IIf(ValueWhen(P1,H,2) > H,False,P1)),P1);
P1 = IIf(P1 AND ValueWhen(P1,bi,0) > bi,IIf(ValueWhen(P1,bi,0) < ValueWhen(V1,bi,0),IIf(ValueWhen(P1,H,0) >= H,False,P1),P1),P1);
V1 = IIf(V1,IIf(ValueWhen(V1,bi,2) < ValueWhen(P1,bi),V1,IIf(ValueWhen(V1,L,2)V1 = IIf(V1 AND ValueWhen(V1,bi,0) > bi ,IIf(ValueWhen(V1,bi,0) < ValueWhen(P1,bi,0),IIf(ValueWhen(V1,L,0) <= L, False,V1),V1),V1);


P1H1 = ValueWhen(P1,H);
P1Bar1 = ValueWhen(P1,bi);
P1H2 = ValueWhen(P1,H,2);
P1Bar2 = ValueWhen(P1,bi,2);
V1L1 = ValueWhen(V1,L);
V1Bar1 = ValueWhen(V1,bi);
V1L2 = ValueWhen(V1,L,2);
V1Bar2 = ValueWhen(V1,bi,2);


//============================================
// BULLISH PATTERNS
//============================================
/*
Mo hinh Bullish:
A = P1H2
B = V1L1
C = P1H1
X = V1L2

*/

PTvalid = (P1Bar1 > V1Bar1 AND V1Bar1 > P1Bar2 AND P1bar2 > V1Bar2) AND P1; // Peaks and troughs are in order

myAX = P1H2-V1L2;
myAB = P1H2-V1L1;
myBC = P1H1-V1L1;

myAB_AX = myAB/ myAX;
myBC_AB = myBC/ myAB;

BullGartley4 = PTvalid AND ( myAB_AX > GBmin ) AND ( myAB_AX < GBmax )
AND ( myBC_AB > GCMin ) AND ( myBC_AB < GCMax );

BullBat4 = PTvalid AND ( myAB_AX > BatBmin ) AND ( myAB_AX < BatBmax )
AND ( myBC_AB > BatCMin ) AND ( myBC_AB < BatCMax );

BullButterfly4 = PTvalid AND ( myAB_AX > BtBmin ) AND ( myAB_AX < BtBMax )
AND ( myBC_AB > BtCmin ) AND ( myBC_AB < BtCmin );

BullCrab4 = PTvalid AND ( myAB_AX > CBmin ) AND ( myAB_AX < CBmax )
AND ( myBC_AB > CCmin ) AND ( myBC_AB < CCmax );

BullABCD4 = PTvalid AND ( myBC_AB > abcd_Cmin) AND ( myBC_AB < abcd_Cmax );

strPattern = "";

//==================================================
// BULLISH ABCD
// Bullish pattern found. D retracement level is not evaluated
//==================================================
dHigh = HighestSince(BullABCD4,H); // Tinh' gia' tri min, max cua duong Ad. Duong Ad la duong con cua AD
dLow = LowestSince(BullABCD4,L);

myC = ValueWhen(BullABCD4,P1H1);
myB = ValueWhen(BullABCD4,V1L1);
myA = ValueWhen(BullABCD4,P1H2);
myX = ValueWhen(BullABCD4,V1L2);
myCB = myC - myB;

my_d_min = myCB * abcd_DMin ; // Tinh' gia' tri cua duong Ad con. Khi gia' giam? tu` tre^n xuong' thi` max -> min
my_d_max = myCB * abcd_DMax ;
my_Cd_min = myC - my_d_min; // Khoang dich chuyen cua duong Ad con.
my_Cd_max = myC - my_d_max;

BullABCD = IIf( ( dLow < my_Cd_min ) AND ( dLow > my_Cd_max )
AND ( dHigh <= myC ) AND ( dLow == L),
True, False
);

BullABCD = BullABCD AND (dLow < myB);


//==================================================
// BULLISH GARTLEY
//==================================================
dHigh = HighestSince(BullGartley4,H); // Tinh' gia' tri min, max cua duong Ad. Duong Ad la duong con cua AD
dLow = LowestSince(BullGartley4,L);

myC = ValueWhen(BullGartley4,P1H1);
myB = ValueWhen(BullGartley4,V1L1);
myA = ValueWhen(BullGartley4,P1H2);
myX = ValueWhen(BullGartley4,V1L2);
myAX = myA - myX;

my_d_min = myAX * GDmin; // Tinh' gia' tri cua duong Ad con. Khi gia' giam? tu` tre^n xuong' thi` max -> min
my_d_max = myAX * GDMax;
my_Ad_min = myA - my_d_min; // Khoang dich chuyen cua duong Ad con.
my_Ad_max = myA - my_d_max;

BullGartley = IIf( ( dLow < my_Ad_min ) AND ( dLow > my_Ad_max )
AND ( dHigh <= myC ) AND ( dLow == L),
True, False
);
BullGartley = BullGartley AND (dLow < myB); // diem D thap' hon B
strPattern = WriteIf(BullGartley,"BULLISH GARTLEY",strPattern);



//==================================================
// BULLISH BAT
//==================================================
dHigh = HighestSince(BullBat4,H); // Tinh' gia' tri min, max cua duong Ad. Duong Ad la duong con cua AD
dLow = LowestSince(BullBat4,L);

myC = ValueWhen(BullBat4,P1H1);
myB = ValueWhen(BullBat4,V1L1);
myA = ValueWhen(BullBat4,P1H2);
myX = ValueWhen(BullBat4,V1L2);
myAX = myA - myX;

my_d_min = myAX * BatDmin; // Tinh' gia' tri cua duong Ad con. Khi gia' giam? tu` tre^n xuong' thi` max -> min
my_d_max = myAX * BatDmax ;
my_Ad_min = myA - my_d_min; // Khoang dich chuyen cua duong Ad con.
my_Ad_max = myA - my_d_max;

BullBat = IIf( ( dLow < my_Ad_min ) AND ( dLow > my_Ad_max )
AND ( dHigh <= myC ) AND ( dLow == L),
True, False
);
BullBat = BullBat AND (dLow < myB); // diem d thap hon diem B
strPattern = WriteIf(BullBat,"BULLISH BAT",strPattern);


//==================================================
// BULLISH CRAB - CUA
//==================================================
dHigh = HighestSince(BullCrab4,H); // Tinh' gia' tri min, max cua duong Ad. Duong Ad la duong con cua AD
dLow = LowestSince(BullCrab4,L);

myC = ValueWhen(BullCrab4,P1H1);
myB = ValueWhen(BullCrab4,V1L1);
myA = ValueWhen(BullCrab4,P1H2);
myX = ValueWhen(BullCrab4,V1L2);
myAX = myA - myX;

my_d_min = myAX * CDmin ; // Tinh' gia' tri cua duong Ad con. Khi gia' giam? tu` tre^n xuong' thi` max -> min
my_d_max = myAX * CDmax ;
my_Ad_min = myA - my_d_min; // Khoang dich chuyen cua duong Ad con.
my_Ad_max = myA - my_d_max;

BullCrab = IIf( ( dLow < my_Ad_min ) AND ( dLow > my_Ad_max )
AND ( dHigh <= myC ) AND ( dLow == L),
True, False
);
BullCrab = BullCrab AND (dLow < myX); // diem D thap' hon X
strPattern = WriteIf(BullCrab ,"BULLISH CRAB",strPattern);


//==================================================
// BULLISH BUTTTERFLY
//==================================================
dHigh = HighestSince(BullButterfly4,H); // Tinh' gia' tri min, max cua duong Ad. Duong Ad la duong con cua AD
dLow = LowestSince(BullButterfly4,L);

myC = ValueWhen(BullButterfly4,P1H1);
myB = ValueWhen(BullButterfly4,V1L1);
myA = ValueWhen(BullButterfly4,P1H2);
myX = ValueWhen(BullButterfly4,V1L2);
myAX = myA - myX;

my_d_min = myAX * BtDmin ; // Tinh' gia' tri cua duong Ad con. Khi gia' giam? tu` tre^n xuong' thi` max -> min
my_d_max = myAX * BtDmax ;
my_Ad_min = myA - my_d_min; // Khoang dich chuyen cua duong Ad con.
my_Ad_max = myA - my_d_max;

BullButterfly = IIf( ( dLow < my_Ad_min ) AND ( dLow > my_Ad_max )
AND ( dHigh <= myC ) AND ( dLow == L),
True, False
);
BullButterfly = BullButterfly AND (dLow < myX); // diem D thap' hon X
strPattern = WriteIf(BullButterfly ,"BULLISH BUTTERFLY",strPattern);



//==========================================================
// VE DUONG CHO MO HINH BULLISH ABCB
//==========================================================
BullHar4 = BullABCD4;
BullHar = BullABCD;

Point4 = IIf(BullHar,ValueWhen(BullHar4,bi),Null);
BullHar = IIf(BullHar, IIf(Point4 == ValueWhen(BullHar,point4,0) AND ValueWhen(BullHar,bi,0) > bi ,False,BullHar),BullHar);

A = ValueWhen(BullHar4,P1H2);
Abar = ValueWhen(BullHar4,P1bar2);
B = ValueWhen(BullHar4,V1L1);
Bbar = ValueWhen(BullHar4,V1bar1);
C1 = ValueWhen(BullHar4,P1H1);
C1bar = ValueWhen(BullHar4,P1bar1);
D = ValueWhen(BullHar,L);
Dbar = ValueWhen(BullHar,bi);

BCdAB = (C1-B)/(A-B);
BCdCD = (C1-D)/(C1-B);

PlotPattern = Dbar > C1bar;

if(LastValue(PlotPattern) AND bu)
{
ColorX = colorGreen;
// Ve cac duong AB, BC, CD
Plot(LineArray(LastValue(Abar),LastValue(A),LastValue(Bbar),LastValue(B)),"",ColorX ,styleThick);
Plot(LineArray(LastValue(Bbar),LastValue(B),LastValue(C1bar),LastValue(C1)),"",ColorX ,styleThick);
Plot(LineArray(LastValue(C1bar),LastValue(C1),LastValue(Dbar),LastValue(D)),"",ColorX ,styleThick);
Plot(LineArray(LastValue(Abar),LastValue(A),LastValue(C1bar),LastValue(C1)),"",ColorX ,styleDashed);
Plot(LineArray(LastValue(Bbar),LastValue(B),LastValue(Dbar),LastValue(D)),"",ColorX ,styleDashed);

// Ve cac gia tri Fibo
PlotText(NumToStr(LastValue(BCdAB),1.2),(LastValue(C1bar)+LastValue(Abar))/2,(LastValue(C1)+LastValue(A))/2,ColorX );
PlotText(NumToStr(LastValue(BCdCD),1.2),(LastValue(Bbar)+LastValue(Dbar))/2,(LastValue(B)+LastValue(D))/2,ColorX );

//---------- Viet cac diem X, A, B, C, D: by binhnd---------------------
xlech = 0;
ylech = 2;
PlotText("A",LastValue(Abar) + xlech, LastValue(A) + ylech, ColorX );
PlotText("B",LastValue(Bbar) + xlech, LastValue(B) - ylech, ColorX );
PlotText("C",LastValue(C1bar) + xlech, LastValue(C1) + ylech, ColorX );
PlotText("D",LastValue(Dbar) + xlech, LastValue(D) - ylech, ColorX );

//--------- Viet thuyet minh mo hinh: by binhnd--------------
if (strPattern!="")
{
myStr = "Pattern: BULLISH AB=CD";
toadoX = LastValue(Abar);
toadoY = LastValue(D);

PlotText(myStr,toadoX,toadoY,ColorX );
}

} // end of Ve duong` bullish abcd



//==========================================================
// VE DUONG CHO MO HINH BULLISH BAT, GARTLEY, BUTTERFLY, CRAB
//==========================================================


BullHar4 = BullGartley4 OR BullButterfly4 OR BullBat4 OR BullCrab4 ;
BullHar = BullGartley OR BullButterfly OR BullBat OR BullCrab;

Point4 = IIf(BullHar,ValueWhen(BullHar4,bi),Null);
BullHar = IIf(BullHar, IIf(Point4 == ValueWhen(BullHar,point4,0) AND ValueWhen(BullHar,bi,0) > bi ,False,BullHar),BullHar);

X = ValueWhen(BullHar4,V1L2);
Xbar = ValueWhen(BullHar4,V1Bar2);
A = ValueWhen(BullHar4,P1H2);
Abar = ValueWhen(BullHar4,P1bar2);
B = ValueWhen(BullHar4,V1L1);
Bbar = ValueWhen(BullHar4,V1bar1);
C1 = ValueWhen(BullHar4,P1H1);
C1bar = ValueWhen(BullHar4,P1bar1);
D = ValueWhen(BullHar,L);
Dbar = ValueWhen(BullHar,bi);

ABdXA = (A-B)/(A-X);
BCdAB = (C1-B)/(A-B);
ADdXA = (A-D)/(A-X);
BCdCD = (C1-D)/(C1-B);

PlotPattern = Dbar > C1bar;

if(LastValue(PlotPattern) AND bu)
{
ColorX = colorBlue;
// Ve cac duong XA, AB, BC, CD
Plot( LineArray(LastValue(Xbar),LastValue(X),LastValue(Abar),LastValue(A)),"",ColorX,styleThick);
Plot(LineArray(LastValue(Abar),LastValue(A),LastValue(Bbar),LastValue(B)),"",ColorX,styleThick);
Plot(LineArray(LastValue(Bbar),LastValue(B),LastValue(C1bar),LastValue(C1)),"",ColorX,styleThick);
Plot(LineArray(LastValue(C1bar),LastValue(C1),LastValue(Dbar),LastValue(D)),"",ColorX,styleThick);
Plot(LineArray(LastValue(Xbar),LastValue(X),LastValue(Bbar),LastValue(B)),"",ColorX,styleDashed);
Plot(LineArray(LastValue(Xbar),LastValue(X),LastValue(Abar),LastValue(A)),"",ColorX,styleThick);
Plot(LineArray(LastValue(Abar),LastValue(A),LastValue(C1bar),LastValue(C1)),"",ColorX,styleDashed);
Plot(LineArray(LastValue(Bbar),LastValue(B),LastValue(Dbar),LastValue(D)),"",ColorX,styleDashed);
Plot(LineArray(LastValue(Xbar),LastValue(X),LastValue(Dbar),LastValue(D)),"",ColorX,styleDashed);

// Ve cac gia tri Fibo
PlotText(NumToStr(LastValue(ABdXA),1.2),(LastValue(Bbar)+LastValue(Xbar))/2,(LastValue(B)+LastValue(X))/2,ColorX);
PlotText(NumToStr(LastValue(BCdAB),1.2),(LastValue(C1bar)+LastValue(Abar))/2,(LastValue(C1)+LastValue(A))/2,ColorX);
PlotText(NumToStr(LastValue(ADdXA),1.2) ,(LastValue(Dbar)+LastValue(Xbar))/2,(LastValue(D)+LastValue(X))/2,ColorX);
PlotText(NumToStr(LastValue(BCdCD),1.2),(LastValue(Bbar)+LastValue(Dbar))/2,(LastValue(B)+LastValue(D))/2,ColorX);

//---------- Viet cac diem X, A, B, C, D: by binhnd---------------------
xlech = 0;
ylech = 2;
PlotText("X",LastValue(Xbar) + xlech, LastValue(X) - ylech, ColorX);
PlotText("A",LastValue(Abar) + xlech, LastValue(A) + ylech, ColorX);
PlotText("B",LastValue(Bbar) + xlech, LastValue(B) - ylech, ColorX);
PlotText("C",LastValue(C1bar) + xlech, LastValue(C1) + ylech, ColorX);
PlotText("D",LastValue(Dbar) + xlech, LastValue(D) - ylech, ColorX);

//--------- Viet thuyet minh mo hinh: by binhnd--------------
if (strPattern!="")
{
strPattern = "Pattern: " + strPattern;
toadoX = (LastValue(Dbar)+LastValue(Xbar))/2;
toadoY = (LastValue(D)+LastValue(X))/2;

PlotText(strPattern,toadoX,toadoY-2,ColorX);
}

} // end of Ve duong cho cac mo hinh Crab, Butterfly, Bat


//=============================================================
// BEARISH PATTERNS
//=============================================================

PTvalid = (V1Bar1 > P1Bar1 AND P1Bar1 > V1Bar2 AND V1Bar2 > P1Bar2) AND V1;

/*=====================
X = P1H2 Trong mo hinh` bear: Die^m X cao hon diem A. MyAX = X-> A
A = V1L2
B = P1H1
C = V1L1

=======================*/
myAX = P1H2-V1L2;
myAB = P1H1-V1L2;
myBC = P1H1-V1L1;

myAB_AX = myAB/ myAX;
myBC_AB = myBC/ myAB;

BearGartley4 = PTvalid AND ( myAB_AX > GBmin ) AND ( myAB_AX < GBmax )
AND ( myBC_AB > GCMin ) AND ( myBC_AB < GCMax );

BearBat4 = PTvalid AND ( myAB_AX > BatBmin ) AND ( myAB_AX < BatBmax )
AND ( myBC_AB > BatCMin ) AND ( myBC_AB < BatCMax );

BearButterfly4 = PTvalid AND ( myAB_AX > BtBmin ) AND ( myAB_AX < BtBMax )
AND ( myBC_AB > BtCmin ) AND ( myBC_AB < BtCmin );

BearCrab4 = PTvalid AND ( myAB_AX > CBmin ) AND ( myAB_AX < CBmax )
AND ( myBC_AB > CCmin ) AND ( myBC_AB < CCmax );

BearABCD4 = PTvalid AND ( myBC_AB > abcd_Cmin) AND ( myBC_AB < abcd_Cmax );

strPattern = "";



//==========================================================
// BEARISH ABCD
// Bearish pattern found. D retracement level is not evaluated
//==========================================================
dHigh = HighestSince(BearABCD4,H); // Tinh' gia' tri min, max cua duong Ad. Duong Ad la duong con cua AD
dLow = LowestSince(BearABCD4,L);

myA = ValueWhen(BearABCD4,V1L2);
myB = ValueWhen(BearABCD4,P1H1);
myC = ValueWhen(BearABCD4,V1L1);
myCB = myB - myC;

my_d_min = myCB * abcd_DMin ; // Tinh' gia' tri cua duong Ad con. Khi gia' giam? tu` tre^n xuong' thi` max -> min
my_d_max = myCB * abcd_DMax ;
my_Cd_min = myC + my_d_min; // Khoang dich chuyen cua duong Ad con.
my_Cd_max = myC + my_d_max;

BearABCD = IIf( ( dHigh > my_Cd_min ) AND ( dHigh < my_Cd_max )
AND ( dLow >= myC ) AND ( dHigh == H),
True, False
);

BearABCD = BearABCD AND (dHigh > myB);

//=============================================================
// BEARISH GARTLEY
//=============================================================
dHigh = HighestSince(BearGartley4,H); // Tinh' gia' tri min, max cua duong Ad. Duong Ad la duong con cua AD
dLow = LowestSince(BearGartley4,L);

myX = ValueWhen(BearGartley4,P1H2);
myA = ValueWhen(BearGartley4,V1L2);
myAX = myX - myA;

myB = ValueWhen(BearGartley4,P1H1);
myC = ValueWhen(BearGartley4,V1L1);


my_d_min = myAX * GDmin; // Tinh' gia' tri cua duong Ad con. Khi gia' giam? tu` tre^n xuong' thi` max -> min
my_d_max = myAX * GDMax;
my_Ad_min = myA + my_d_min; // Khoang dich chuyen cua duong Ad con.
my_Ad_max = myA + my_d_max;

BearGartley = IIf( ( dHigh > my_Ad_min ) AND ( dHigh < my_Ad_max )
AND ( dLow >= myC ) AND ( dHigh == H),
True, False
);
BearGartley = BearGartley AND (dHigh > myB); // diem D cao hon B
strPattern = WriteIf(BearGartley ,"BEARISH GARTLEY",strPattern);

//=============================================================
// BEARISH BAT
//=============================================================
dHigh = HighestSince(BearBat4,H); // Tinh' gia' tri min, max cua duong Ad. Duong Ad la duong con cua AD
dLow = LowestSince(BearBat4,L);

myX = ValueWhen(BearBat4,P1H2);
myA = ValueWhen(BearBat4,V1L2);
myAX = myX - myA;

myB = ValueWhen(BearBat4,P1H1);
myC = ValueWhen(BearBat4,V1L1);


my_d_min = myAX * BatDmin ; // Tinh' gia' tri cua duong Ad con. Khi gia' giam? tu` tre^n xuong' thi` max -> min
my_d_max = myAX * BatDMax ;
my_Ad_min = myA + my_d_min; // Khoang dich chuyen cua duong Ad con.
my_Ad_max = myA + my_d_max;

BearBat = IIf( ( dHigh > my_Ad_min ) AND ( dHigh < my_Ad_max )
AND ( dLow >= myC ) AND ( dHigh == H),
True, False
);
BearBat = BearBat AND (dHigh > myB); // diem D cao hon B
strPattern = WriteIf(BearBat ,"BEARISH BAT",strPattern);


//=============================================================
// BEARISH BUTTERFLY
//=============================================================
dHigh = HighestSince(BearButterfly4,H); // Tinh' gia' tri min, max cua duong Ad. Duong Ad la duong con cua AD
dLow = LowestSince(BearButterfly4,L);

myX = ValueWhen(BearButterfly4,P1H2);
myA = ValueWhen(BearButterfly4,V1L2);
myAX = myX - myA;

myB = ValueWhen(BearButterfly4,P1H1);
myC = ValueWhen(BearButterfly4,V1L1);


my_d_min = myAX * BtDmin ; // Tinh' gia' tri cua duong Ad con. Khi gia' giam? tu` tre^n xuong' thi` max -> min
my_d_max = myAX * BtDmax ;
my_Ad_min = myA + my_d_min; // Khoang dich chuyen cua duong Ad con.
my_Ad_max = myA + my_d_max;

BearButterfly = IIf( ( dHigh > my_Ad_min ) AND ( dHigh < my_Ad_max )
AND ( dLow >= myC ) AND ( dHigh == H),
True, False
);
BearButterfly = BearButterfly AND (dHigh > myX); // diem D cao hon X
strPattern = WriteIf(BearButterfly ,"BEARISH BUTTERFLY",strPattern);



//=============================================================
// BEARISH CRAB
//=============================================================
dHigh = HighestSince(BearCrab4,H); // Tinh' gia' tri min, max cua duong Ad. Duong Ad la duong con cua AD
dLow = LowestSince(BearCrab4,L);

myX = ValueWhen(BearCrab4,P1H2);
myA = ValueWhen(BearCrab4,V1L2);
myAX = myX - myA;

myB = ValueWhen(BearCrab4,P1H1);
myC = ValueWhen(BearCrab4,V1L1);


my_d_min = myAX * CDmin ; // Tinh' gia' tri cua duong Ad con. Khi gia' giam? tu` tre^n xuong' thi` max -> min
my_d_max = myAX * CDmax ;
my_Ad_min = myA + my_d_min; // Khoang dich chuyen cua duong Ad con.
my_Ad_max = myA + my_d_max;

BearCrab = IIf( ( dHigh > my_Ad_min ) AND ( dHigh < my_Ad_max )
AND ( dLow >= myC ) AND ( dHigh == H),
True, False
);
BearCrab = BearCrab AND (dHigh > myX); // diem D cao hon X
strPattern = WriteIf(BearCrab ,"BEARISH CRAB",strPattern);



//==========================================================
// VE DUONG CHO MO HINH BEARISH ABCD
//==========================================================


BearHar4 = BearABCD4;
BearHar = BearABCD;

Point4 = IIf(BearHar,ValueWhen(BearHar4,bi),Null);
BearHar = IIf(BearHar, IIf(Point4 == ValueWhen(BearHar,point4,0) AND ValueWhen(BearHar,bi,0) > bi ,False,BearHar),BearHar);

A = ValueWhen(BearHar4,V1L2);
Abar = ValueWhen( BearHar4,V1bar2);
B = ValueWhen(BearHar4,P1H1);
Bbar = ValueWhen(BearHar4,P1bar1);
C1 = ValueWhen(BearHar4,V1L1);
C1bar = ValueWhen(BearHar4,V1bar1);
D = ValueWhen(BearHar,H);
Dbar = ValueWhen(BearHar,bi);

BCdAB = (B-C1)/(B-A);
BCdCD = (D-C1)/(B-C1);

PlotPattern = Dbar > C1bar;

//--------- Ve duong ------------------
if(LastValue(Plotpattern) AND be)
{
ColorX = colorYellow;
// Ve duong AB, BC
Plot(LineArray(LastValue(Abar),LastValue(A),LastValue(Bbar),LastValue(B)),"",ColorX ,styleThick);
Plot(LineArray(LastValue(Bbar),LastValue(B),LastValue(C1bar),LastValue(C1)),"",ColorX ,styleThick);
Plot(LineArray(LastValue(C1bar),LastValue(C1),LastValue(Dbar),LastValue(D)),"",ColorX ,styleThick);
Plot(LineArray(LastValue(Abar),LastValue(A),LastValue(C1bar),LastValue(C1)),"",ColorX ,styleDashed);
Plot(LineArray(LastValue(Bbar),LastValue(B),LastValue(Dbar),LastValue(D)),"",ColorX ,styleDashed);

// Viet cac gia tri Fibo tren duong AB, BC
PlotText(NumToStr(LastValue(BCdAB),1.2),(LastValue(C1bar)+LastValue(Abar))/2,(LastValue(C1)+LastValue(A))/2,ColorX );
PlotText(NumToStr(LastValue(BCdCD),1.2) ,(LastValue(Dbar)+LastValue(Bbar))/2,(LastValue(D)+LastValue(B))/2,ColorX );

//---------- Viet cac diem A, B, C, D: by binhnd---------------------
xlech = -1;
ylech = 1;
PlotText("A",LastValue(Abar) + xlech, LastValue(A) - ylech, ColorX );
PlotText("B",LastValue(Bbar) + xlech, LastValue(B) + ylech, ColorX );
PlotText("C",LastValue(C1bar) + xlech, LastValue(C1) - ylech, ColorX );
PlotText("D",LastValue(Dbar) + xlech, LastValue(D) + ylech, ColorX );

//--------- Viet thuyet minh mo hinh: by binhnd--------------
if (strPattern!="")
{
myStr = "Pattern: BEARISH AB=CD";
toadoaX = LastValue(Abar);
toadoY = LastValue(D);

PlotText(myStr,toadoaX,toadoY+1,ColorX );
}

} // end of VE DUONG CHO MO HINH BEARISH ABCD


//==========================================================
// VE DUONG CHO MO HINH BEARISH BAT, GARTLEY, BUTTERFLY, CRAB
//==========================================================

BearHar4 = BearGartley4 OR BearButterfly4 OR BearBat4 OR BearCrab4 ;
BearHar = BearGartley OR BearButterfly OR BearBat OR BearCrab ;

Point4 = IIf(BearHar,ValueWhen(BearHar4,bi),Null);
BearHar = IIf(BearHar, IIf(Point4 == ValueWhen(BearHar,point4,0) AND ValueWhen(BearHar,bi,0) > bi ,False,BearHar),BearHar);

X = ValueWhen(BearHar4,P1H2);
Xbar = ValueWhen(BearHar4,P1Bar2);
A = ValueWhen(BearHar4,V1L2);
Abar = ValueWhen( BearHar4,V1bar2);
B = ValueWhen(BearHar4,P1H1);
Bbar = ValueWhen(BearHar4,P1bar1);
C1 = ValueWhen(BearHar4,V1L1);
C1bar = ValueWhen(BearHar4,V1bar1);
D = ValueWhen(BearHar,H);
Dbar = ValueWhen(BearHar,bi);

ABdXA = (B-A)/(X-A);
BCdAB = (B-C1)/(B-A);
ADdXA = (D-A)/(X-A);
BCdCD = (D-C1)/(B-C1);

PlotPattern = Dbar > C1bar;

//--------- Ve duong ------------------
if(LastValue(Plotpattern) AND be)
{
ColorX = colorRed;
// Ve duong XA, AB, BC
Plot( LineArray(LastValue(Xbar),LastValue(X),LastValue(Abar),LastValue(A)),"",ColorX ,styleThick);
Plot(LineArray(LastValue(Abar),LastValue(A),LastValue(Bbar),LastValue(B)),"",ColorX ,styleThick);
Plot(LineArray(LastValue(Bbar),LastValue(B),LastValue(C1bar),LastValue(C1)),"",ColorX ,styleThick);
Plot(LineArray(LastValue(C1bar),LastValue(C1),LastValue(Dbar),LastValue(D)),"",ColorX ,styleThick);
Plot(LineArray(LastValue(Xbar),LastValue(X),LastValue(Bbar),LastValue(B)),"",ColorX ,styleDashed);
Plot(LineArray(LastValue(Xbar),LastValue(X),LastValue(Abar),LastValue(A)),"",ColorX ,styleThick);
Plot(LineArray(LastValue(Abar),LastValue(A),LastValue(C1bar),LastValue(C1)),"",ColorX ,styleDashed);
Plot(LineArray(LastValue(Bbar),LastValue(B),LastValue(Dbar),LastValue(D)),"",ColorX ,styleDashed);
Plot(LineArray(LastValue(Xbar),LastValue(X),LastValue(Dbar),LastValue(D)),"",ColorX ,styleDashed);

// Viet cac gia tri Fibo tren duong XA, AB, BC
PlotText(NumToStr(LastValue(ABdXA),1.2),(LastValue(Bbar)+LastValue(Xbar))/2,(LastValue(B)+LastValue(X))/2,ColorX );
PlotText(NumToStr(LastValue(BCdAB),1.2),(LastValue(C1bar)+LastValue(Abar))/2,(LastValue(C1)+LastValue(A))/2,ColorX );
PlotText(NumToStr(LastValue(BCdCD),1.2) ,(LastValue(Dbar)+LastValue(Bbar))/2,(LastValue(D)+LastValue(B))/2,ColorX );
PlotText(NumToStr(LastValue(ADdXA),1.2) ,(LastValue(Dbar)+LastValue(Xbar))/2,(LastValue(D)+LastValue(X))/2,ColorX );

//---------- Viet cac diem X, A, B, C, D: by binhnd---------------------
xlech = -1;
ylech = 1;
PlotText("X",LastValue(Xbar) + xlech, LastValue(X) + ylech, ColorX );
PlotText("A",LastValue(Abar) + xlech, LastValue(A) - ylech, ColorX );
PlotText("B",LastValue(Bbar) + xlech, LastValue(B) + ylech, ColorX );
PlotText("C",LastValue(C1bar) + xlech, LastValue(C1) - ylech, ColorX );
PlotText("D",LastValue(Dbar) + xlech, LastValue(D) + ylech, ColorX );

//--------- Viet thuyet minh mo hinh: by binhnd--------------
if (strPattern!="")
{
strPattern = "Pattern: " + strPattern;
toadoaX = (LastValue(Dbar)+LastValue(Xbar))/2;
toadoY = (LastValue(D)+LastValue(X))/2;

PlotText(strPattern,toadoaX,toadoY+1,ColorX );
}

} // end of VE DUONG CHO MO HINH BEARISH BAT, GARTLEY, BUTTERFLY, CRAB




//=================================
// Show diem ho^~ tro. va` khang' cu. ko?
//=================================

plotFractals = ParamToggle("Plot Fractals","Off|On",1);
if(PlotFractals)
{
PlotShapes(shapeSmallCircle*P1,colorRed,0,H,10);
PlotShapes(shapeSmallCircle*V1,colorBlue,0,L,-10);
}



//==============================================
// DAT DIEU KIEN cho TIM KIEM BULL
//==============================================
dkBull = False;
ListBull = ParamList("Type of Bullish", "None|AB=CD|Gartley|Butterfly|Bat|Crab|All Patterns", 6);
if ( ListBull == "None" ) dkBull = True;
if ( ListBull =="AB=CD" ) dkBull = BullABCD ;
if ( ListBull =="Gartley" ) dkBull = BullGartley ;
if ( ListBull =="Butterfly" ) dkBull = BullButterfly ;
if ( ListBull =="Bat" ) dkBull = BullBat ;
if ( ListBull =="Crab" ) dkBull = BullCrab ;
if ( ListBull =="All Patterns") dkBull = (BullABCD) OR (BullGartley) OR (BullButterfly ) OR (BullBat ) OR (BullCrab);

//==============================================
// DAT DIEU KIEN cho TIM KIEM BEAR
//==============================================
dkBear = False;
ListBear = ParamList("Type of Bearish", "None|AB=CD|Gartley|Butterfly|Bat|Crab|All Patterns", 0);
if ( ListBear == "None" ) dkBear = True;
if ( ListBear =="AB=CD" ) dkBear = BearABCD ;
if ( ListBear =="Gartley" ) dkBear = BearGartley ;
if ( ListBear =="Butterfly" ) dkBear = BearButterfly ;
if ( ListBear =="Bat" ) dkBear = BearBat ;
if ( ListBear =="Crab" ) dkBear = BearCrab ;
if ( ListBear =="All Patterns") dkBear = (BearABCD ) OR (BearGartley ) OR (BearButterfly ) OR (BearBat ) OR (BearCrab );
//===============================

AddColumn(V,"Volume",1.0);
Filter = (dkBull) AND (dkBear);

456Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Fri Dec 07, 2012 1:52 pm

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

currently on testing looks all promising Very Happy

the above is freely available and credit is where its due cheers


TAH

457Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Fri Dec 07, 2012 2:07 pm

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

Those who are using amibroker can copy paste ......on formula editor and insert on chart option to check....

hope this will be helpful Very Happy

in fact i was looking for same for sometime, there is another similar version which i will post shortly so users may have few options to test the pattern recogntion

TAH

458Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Fri Dec 07, 2012 2:10 pm

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

/* HARMONIC PATTERN DETECTION


Automatic Detection of Harmonic Patterns - Gartley, Bat, Butterfly and Crab.

Zig Zag is not used in this AFL. It is based on fractals

Contact - joy.edakad@gmail.com

*/



_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("Gartley");

GBmin = Param("Swing B Min.",0.55,0.3,1,0.01);
GBmax = Param("Swing B Max.",0.72,0.4,1,0.01);
GCmin = Param("Swing C Min.",0.38,0.3,1.27,0.01);
GCmax = Param("Swing C Max.",1.0,0.4,1.27,0.01);
GDmin = Param("Swing D Min.(XA)",0.55,0.3,1,0.01);
GDmax = Param("Swing D Max.(XA)",1.0,0.4,1.0,0.01);

_SECTION_END();

_SECTION_BEGIN("Bat");

BatBmin = Param("Swing B Min.",0.38,0.3,1,0.01);
BatBmax = Param("Swing B Max.",0.55,0.4,1,0.01);
BatCmin = Param("Swing C Min.",0.38,0.3,1.62,0.01);
BatCmax = Param("Swing C Max.",1.27,0.4,1.62,0.01);
BatDmin = Param("Swing D Min.(XA)",0.5,0.3,1,0.01);
BatDmax = Param("Swing D Max.(XA)",1.0,0.4,1.0,0.01);

_SECTION_END();

_SECTION_BEGIN("Butterfly");

BtBmin = Param("Swing B Min.",0.55,0.3,1,0.01);
BtBmax = Param("Swing B Max.",0.9,0.4,1,0.01);
BtCmin = Param("Swing C Min.",0.38,0.3,1.62,0.01);
BtCmax = Param("Swing C Max.",1.27,0.4,1.62,0.01);
BtDmin = Param("Swing D Min.(XA)",1,1,1.8,0.01);
BtDmax = Param("Swing D Max.(XA)",1.38,1,1.8,0.01);

_SECTION_END();

_SECTION_BEGIN("Crab");

CBmin = Param("Swing B Min.",0.38,0.3,1,0.01);
CBmax = Param("Swing B Max.",0.65,0.4,1,0.01);
CCmin = Param("Swing C Min.",0.38,0.3,1.62,0.01);
CCmax = Param("Swing C Max.",1.270,0.4,1.62,0.01);
CDmin = Param("Swing D Min.(XA)",1.25,1,1.8,0.01);
CDmax = Param("Swing D Max.(XA)",1.8,1,2,0.01);

_SECTION_END();

_SECTION_BEGIN("Patterns");

strength = Param("Strength",5,2,15,1);
bu = ParamToggle("Bullish Pattern","Off|On",1);
be = ParamToggle("Bearish Pattern","Off|On",1);

bi = Cum(1)-1;

function GetTop(bars)
{
Top = H == HHV(H,2*bars) AND Ref(HHV(H,bars),bars) < H;
Top = Top AND LastValue(bi)-ValueWhen(Top,bi) > bars;
return Top;
}

function GetValley(bars)
{
Valley = L == LLV(L,2*bars) AND Ref(LLV(L,bars),bars) > L;
Valley = Valley AND LastValue(bi)-ValueWhen(Valley,bi) > bars;
return Valley;
}


// Build fractals array

P1 = GetTop(strength);
V1 = GetValley(Strength);

P1 = IIf(P1,IIf(ValueWhen(P1,bi,2) < ValueWhen(V1,bi),P1,IIf(ValueWhen(P1,H,2) > H,False,P1)),P1);
//P1 = IIf(P1 AND ValueWhen(P1,bi,0) > bi,IIf(ValueWhen(P1,bi,0) < ValueWhen(V1,bi,0),IIf(ValueWhen(P1,H,0) >= H,False,P1),P1),P1);
P1 = IIf(P1 AND ValueWhen(P1,bi,0) > bi AND NOT(ValueWhen(V1,bi,0) > 0 AND ValueWhen(V1,bi,0)

V1 = IIf(V1,IIf(ValueWhen(V1,bi,2) < ValueWhen(P1,bi),V1,IIf(ValueWhen(V1,L,2)//V1 = IIf(V1 AND ValueWhen(V1,bi,0) > bi ,IIf(ValueWhen(V1,bi,0) < ValueWhen(P1,bi,0),IIf(ValueWhen(V1,L,0) <= L, False,V1),V1),V1);
V1 = IIf(V1 AND ValueWhen(V1,bi,0) > bi AND NOT(ValueWhen(P1,bi,0) > bi AND ValueWhen(P1,bi,0)=ValueWhen(V1,L,0),False,V1),V1);


P1H1 = ValueWhen(P1,H);
P1Bar1 = ValueWhen(P1,bi);
P1H2 = ValueWhen(P1,H,2);
P1Bar2 = ValueWhen(P1,bi,2);
V1L1 = ValueWhen(V1,L);
V1Bar1 = ValueWhen(V1,bi);
V1L2 = ValueWhen(V1,L,2);
V1Bar2 = ValueWhen(V1,bi,2);


//Bullish Patterns

PTvalid = (P1Bar1 > V1Bar1 AND V1Bar1 > P1Bar2 AND P1bar2 > V1Bar2) AND P1; // Peaks and troughs are in order

// 4 swings of developing Gartley/Bat etc.

BullGartley4 = PTvalid AND (P1H2-V1L1)/(P1H2-V1L2) > GBmin AND (P1H2-V1L1)/(P1H2-V1L2) < GBmax
AND (P1H1-V1L1)/(P1H2-V1L1) > GCMin AND (P1H1-V1L1)/(P1H2-V1L1) < GCMax;

BullBat4 = PTvalid AND (P1H2-V1L1)/(P1H2-V1L2) > BatBmin AND (P1H2-V1L1)/(P1H2-V1L2) < BatBmax
AND (P1H1-V1L1)/(P1H2-V1L1) > BatCMin AND (P1H1-V1L1)/(P1H2-V1L1) < BatCMax;

BullButterfly4 = PTvalid AND (P1H2-V1L1)/(P1H2-V1L2) > BtBmin AND (P1H2-V1L1)/(P1H2-V1L2) < BtBMax
AND (P1H1-V1L1)/(P1H2-V1L1) > BtCmin AND (P1H1-V1L1)/(P1H2-V1L1) < BtCmax;

BullCrab4 = PTvalid AND (P1H2-V1L1)/(P1H2-V1L2) >CBmin AND (P1H2-V1L1)/(P1H2-V1L2) < CBmax
AND (P1H1-V1L1)/(P1H2-V1L1) > CCmin AND (P1H1-V1L1)/(P1H2-V1L1) < CCmax;


// Bullish Gartley/Bat found. D retacement level is not evaluated

BullGartley = IIf(LowestSince(BullGartley4,L) < ValueWhen(BullGartley4,P1H2)-(ValueWhen(BullGartley4,P1H2)-ValueWhen(BullGartley4,V1L2))*GDmin AND
LowestSince(bullGartley4,L) > ValueWhen(BullGartley4,P1H2)-(ValueWhen(BullGartley4,P1H2)-ValueWhen(BullGartley4,V1L2))*GDmax AND
HighestSince(BullGartley4,H) <= ValueWhen(BullGartley4,P1H1 ) AND
LowestSince(bullGartley4,L)==L, True,False);
BullGartley = BullGartley AND LowestSince(BullGartley4,L) < ValueWhen(BullGartley4,V1L1);

BullBat = IIf(LowestSince(BullBat4,L) < ValueWhen(BullBat4,P1H2)-(ValueWhen(BullBat4,P1H2)-ValueWhen(BullBat4,V1L2))*BatDmin AND
LowestSince(BullBat4,L) > ValueWhen(BullBat4,P1H2)-(ValueWhen(BullBat4,P1H2)-ValueWhen(BullBat4,V1L2))*BatDmax AND
HighestSince(BullBat4,H) <= ValueWhen(BullBat4,P1H1 ) AND
LowestSince(BullBat4,L)==L, True,False);
BullBat = BullBat AND LowestSince(BullCrab4,L) < ValueWhen(BullCrab4,V1L1);


BullCrab = IIf(LowestSince(BullCrab4,L) < ValueWhen(BullCrab4,P1H2)-(ValueWhen(BullCrab4,P1H2)-ValueWhen(BullCrab4,V1L2))*CDmin AND
LowestSince(BullCrab4,L) > ValueWhen(BullCrab4,P1H2)-(ValueWhen(BullCrab4,P1H2)-ValueWhen(BullCrab4,V1L2))*CDmax AND
HighestSince(BullCrab4,H) <= ValueWhen(BullCrab4,P1H1 ) AND
LowestSince(bullGartley4,L)==L, True,False);
BullCrab = BullCrab AND LowestSince(BullCrab4,L) < ValueWhen(BullCrab4,V1L2);


BullButterfly = IIf(LowestSince(BullButterfly4,L) < ValueWhen(BullButterfly4,P1H2)-(ValueWhen(BullButterfly4,P1H2)-ValueWhen(BullButterfly4,V1L2))*BtDMin AND
LowestSince(BullButterfly4,L) > ValueWhen(BullButterfly4,P1H2)-(ValueWhen(BullButterfly4,P1H2)-ValueWhen(BullButterfly4,V1L2))*BtDmax AND
HighestSince(BullButterfly4,H) <= ValueWhen(BullButterfly4,P1H1 ) AND
LowestSince(bullButterfly4,L)==L, True,False);
BullButterfly = BullButterfly AND LowestSince(BullButterfly4,L) < ValueWhen(BullButterfly4,V1L2);



// to remove redumbdent lines

BullHar4 = BullGartley4 OR BullButterfly4 OR BullBat4 OR BullCrab4 ;
BullHar = BullGartley OR BullButterfly OR BullBat OR BullCrab ;

Point4 = IIf(BullHar,ValueWhen(BullHar4,bi),Null);
BullHar = IIf(BullHar, IIf(Point4 == ValueWhen(BullHar,point4,0) AND ValueWhen(BullHar,bi,0) > bi ,False,BullHar),BullHar);

X = ValueWhen(BullHar4,V1L2);
Xbar = ValueWhen(BullHar4,V1Bar2);
A = ValueWhen(BullHar4,P1H2);
Abar = ValueWhen(BullHar4,P1bar2);
B = ValueWhen(BullHar4,V1L1);
Bbar = ValueWhen(BullHar4,V1bar1);
C1 = ValueWhen(BullHar4,P1H1);
C1bar = ValueWhen(BullHar4,P1bar1);
D = ValueWhen(BullHar,L);
Dbar = ValueWhen(BullHar,bi);
ABdXA = (A-B)/(A-X);
BCdAB = (C1-B)/(A-B);
ADdXA = (A-D)/(A-X);
BCdCD = (C1-D)/(C1-B);

PlotPattern = Dbar > C1bar;
if(LastValue(PlotPattern) AND bu)
{
Plot( LineArray(LastValue(Xbar),LastValue(X),LastValue(Abar),LastValue(A)),"",colorBlue,styleThick);
Plot(LineArray(LastValue(Abar),LastValue(A),LastValue(Bbar),LastValue(B)),"",colorBlue,styleThick);
Plot(LineArray(LastValue(Bbar),LastValue(B),LastValue(C1bar),LastValue(C1)),"",colorBlue,styleThick);
Plot(LineArray(LastValue(C1bar),LastValue(C1),LastValue(Dbar),LastValue(D)),"",colorBlue,styleThick);
Plot(LineArray(LastValue(Xbar),LastValue(X),LastValue(Bbar),LastValue(B)),"",colorBlue,styleDashed);
Plot(LineArray(LastValue(Xbar),LastValue(X),LastValue(Abar),LastValue(A)),"",colorBlue,styleThick);
Plot(LineArray(LastValue(Abar),LastValue(A),LastValue(C1bar),LastValue(C1)),"",colorBlue,styleDashed);
Plot(LineArray(LastValue(Bbar),LastValue(B),LastValue(Dbar),LastValue(D)),"",colorBlue,styleDashed);
Plot(LineArray(LastValue(Xbar),LastValue(X),LastValue(Dbar),LastValue(D)),"",colorBlue,styleDashed);

PlotText(NumToStr(LastValue(ABdXA),1.2),(LastValue(Bbar)+LastValue(Xbar))/2,(LastValue(B)+LastValue(X))/2,colorBlue);
PlotText(NumToStr(LastValue(BCdAB),1.2),(LastValue(C1bar)+LastValue(Abar))/2,(LastValue(C1)+LastValue(A))/2,colorBlue);
PlotText(NumToStr(LastValue(ADdXA),1.2) ,(LastValue(Dbar)+LastValue(Xbar))/2,(LastValue(D)+LastValue(X))/2,colorBlue);
PlotText(NumToStr(LastValue(BCdCD),1.2),(LastValue(Bbar)+LastValue(Dbar))/2,(LastValue(B)+LastValue(D))/2,colorBlue);
}

// Bearish Patterns

PTvalid = (V1Bar1 > P1Bar1 AND P1Bar1 > V1Bar2 AND V1Bar2 > P1Bar2) AND V1;

// Swing 4

BearGartley4 = PTvalid AND (P1H1-V1L2)/(P1H2-V1L2) > GBmin AND (P1H1-V1L2)/(P1H2-V1L2) < GBmax AND
(P1H1-V1L1)/(P1H1-V1L2) > GCmin AND (P1H1-V1L1)/(P1H1-V1L2) < GCmax;

BearBat4 = PTvalid AND (P1H1-V1L2)/(P1H2-V1L2) > BatBmin AND (P1H1-V1L2)/(P1H2-V1L2) < BatBmax AND
(P1H1-V1L1)/(P1H1-V1L2) > BatCmin AND (P1H1-V1L1)/(P1H1-V1L2) < BatCmax;

BearButterfly4 = PTvalid AND (P1H1-V1L2)/(P1H2-V1L2) > BtBmin AND (P1H1-V1L2)/(P1H2-V1L2) < BtBmax AND
(P1H1-V1L1)/(P1H1-V1L2) > BtCmin AND (P1H1-V1L1)/(P1H1-V1L2) < BtCmax;

BearCrab4 = PTvalid AND (P1H1-V1L2)/(P1H2-V1L2) > CBmin AND (P1H1-V1L2)/(P1H2-V1L2) < CBmax AND
(P1H1-V1L1)/(P1H1-V1L2) > CCmin AND (P1H1-V1L1)/(P1H1-V1L2) < CCmax;

// Poin D

BearGartley = IIf(HighestSince(bearGartley4,H) > ValueWhen(BearGartley4,V1L2) + (ValueWhen(BearGartley4,P1H2) - ValueWhen(BearGartley4,V1L2))*GDmin AND
HighestSince(bearGartley4,H) < ValueWhen(BearGartley4,V1L2) + (ValueWhen(BearGartley4,P1H2) - ValueWhen(BearGartley4,V1L2))*GDMax AND
LowestSince(BearGartley4,L) >= ValueWhen(BearGartley4,V1L1 ) AND
HighestSince(BearGartley4,H) == H, True, False);
BearGartley = BearGartley AND HighestSince(BearGartley4,H) > ValueWhen(BearGartley4,P1H1);

BearBat = IIf((HighestSince(BearBat4,H) > ValueWhen(BearBat4,V1L2) + (ValueWhen(BearBat4,P1H2) - ValueWhen(BearBat4,V1L2))*BatDmin AND
HighestSince(BearBat4,H) < ValueWhen(BearBat4,V1L2) + (ValueWhen(BearBat4,P1H2) - ValueWhen(BearBat4,V1L2))*BatDMax AND
LowestSince(BearBat4,L) >= ValueWhen(BearBat4,V1L1 ) AND
HighestSince(BearBat4,H) == H), True, False);
BearBat = BearBat AND HighestSince(BearBat4,H) > ValueWhen(BearBat4,P1H1);

BearButterfly = IIf(HighestSince(BearButterfly4,H) > ValueWhen(BearButterfly4,V1L2) + (ValueWhen(BearButterfly4,P1H2) - ValueWhen(BearButterfly4,V1L2))*BtDmin AND
HighestSince(BearButterfly4,H) < ValueWhen(BearButterfly4,V1L2) + (ValueWhen(BearButterfly4,P1H2) - ValueWhen(BearButterfly4,V1L2))*BtDMax AND
LowestSince(BearButterfly4,L) >= ValueWhen(BearButterfly4,V1L1 ) AND
HighestSince(BearButterfly4,H) == H, True, False);
BearButterfly = BearButterfly AND HighestSince(BearButterfly4,H) > ValueWhen(BearButterfly4,P1H2);

BearCrab = IIf(HighestSince(BearCrab4,H) > ValueWhen(BearCrab4,V1L2) + (ValueWhen(BearCrab4,P1H2) - ValueWhen(BearCrab4,V1L2))*CDmin AND
HighestSince(BearCrab4,H) < ValueWhen(BearCrab4,V1L2) + (ValueWhen(BearCrab4,P1H2) - ValueWhen(BearCrab4,V1L2))*CDMax AND
LowestSince(BearCrab4,L) >= ValueWhen(BearCrab4,V1L1 ) AND
HighestSince(BearCrab4,H) == H, True, False);
BearCrab =BearCrab AND HighestSince(BearCrab4,H) > ValueWhen(BearCrab4,P1H2);


BearHar4 = BearGartley4 OR BearButterfly4 OR BearBat4 OR BearCrab4 ;
BearHar = BearGartley OR BearButterfly OR BearBat OR BearCrab ;

Point4 = IIf(BearHar,ValueWhen(BearHar4,bi),Null);
BearHar = IIf(BearHar, IIf(Point4 == ValueWhen(BearHar,point4,0) AND ValueWhen(BearHar,bi,0) > bi ,False,BearHar),BearHar);

X = ValueWhen(BearHar4,P1H2);
Xbar = ValueWhen(BearHar4,P1Bar2);
A = ValueWhen(BearHar4,V1L2);
Abar = ValueWhen( BearHar4,V1bar2);
B = ValueWhen(BearHar4,P1H1);
Bbar = ValueWhen(BearHar4,P1bar1);
C1 = ValueWhen(BearHar4,V1L1);
C1bar = ValueWhen(BearHar4,V1bar1);
D = ValueWhen(BearHar,H);
Dbar = ValueWhen(BearHar,bi);

ABdXA = (B-A)/(X-A);
BCdAB = (B-C1)/(B-A);
ADdXA = (D-A)/(X-A);
BCdCD = (D-C1)/(B-C1);

PlotPattern = Dbar > C1bar;

if(LastValue(Plotpattern) AND be)

{
Plot( LineArray(LastValue(Xbar),LastValue(X),LastValue(Abar),LastValue(A)),"",colorRed,styleThick);
Plot(LineArray(LastValue(Abar),LastValue(A),LastValue(Bbar),LastValue(B)),"",colorRed,styleThick);
Plot(LineArray(LastValue(Bbar),LastValue(B),LastValue(C1bar),LastValue(C1)),"",colorRed,styleThick);
Plot(LineArray(LastValue(C1bar),LastValue(C1),LastValue(Dbar),LastValue(D)),"",colorRed,styleThick);
Plot(LineArray(LastValue(Xbar),LastValue(X),LastValue(Bbar),LastValue(B)),"",colorRed,styleDashed);
Plot(LineArray(LastValue(Xbar),LastValue(X),LastValue(Abar),LastValue(A)),"",colorRed,styleThick);
Plot(LineArray(LastValue(Abar),LastValue(A),LastValue(C1bar),LastValue(C1)),"",colorRed,styleDashed);
Plot(LineArray(LastValue(Bbar),LastValue(B),LastValue(Dbar),LastValue(D)),"",colorRed,styleDashed);
Plot(LineArray(LastValue(Xbar),LastValue(X),LastValue(Dbar),LastValue(D)),"",colorRed,styleDashed);

PlotText(NumToStr(LastValue(ABdXA),1.2),(LastValue(Bbar)+LastValue(Xbar))/2,(LastValue(B)+LastValue(X))/2,colorRed);
PlotText(NumToStr(LastValue(BCdAB),1.2),(LastValue(C1bar)+LastValue(Abar))/2,(LastValue(C1)+LastValue(A))/2,colorRed);
PlotText(NumToStr(LastValue(BCdCD),1.2) ,(LastValue(Dbar)+LastValue(Bbar))/2,(LastValue(D)+LastValue(B))/2,colorRed);
PlotText(NumToStr(LastValue(ADdXA),1.2) ,(LastValue(Dbar)+LastValue(Xbar))/2,(LastValue(D)+LastValue(X))/2,colorRed);

}

LatPattern = bullHar OR bearHar;
Lastpattern = LastValue(ValueWhen(LatPattern,IIf(BullGartley,1,IIf(BearGartley,-1,IIf(BullBat,2,IIf(BearBat,-2,
IIf(BullButterfly,3,IIf(BearButterfly,-3,IIf(BullCrab,4,IIf(BearCrab,-4,Null))))))))));
PatternName = WriteIf(LastPattern == 1,"Bullish Gartley",WriteIf(LastPattern == -1,"Bearish Gartley",WriteIf(LastPattern == 2,"Bullish Bat",
WriteIf(LastPattern == -2,"Bearish Bat",WriteIf(LastPattern == 3,"Bullish Butterfly",WriteIf(LastPattern == -3,"Bearish Butterfly",
WriteIf(LastPattern == 4,"Bullish Crab",WriteIf(LastPattern == -4,"Bearish Crab","None"))))))));


plotFractals = ParamToggle("Plot Fractals","Off|On",0);
if(PlotFractals)
{
PlotShapes(shapeSmallCircle*P1,colorRed,0,H,10);
PlotShapes(shapeSmallCircle*V1,colorBlue,O,L,-10);
}

GfxSetTextColor(IIf(LastPattern > 0, colorGreen,colorRed));
GfxTextOut("Last Pattern : " + PatternName,0,20);

Filter = BullHar OR BearHar;
Bull = BullHar; Bear = BearHar;
Color = IIf(Bull,colorGreen,colorRed);
AddColumn(IIf(Bull,1,IIf(Bear,-1,Null)),"Pattern",1.0,colorWhite,Color);

459Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Fri Dec 07, 2012 2:17 pm

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

Here is a screen shot of the HPP @ work Very Happy

[img][You must be registered and logged in to see this image.][/img]

460Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Fri Dec 07, 2012 2:23 pm

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

here is both versions..... in one screen shot Very Happy

[You must be registered and logged in to see this image.]

461Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Fri Dec 07, 2012 2:27 pm

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

Here is LLUB see how it detected a SELL trade Very Happy
[You must be registered and logged in to see this image.]

462Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Fri Dec 07, 2012 2:42 pm

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

Sent an email to joy...to update on 2 remaining pattern recognotions - Shark and 5-0....let see Very Happy

463Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Fri Dec 07, 2012 5:41 pm

pathfinder

pathfinder
Senior Manager - Equity Analytics
Senior Manager - Equity Analytics

What to do with Direct FN Shocked

464Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Fri Dec 07, 2012 6:09 pm

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

pathfinder wrote:What to do with Direct FN Shocked
Smile I think amibroker gives good TA tools.my personal opinion though,it has become ez to detect the HP patterns...did you have look at the recognition tool....in my view direct fn is still lacking these some of the advance indicators.... Smile so i will be using both amibroker and directfn tws. Rolling Eyes

i am using HPP and another trading technique for BUY and sell Wink

TAH

465Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Fri Dec 07, 2012 6:12 pm

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

both methods are complementing each other well....so this recognition tool eases some of our burden know rabbit

466Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Fri Dec 07, 2012 7:34 pm

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

pathfinder you need to import EoD to amibroker using dileepas tool DFN Data Sniffer ...please search the forum...

TAH

467Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Sat Dec 08, 2012 1:13 am

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

Please use your own discretionary when reviewing the recognition codes pasted by me...as i notice some patterns are questionable.....

Take care....

TAH

468Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Wed Dec 12, 2012 6:56 pm

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

did a small collection Wink
Dfcc
ghll
Kapi
binn
Aluf

TAH

469Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Wed Dec 12, 2012 6:58 pm

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

did any1 buy VLL Very Happy @3.70

keep an eye on it ... Sleep

TAH

470Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Wed Dec 12, 2012 7:01 pm

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

shud see some more gains tomorrow....as this interest cut caught many off guard....

next big news would be EPF /ETF entering drunken

whats your thought....bull boys

TAH

471Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Wed Dec 12, 2012 7:06 pm

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

i think dial would be attractive around 7.90 my buy order didnt get filled Shocked

and bil @ 3.60 was holding good as well know..

btw :i am not holding any of the 2 currently No

TAH

472Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Wed Dec 12, 2012 7:14 pm

nimantha80


Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

UCAR a good buy. Wink

473Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Thu Dec 13, 2012 1:20 am

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

nimantha80 wrote:UCAR a good buy. Wink
not for me Shocked

474Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Thu Dec 13, 2012 7:27 am

kav4


Senior Manager - Equity Analytics
Senior Manager - Equity Analytics

I get error here

P1 = GetTop(strength); // so' bar cho 1 duong` XA, AB, BC, CD
V1 = GetValley(Strength);

P1 = IIf(P1,IIf(ValueWhen(P1,bi,2) < ValueWhen(V1,bi),P1,IIf(ValueWhen(P1,H,2) > H,False,P1)),P1);
P1 = IIf(P1 AND ValueWhen(P1,bi,0) > bi,IIf(ValueWhen(P1,bi,0) < ValueWhen(V1,bi,0),IIf(ValueWhen(P1,H,0) >= H,False,P1),P1),P1);
V1 = IIf(V1,IIf(ValueWhen(V1,bi,2) < ValueWhen(P1,bi),V1,IIf(ValueWhen(V1,L,2)V1 = IIf(V1 AND ValueWhen(V1,bi,0) > bi ,IIf(ValueWhen(V1,bi,0) < ValueWhen(P1,bi,0),IIf(ValueWhen(V1,L,0) <= L, False,V1),V1),V1);

Syntax error, expecting ")" or ","

475Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Fri Dec 14, 2012 9:07 pm

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

Look for NEST,CTC & LLUB

Above 3 should appreciate decently in coming months/year...

NEST -1750-1950
CTC - 1000
LLUB -300

This is a no brainer ...if you evaluate.....for longterm

Look for VLL & ALUF

TAH

476Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Fri Dec 14, 2012 9:18 pm

Fresher


Moderator
Moderator

traderathome wrote:Look for NEST,CTC & LLUB

Above 3 should appreciate decently in coming months/year...

NEST -1750-1950
CTC - 1000
LLUB -300

This is a no brainer ...if you evaluate.....for longterm

Look for VLL & ALUF

TAH

interesting. I'm trying to figure out why, since only way ahead is growth, I can't justify myself enough why there will be considerable growth.

477Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Fri Dec 14, 2012 9:19 pm

sahan8896


Assistant Vice President - Equity Analytics
Assistant Vice President - Equity Analytics

traderathome wrote:Look for NEST,CTC & LLUB

Above 3 should appreciate decently in coming months/year...

NEST -1750-1950
CTC - 1000
LLUB -300

This is a no brainer ...if you evaluate.....for longterm

Look for VLL & ALUF

TAH

LLUB is the one to look for.CTC and NEST have already gone up and will be risky because of liquidity.LLUB will have a slow upwar move.traderathome according to you also 300 from LLUB means 50% return and CTC and NEST are already 800 and 1500.Anyway buy whatever now 2013 will give you good gains. Very Happy

478Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Sat Dec 15, 2012 9:33 am

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

increase in petrol prices meaning = increase in petroleum related products as well right.....

chevron may not like it...due to increase price but increase will benefit them directly as well...

they being the market leader..and the competition is very negligible...i think we are in treat for something next year boys......

the govt may consider tax reduction for brand new import cars nxt year perhaps.....IMHO..they can not sustain this increase for long since they would like to increase revenue into govt treasury by way of tax....they will realize they need to strike a balance so that revenue flow is not affected and their neighbor is kept happy as well.

we will see motor sector doing well for this reason at least for some time when the reduction is announced.....these are my view for the future

UML/DIMO and others will see a nice decent run in the next year if these changes occur.

Full disclosure:I am holding UML/DIMO/LLUB

479Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Sat Dec 15, 2012 11:21 am

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

the only risk for those accumalating NEST is we sould see some selling to bring in a correction to 50% that means 1450 Rs in the near term, but upward will continue...until about 1950 max we should see another major correction. to continue/sustain the uptrend. Very Happy

480Technical Analytics & Charts (1) - Page 19 Empty Re: Technical Analytics & Charts (1) Sat Dec 15, 2012 11:24 am

traderathome

traderathome
Senior Vice President - Equity Analytics
Senior Vice President - Equity Analytics

Kithsiri wrote:Did anyone get the PLC Dividend cheque today ? No
may be ALLI & CTEA may come this week know Very Happy

Sponsored content



Back to top  Message [Page 19 of 40]

Go to page : Previous  1 ... 11 ... 18, 19, 20 ... 29 ... 40  Next

Permissions in this forum:
You cannot reply to topics in this forum