Notes
![]() ![]() Notes - notes.io |
_SECTION_BEGIN("PriceCandle");
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", colorPink ), styleNoTitle | styleCandle|styleNoLabel);
_SECTION_END();
_SECTION_BEGIN("VOLUME_Hight of Volume Bars Control");
PlotVOL = ParamToggle( "plot Volume?","No| Yes",0);
VolColor = (C>O OR (C==O AND (H-C)<=(C-L) ))*ParamColor( "VUpColor" ,5) +
(C<O OR (C==O AND
(H-C)>(C-L)) )*ParamColor( "VDnColor" ,4) ;
VolScale = Param("1/Vol. Height (TimeBar chart)(fraction of
window) 5=1/5=20%",10, 2, 100, 1.0) ; // Timebars
if (PlotVOL >0)
{
Vheight = VolScale;
Plot(Prec(Volume ,0),"V",VolColor,
//styleNoTitle| styleOwnScale| styleNoLabel| styleThick| (styleCandle| styleNoLabel) ,Vheight ); }
//Plot(MA(Volume,50),"",colorLightBlue,styleLine);
styleNoTitle| styleOwnScale| styleNoLabel| styleThick| ParamStyle( "VStyle", styleHistogram,maskHistogram| styleNoLabel) ,Vheight ); }
//Plot(MA(Volume,50),"",colorLightBlue,styleLine);
_SECTION_END();
_SECTION_BEGIN("PriceCandle");
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", colorPink ), styleNoTitle | styleCandle );
_SECTION_END();
_SECTION_BEGIN("Pattern Recognition Exploration");
//Description:Paste the code in Automatic Analysis AND Explore All Stocks for the last Date of your data.
//In Results click twice a label , for example "a TR" AND you will collect all ascending Triangles marked with an "1".
//This Exploration recognizes the following patterns:
//+Ascending Wedges "aW"
//+Descending Wedges "dW"
//+ ascending Triangles "a TR"
//+descending Triangles "d TR"
//+ascending channel "a ll"
//+descending channel "d ll"
//+almost horizontal channel "ll"
//+Converging Support AND Resistance
//+Diverging Support AND Resistance
//+N/A, ie examples NOT belonging to any above category.
//You may decrease sensitivity, changing per=3; with another percentage higher than 3.
//for Indicator Builder paste the code in Comments.
//Formula:
/*Pattern Recognition Exploration
by Dimitris Tsokakis*/
x = Cum(1);
per = 3;
s1=L;
s11=H;
pS = TroughBars( s1, per, 1 ) == 0;
endt= LastValue(ValueWhen( pS, x, 1 ));
startt=LastValue(ValueWhen( pS, x, 2 ));
dtS =endt-startt;
endS = LastValue(ValueWhen( pS, s1, 1 ) );
startS = LastValue( ValueWhen( pS, s1, 2 ));
aS = (endS-startS)/dtS;
pR = PeakBars( s11, per, 1 ) == 0;
endt1= LastValue(ValueWhen( pR, x, 1 ));
startt1=LastValue(ValueWhen( pR, x, 2 ));
dtR =endt1-startt1;
endR = LastValue(ValueWhen( pR, s11, 1 ) );
startR = LastValue( ValueWhen( pR, s11, 2 ));
aR = (endR-startR)/dtR;
Filter=1;
NumColumns=12;
Column0=aS;
Column1=aR;
Column0Name="aSup";
Column1Name="aRes";
Column2=ar>0 AND as>3*ar;
Column2Name="ascWedge";
Column2Format=1.0;
Column3=ar<3*as AND as<0;
Column3Name="desWedge";
Column3Format=1.0;
Column4=abs(aR)<0.002 AND aS>0;
Column4Name="ascTRiangl";
Column4Format=1.0;
Column5=abs(aS)<0.002 AND ar<0;
Column5Name="descTRi";
Column5Format=1.0;
Column6=abs(aR-aS)<0.1*aS;
Column6Name="asChannel";
Column6Format=1.0;
Column7=abs(aR-aS)<0.1*abs(aR) AND aR<0;
Column7Name="dESchannel";
Column7Format=1.0;
Column8=abs(aR-aS)<0.1*abs(aR) AND abs(aR)<0.01;
Column8Name="horizontal channel ";
Column8Format=1.0;
Column9=aR<0 AND aS>0;
Column9Name="Converging SR";
Column9Format=1.0;
Column10=aR>0 AND aS<0;
Column10Name="Diverging SR";
Column10Format=1.0;
Column11=Column2==0 AND Column3==0 AND Column4==0 AND
Column5==0 AND Column6==0 AND Column7==0 AND Column8==0
AND Column9==0 AND Column10==0;
Column11Name="N/A";
Column11Format=1.0;
_SECTION_END();
_SECTION_BEGIN("VOLUME_Hight of Volume Bars Control");
PlotVOL = ParamToggle( "plot Volume?","No| Yes",0);
VolColor = (C>O OR (C==O AND (H-C)<=(C-L) ))*ParamColor( "VUpColor" ,5) +
(C<O OR (C==O AND
(H-C)>(C-L)) )*ParamColor( "VDnColor" ,4) ;
VolScale = Param("1/Vol. Height (TimeBar chart)(fraction of
window) 5=1/5=20%",5, 2, 100, 1.0) ; // Timebars
if (PlotVOL >0)
{
Vheight = VolScale;
Plot(Prec(Volume ,0),"V",VolColor,
//styleNoTitle| styleOwnScale| styleNoLabel| styleThick| (styleCandle| styleNoLabel) ,Vheight ); }
//Plot(MA(Volume,50),"",colorLightBlue,styleLine);
styleNoTitle| styleOwnScale| styleNoLabel| styleThick| ParamStyle( "VStyle", styleHistogram,maskHistogram| styleNoLabel) ,Vheight ); }
//Plot(MA(Volume,50),"",colorLightBlue,styleLine);
_SECTION_END();
_SECTION_BEGIN("Pattern Recognition with Shading");
//Pattern Recognition graph with shading
/*TRENDLINES BREAKOUT*/
x = Cum(1);
per = Param("Percent",2,1,5,1);
s1=L;
s11=H;
pS = TroughBars( s1, per, 1 ) == 0;
endt= LastValue(ValueWhen( pS, x, 1 ));
startt=LastValue(ValueWhen( pS, x, 2 ));
endS = LastValue(ValueWhen( pS, s1, 1 ) );
startS = LastValue( ValueWhen( pS, s1, 2 ));
dtS =endt-startt;
aS = (endS-startS)/dtS;
bS = endS;
trendlineS = aS * ( x -endt ) + bS;
pR = PeakBars( s11, per, 1 ) == 0;
endt1= LastValue(ValueWhen( pR, x, 1 ));
startt1=LastValue(ValueWhen( pR, x, 2 ));
endR = LastValue(ValueWhen( pR, s11, 1 ) );
startR = LastValue( ValueWhen( pR, s11, 2 ));
DTR=ENDT1-STARTT1;
aR = (endR-startR)/dtR;
bR = endR;
trendlineR = aR * ( x -endt1 ) + bR;
BEGIN=Min(STARTT,STARTT1);
TRS = IIf(x>BEGIN-10,trendlineS,-1e10);
TRR = IIf(x>BEGIN-10,trendlineR,-1e10);
Condcolor=(Cross(C,trendlineR) AND X>ENDT1) OR (Cross(trendlineS,C) AND
X>ENDT);
//BarColor=IIf(Condcolor,7,1);
BarColor=IIf(Condcolor,6,3);
Plot(C,"Close",BarColor,styleCandle);
//Plot(TRS,"Support",colorLightYellow,styleLine);
//Plot(TRR,"Resist",colorLightYellow,styleLine);
Plot(TRS,"Support",ColorRGB(30,30,30),styleLine);
Plot(TRR,"Resist",ColorRGB(30,30,30),styleLine);
/////////////////////////////////////
// Shading //
////////////////////////////////////
fill=Param("style",2,1,2,1);
style=IIf(fill==1,styleHistogram,IIf(fill==2,styleArea,Null));
x=IIf(trs > trr,trr,trs);
//Plot(x,"",colorLightGrey,style);
Plot(x,"",colorBlack,style);
Plot(trr,"",ColorRGB(30,30,20),style);
////////////////////////////////////////////
// Pattern Recognition in title bar //
///////////////////////////////////////////
Lowline=Ends-starts;
Highline=endr-startr;
Wedge=IIf(Highline <0 AND Lowline > 0,1,0);
DecendingTriangle=IIf(Highline < 0 AND Lowline==0,1,0);
AscendingTriangle=IIf(Highline==0 AND Lowline > 0,1,0);
DownChannel=IIf(Highline<0 AND Lowline<0,1,0);
UpChannel=IIf(Highline>0 AND Lowline>0,1,0);
BroadeningWedge=IIf(Highline > 0 AND Lowline < 0,1,0);
///////////////////////////////////
// Bullish or Bearish breakout //
//////////////////////////////////
BullishBreakout=Cross(C,trendlineR);
BearishBreakout=Cross(trendlineS,C);
Title=Name()+ WriteIf(wedge==1," Wedge","")+WriteIf(DecendingTriangle==1," Decending Triangle","")+WriteIf(AscendingTriangle==1,"Ascending Triangle","")/*+WriteVal(Lowline)*/+WriteIf(DownChannel==1," Downward Sloping Channel","")+WriteIf(UpChannel==1," Upward Sloping Channel","")+WriteIf(broadeningWedge==1," Broadening Wedge","")+"n"+EncodeColor(colorGreen)+WriteIf(bullishbreakout,"Bullish Breakout",EncodeColor(colorRed)+WriteIf(bearishbreakout,"Bearish Breakout",""))/*+WriteVal(highline)*/;
/////////////////////////////////////
// Automatic Analysis //
////////////////////////////////////
Filter=AscendingTriangle OR DecendingTriangle OR Wedge OR DownChannel OR UpChannel OR BroadeningWedge OR Bullishbreakout OR bearishbreakout;
AddTextColumn(WriteIf(bullishbreakout,"bullish Breakout",""),"BullBreak");
AddTextColumn(WriteIf(bearishBreakout,"Bearish Breakout",""),"BearBreak");
AddTextColumn(WriteIf(ascendingtriangle,"Ascending Triangle",WriteIf(decendingtriangle,"Decending Triangle",WriteIf(Wedge,"Wedge",WriteIf(DownChannel,"Down Channel",WriteIf(UpChannel,"Up Channel",WriteIf(BroadeningWedge,"Broadening Wedge","")))))),"Pattern");
AddColumn(C,"Close");
_SECTION_END();
_SECTION_BEGIN("Cloud study OTHER");
RE = Study("RE", GetChartID() );
SU = Study("SU", GetChartID() );
PlotOHLC( RE, RE, SU, SU, "", ColorRGB(100,50,150),styleCloud );
UP = Study("UP", GetChartID() );
DN = Study("DN", GetChartID() );
PlotOHLC( UP, UP, DN, DN, "", ColorRGB(20,50,10),styleCloud );
RI = Study("RI", GetChartID() );
ST = Study("ST", GetChartID() );
PlotOHLC( RI, RI, ST, ST, "", ColorRGB(30,30,30),styleCloud );
_SECTION_END();Write a note in this area. It's really easy to share with others. Click here ...
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team