PubLibPatternLibrary "PubLibPattern"
pattern conditions for indicator and strategy development
bear_5_0(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol)
bearish 5-0 harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
Returns: bool
bull_5_0(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol)
bullish 5-0 harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
Returns: bool
bear_abcd(bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol)
bearish abcd harmonic pattern condition
Parameters:
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
Returns: bool
bull_abcd(bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol)
bullish abcd harmonic pattern condition
Parameters:
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
Returns: bool
bear_alt_bat(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol, ad_low_tol, ad_up_tol)
bearish alternate bat harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
ad_low_tol (float)
ad_up_tol (float)
Returns: bool
bull_alt_bat(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol, ad_low_tol, ad_up_tol)
bullish alternate bat harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
ad_low_tol (float)
ad_up_tol (float)
Returns: bool
bear_bat(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol, ad_low_tol, ad_up_tol)
bearish bat harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
ad_low_tol (float)
ad_up_tol (float)
Returns: bool
bull_bat(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol, ad_low_tol, ad_up_tol)
bullish bat harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
ad_low_tol (float)
ad_up_tol (float)
Returns: bool
bear_butterfly(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol, ad_low_tol, ad_up_tol)
bearish butterfly harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
ad_low_tol (float)
ad_up_tol (float)
Returns: bool
bull_butterfly(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol, ad_low_tol, ad_up_tol)
bullish butterfly harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
ad_low_tol (float)
ad_up_tol (float)
Returns: bool
bear_cassiopeia_a(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol)
bearish cassiopeia a harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
Returns: bool
bull_cassiopeia_a(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol)
bullish cassiopeia a harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
Returns: bool
bear_cassiopeia_b(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol)
bearish cassiopeia b harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
Returns: bool
bull_cassiopeia_b(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol)
bullish cassiopeia b harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
Returns: bool
bear_cassiopeia_c(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol)
bearish cassiopeia c harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
Returns: bool
bull_cassiopeia_c(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol)
bullish cassiopeia c harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
Returns: bool
bear_crab(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol, ad_low_tol, ad_up_tol)
bearish crab harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
ad_low_tol (float)
ad_up_tol (float)
Returns: bool
bull_crab(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol, ad_low_tol, ad_up_tol)
bullish crab harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
ad_low_tol (float)
ad_up_tol (float)
Returns: bool
bear_deep_crab(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol, ad_low_tol, ad_up_tol)
bearish deep crab harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
ad_low_tol (float)
ad_up_tol (float)
Returns: bool
bull_deep_crab(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol, ad_low_tol, ad_up_tol)
bullish deep crab harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
ad_low_tol (float)
ad_up_tol (float)
Returns: bool
bear_cypher(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol, xc_low_tol, xc_up_tol)
bearish cypher harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
xc_low_tol (float)
xc_up_tol (float)
Returns: bool
bull_cypher(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol, xc_low_tol, xc_up_tol)
bullish cypher harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
xc_low_tol (float)
xc_up_tol (float)
Returns: bool
bear_gartley(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol, ad_low_tol, ad_up_tol)
bearish gartley harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
ad_low_tol (float)
ad_up_tol (float)
Returns: bool
bull_gartley(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, cd_low_tol, cd_up_tol, ad_low_tol, ad_up_tol)
bullish gartley harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
cd_low_tol (float)
cd_up_tol (float)
ad_low_tol (float)
ad_up_tol (float)
Returns: bool
bear_shark(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, xc_low_tol, xc_up_tol)
bearish shark harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
xc_low_tol (float)
xc_up_tol (float)
Returns: bool
bull_shark(ab_low_tol, ab_up_tol, bc_low_tol, bc_up_tol, xc_low_tol, xc_up_tol)
bullish shark harmonic pattern condition
Parameters:
ab_low_tol (float)
ab_up_tol (float)
bc_low_tol (float)
bc_up_tol (float)
xc_low_tol (float)
xc_up_tol (float)
Returns: bool
bear_three_drive(x1_low_tol, a1_low_tol, a1_up_tol, a2_low_tol, a2_up_tol, b2_low_tol, b2_up_tol, b3_low_tol, b3_upt_tol)
bearish three drive harmonic pattern condition
Parameters:
x1_low_tol (float)
a1_low_tol (float)
a1_up_tol (float)
a2_low_tol (float)
a2_up_tol (float)
b2_low_tol (float)
b2_up_tol (float)
b3_low_tol (float)
b3_upt_tol (float)
Returns: bool
bull_three_drive(x1_low_tol, a1_low_tol, a1_up_tol, a2_low_tol, a2_up_tol, b2_low_tol, b2_up_tol, b3_low_tol, b3_upt_tol)
bullish three drive harmonic pattern condition
Parameters:
x1_low_tol (float)
a1_low_tol (float)
a1_up_tol (float)
a2_low_tol (float)
a2_up_tol (float)
b2_low_tol (float)
b2_up_tol (float)
b3_low_tol (float)
b3_upt_tol (float)
Returns: bool
asc_broadening()
ascending broadening pattern condition
Returns: bool
broadening()
broadening pattern condition
Returns: bool
desc_broadening()
descending broadening pattern condition
Returns: bool
double_bot(low_tol, up_tol)
double bottom pattern condition
Parameters:
low_tol (float)
up_tol (float)
Returns: bool
double_top(low_tol, up_tol)
double top pattern condition
Parameters:
low_tol (float)
up_tol (float)
Returns: bool
triple_bot(low_tol, up_tol)
triple bottom pattern condition
Parameters:
low_tol (float)
up_tol (float)
Returns: bool
triple_top(low_tol, up_tol)
triple top pattern condition
Parameters:
low_tol (float)
up_tol (float)
Returns: bool
bear_elliot()
bearish elliot wave pattern condition
Returns: bool
bull_elliot()
bullish elliot wave pattern condition
Returns: bool
bear_alt_flag(ab_ratio, bc_ratio)
bearish alternate flag pattern condition
Parameters:
ab_ratio (float)
bc_ratio (float)
Returns: bool
bull_alt_flag(ab_ratio, bc_ratio)
bullish alternate flag pattern condition
Parameters:
ab_ratio (float)
bc_ratio (float)
Returns: bool
bear_flag(ab_ratio, bc_ratio, be_ratio)
bearish flag pattern condition
Parameters:
ab_ratio (float)
bc_ratio (float)
be_ratio (float)
Returns: bool
bull_flag(ab_ratio, bc_ratio, be_ratio)
bullish flag pattern condition
Parameters:
ab_ratio (float)
bc_ratio (float)
be_ratio (float)
Returns: bool
bear_asc_head_shoulders()
bearish ascending head and shoulders pattern condition
Returns: bool
bull_asc_head_shoulders()
bullish ascending head and shoulders pattern condition
Returns: bool
bear_desc_head_shoulders()
bearish descending head and shoulders pattern condition
Returns: bool
bull_desc_head_shoulders()
bullish descending head and shoulders pattern condition
Returns: bool
bear_head_shoulders()
bearish head and shoulders pattern condition
Returns: bool
bull_head_shoulders()
bullish head and shoulders pattern condition
Returns: bool
bear_pennant(ab_ratio, bc_ratio)
bearish pennant pattern condition
Parameters:
ab_ratio (float)
bc_ratio (float)
Returns: bool
bull_pennant(ab_ratio, bc_ratio)
bullish pennant pattern condition
Parameters:
ab_ratio (float)
bc_ratio (float)
Returns: bool
asc_wedge()
ascending wedge pattern condition
Returns: bool
desc_wedge()
descending wedge pattern condition
Returns: bool
wedge()
wedge pattern condition
Returns: bool
Statistics
AsianRange, KillZones, RSI Bars, and Supertrend Strategy by VKombinacija AsianRange, KillZones, RSI Bars, and Supertrend Strategy
PubLibTrendLibrary "PubLibTrend"
trend, multi-part trend, double trend and multi-part double trend conditions for indicator and strategy development
rlut()
return line uptrend condition
Returns: bool
dt()
downtrend condition
Returns: bool
ut()
uptrend condition
Returns: bool
rldt()
return line downtrend condition
Returns: bool
dtop()
double top condition
Returns: bool
dbot()
double bottom condition
Returns: bool
rlut_1p()
1-part return line uptrend condition
Returns: bool
rlut_2p()
2-part return line uptrend condition
Returns: bool
rlut_3p()
3-part return line uptrend condition
Returns: bool
rlut_4p()
4-part return line uptrend condition
Returns: bool
rlut_5p()
5-part return line uptrend condition
Returns: bool
rlut_6p()
6-part return line uptrend condition
Returns: bool
rlut_7p()
7-part return line uptrend condition
Returns: bool
rlut_8p()
8-part return line uptrend condition
Returns: bool
rlut_9p()
9-part return line uptrend condition
Returns: bool
rlut_10p()
10-part return line uptrend condition
Returns: bool
rlut_11p()
11-part return line uptrend condition
Returns: bool
rlut_12p()
12-part return line uptrend condition
Returns: bool
rlut_13p()
13-part return line uptrend condition
Returns: bool
rlut_14p()
14-part return line uptrend condition
Returns: bool
rlut_15p()
15-part return line uptrend condition
Returns: bool
rlut_16p()
16-part return line uptrend condition
Returns: bool
rlut_17p()
17-part return line uptrend condition
Returns: bool
rlut_18p()
18-part return line uptrend condition
Returns: bool
rlut_19p()
19-part return line uptrend condition
Returns: bool
rlut_20p()
20-part return line uptrend condition
Returns: bool
rlut_21p()
21-part return line uptrend condition
Returns: bool
rlut_22p()
22-part return line uptrend condition
Returns: bool
rlut_23p()
23-part return line uptrend condition
Returns: bool
rlut_24p()
24-part return line uptrend condition
Returns: bool
rlut_25p()
25-part return line uptrend condition
Returns: bool
rlut_26p()
26-part return line uptrend condition
Returns: bool
rlut_27p()
27-part return line uptrend condition
Returns: bool
rlut_28p()
28-part return line uptrend condition
Returns: bool
rlut_29p()
29-part return line uptrend condition
Returns: bool
rlut_30p()
30-part return line uptrend condition
Returns: bool
dt_1p()
1-part downtrend condition
Returns: bool
dt_2p()
2-part downtrend condition
Returns: bool
dt_3p()
3-part downtrend condition
Returns: bool
dt_4p()
4-part downtrend condition
Returns: bool
dt_5p()
5-part downtrend condition
Returns: bool
dt_6p()
6-part downtrend condition
Returns: bool
dt_7p()
7-part downtrend condition
Returns: bool
dt_8p()
8-part downtrend condition
Returns: bool
dt_9p()
9-part downtrend condition
Returns: bool
dt_10p()
10-part downtrend condition
Returns: bool
dt_11p()
11-part downtrend condition
Returns: bool
dt_12p()
12-part downtrend condition
Returns: bool
dt_13p()
13-part downtrend condition
Returns: bool
dt_14p()
14-part downtrend condition
Returns: bool
dt_15p()
15-part downtrend condition
Returns: bool
dt_16p()
16-part downtrend condition
Returns: bool
dt_17p()
17-part downtrend condition
Returns: bool
dt_18p()
18-part downtrend condition
Returns: bool
dt_19p()
19-part downtrend condition
Returns: bool
dt_20p()
20-part downtrend condition
Returns: bool
dt_21p()
21-part downtrend condition
Returns: bool
dt_22p()
22-part downtrend condition
Returns: bool
dt_23p()
23-part downtrend condition
Returns: bool
dt_24p()
24-part downtrend condition
Returns: bool
dt_25p()
25-part downtrend condition
Returns: bool
dt_26p()
26-part downtrend condition
Returns: bool
dt_27p()
27-part downtrend condition
Returns: bool
dt_28p()
28-part downtrend condition
Returns: bool
dt_29p()
29-part downtrend condition
Returns: bool
dt_30p()
30-part downtrend condition
Returns: bool
ut_1p()
1-part uptrend condition
Returns: bool
ut_2p()
2-part uptrend condition
Returns: bool
ut_3p()
3-part uptrend condition
Returns: bool
ut_4p()
4-part uptrend condition
Returns: bool
ut_5p()
5-part uptrend condition
Returns: bool
ut_6p()
6-part uptrend condition
Returns: bool
ut_7p()
7-part uptrend condition
Returns: bool
ut_8p()
8-part uptrend condition
Returns: bool
ut_9p()
9-part uptrend condition
Returns: bool
ut_10p()
10-part uptrend condition
Returns: bool
ut_11p()
11-part uptrend condition
Returns: bool
ut_12p()
12-part uptrend condition
Returns: bool
ut_13p()
13-part uptrend condition
Returns: bool
ut_14p()
14-part uptrend condition
Returns: bool
ut_15p()
15-part uptrend condition
Returns: bool
ut_16p()
16-part uptrend condition
Returns: bool
ut_17p()
17-part uptrend condition
Returns: bool
ut_18p()
18-part uptrend condition
Returns: bool
ut_19p()
19-part uptrend condition
Returns: bool
ut_20p()
20-part uptrend condition
Returns: bool
ut_21p()
21-part uptrend condition
Returns: bool
ut_22p()
22-part uptrend condition
Returns: bool
ut_23p()
23-part uptrend condition
Returns: bool
ut_24p()
24-part uptrend condition
Returns: bool
ut_25p()
25-part uptrend condition
Returns: bool
ut_26p()
26-part uptrend condition
Returns: bool
ut_27p()
27-part uptrend condition
Returns: bool
ut_28p()
28-part uptrend condition
Returns: bool
ut_29p()
29-part uptrend condition
Returns: bool
ut_30p()
30-part uptrend condition
Returns: bool
rldt_1p()
1-part return line downtrend condition
Returns: bool
rldt_2p()
2-part return line downtrend condition
Returns: bool
rldt_3p()
3-part return line downtrend condition
Returns: bool
rldt_4p()
4-part return line downtrend condition
Returns: bool
rldt_5p()
5-part return line downtrend condition
Returns: bool
rldt_6p()
6-part return line downtrend condition
Returns: bool
rldt_7p()
7-part return line downtrend condition
Returns: bool
rldt_8p()
8-part return line downtrend condition
Returns: bool
rldt_9p()
9-part return line downtrend condition
Returns: bool
rldt_10p()
10-part return line downtrend condition
Returns: bool
rldt_11p()
11-part return line downtrend condition
Returns: bool
rldt_12p()
12-part return line downtrend condition
Returns: bool
rldt_13p()
13-part return line downtrend condition
Returns: bool
rldt_14p()
14-part return line downtrend condition
Returns: bool
rldt_15p()
15-part return line downtrend condition
Returns: bool
rldt_16p()
16-part return line downtrend condition
Returns: bool
rldt_17p()
17-part return line downtrend condition
Returns: bool
rldt_18p()
18-part return line downtrend condition
Returns: bool
rldt_19p()
19-part return line downtrend condition
Returns: bool
rldt_20p()
20-part return line downtrend condition
Returns: bool
rldt_21p()
21-part return line downtrend condition
Returns: bool
rldt_22p()
22-part return line downtrend condition
Returns: bool
rldt_23p()
23-part return line downtrend condition
Returns: bool
rldt_24p()
24-part return line downtrend condition
Returns: bool
rldt_25p()
25-part return line downtrend condition
Returns: bool
rldt_26p()
26-part return line downtrend condition
Returns: bool
rldt_27p()
27-part return line downtrend condition
Returns: bool
rldt_28p()
28-part return line downtrend condition
Returns: bool
rldt_29p()
29-part return line downtrend condition
Returns: bool
rldt_30p()
30-part return line downtrend condition
Returns: bool
dut()
double uptrend condition
Returns: bool
ddt()
double downtrend condition
Returns: bool
dut_1p()
1-part double uptrend condition
Returns: bool
dut_2p()
2-part double uptrend condition
Returns: bool
dut_3p()
3-part double uptrend condition
Returns: bool
dut_4p()
4-part double uptrend condition
Returns: bool
dut_5p()
5-part double uptrend condition
Returns: bool
dut_6p()
6-part double uptrend condition
Returns: bool
dut_7p()
7-part double uptrend condition
Returns: bool
dut_8p()
8-part double uptrend condition
Returns: bool
dut_9p()
9-part double uptrend condition
Returns: bool
dut_10p()
10-part double uptrend condition
Returns: bool
dut_11p()
11-part double uptrend condition
Returns: bool
dut_12p()
12-part double uptrend condition
Returns: bool
dut_13p()
13-part double uptrend condition
Returns: bool
dut_14p()
14-part double uptrend condition
Returns: bool
dut_15p()
15-part double uptrend condition
Returns: bool
dut_16p()
16-part double uptrend condition
Returns: bool
dut_17p()
17-part double uptrend condition
Returns: bool
dut_18p()
18-part double uptrend condition
Returns: bool
dut_19p()
19-part double uptrend condition
Returns: bool
dut_20p()
20-part double uptrend condition
Returns: bool
dut_21p()
21-part double uptrend condition
Returns: bool
dut_22p()
22-part double uptrend condition
Returns: bool
dut_23p()
23-part double uptrend condition
Returns: bool
dut_24p()
24-part double uptrend condition
Returns: bool
dut_25p()
25-part double uptrend condition
Returns: bool
dut_26p()
26-part double uptrend condition
Returns: bool
dut_27p()
27-part double uptrend condition
Returns: bool
dut_28p()
28-part double uptrend condition
Returns: bool
dut_29p()
29-part double uptrend condition
Returns: bool
dut_30p()
30-part double uptrend condition
Returns: bool
ddt_1p()
1-part double downtrend condition
Returns: bool
ddt_2p()
2-part double downtrend condition
Returns: bool
ddt_3p()
3-part double downtrend condition
Returns: bool
ddt_4p()
4-part double downtrend condition
Returns: bool
ddt_5p()
5-part double downtrend condition
Returns: bool
ddt_6p()
6-part double downtrend condition
Returns: bool
ddt_7p()
7-part double downtrend condition
Returns: bool
ddt_8p()
8-part double downtrend condition
Returns: bool
ddt_9p()
9-part double downtrend condition
Returns: bool
ddt_10p()
10-part double downtrend condition
Returns: bool
ddt_11p()
11-part double downtrend condition
Returns: bool
ddt_12p()
12-part double downtrend condition
Returns: bool
ddt_13p()
13-part double downtrend condition
Returns: bool
ddt_14p()
14-part double downtrend condition
Returns: bool
ddt_15p()
15-part double downtrend condition
Returns: bool
ddt_16p()
16-part double downtrend condition
Returns: bool
ddt_17p()
17-part double downtrend condition
Returns: bool
ddt_18p()
18-part double downtrend condition
Returns: bool
ddt_19p()
19-part double downtrend condition
Returns: bool
ddt_20p()
20-part double downtrend condition
Returns: bool
ddt_21p()
21-part double downtrend condition
Returns: bool
ddt_22p()
22-part double downtrend condition
Returns: bool
ddt_23p()
23-part double downtrend condition
Returns: bool
ddt_24p()
24-part double downtrend condition
Returns: bool
ddt_25p()
25-part double downtrend condition
Returns: bool
ddt_26p()
26-part double downtrend condition
Returns: bool
ddt_27p()
27-part double downtrend condition
Returns: bool
ddt_28p()
28-part double downtrend condition
Returns: bool
ddt_29p()
29-part double downtrend condition
Returns: bool
ddt_30p()
30-part double downtrend condition
Returns: bool
PubLibSwingLibrary "PubLibSwing"
swing high and swing low conditions, prices, bar indices and range ratios for indicator and strategy development
sh()
swing high condition
Returns: bool
sl()
swing low condition
Returns: bool
shbi(occ)
swing high bar index, condition occurrence n
Parameters:
occ (simple int)
Returns: int
slbi(occ)
swing low bar index, condition occurrence n
Parameters:
occ (simple int)
Returns: int
shcp(occ)
swing high close price, condition occurrence n
Parameters:
occ (simple int)
Returns: float
slcp(occ)
swing low close price, condition occurrence n
Parameters:
occ (simple int)
Returns: float
shp(occ)
swing high price, condition occurrence n
Parameters:
occ (simple int)
Returns: float
slp(occ)
swing low price, condition occurrence n
Parameters:
occ (simple int)
Returns: float
shpbi(occ)
swing high price bar index, condition occurrence n
Parameters:
occ (simple int)
Returns: int
slpbi(occ)
swing low price bar index, condition occurrence n
Parameters:
occ (simple int)
Returns: int
shrr(occ)
swing high range ratio, condition occurrence n
Parameters:
occ (simple int)
Returns: float
slrr(occ)
swing low range ratio, condition occurrence n
Parameters:
occ (simple int)
Returns: float
PubLibCandleTrendLibrary "PubLibCandleTrend"
candle trend, multi-part candle trend, multi-part green/red candle trend, double candle trend and multi-part double candle trend conditions for indicator and strategy development
chh()
candle higher high condition
Returns: bool
chl()
candle higher low condition
Returns: bool
clh()
candle lower high condition
Returns: bool
cll()
candle lower low condition
Returns: bool
cdt()
candle double top condition
Returns: bool
cdb()
candle double bottom condition
Returns: bool
gc()
green candle condition
Returns: bool
gchh()
green candle higher high condition
Returns: bool
gchl()
green candle higher low condition
Returns: bool
gclh()
green candle lower high condition
Returns: bool
gcll()
green candle lower low condition
Returns: bool
gcdt()
green candle double top condition
Returns: bool
gcdb()
green candle double bottom condition
Returns: bool
rc()
red candle condition
Returns: bool
rchh()
red candle higher high condition
Returns: bool
rchl()
red candle higher low condition
Returns: bool
rclh()
red candle lower high condition
Returns: bool
rcll()
red candle lower low condition
Returns: bool
rcdt()
red candle double top condition
Returns: bool
rcdb()
red candle double bottom condition
Returns: bool
chh_1p()
1-part candle higher high condition
Returns: bool
chh_2p()
2-part candle higher high condition
Returns: bool
chh_3p()
3-part candle higher high condition
Returns: bool
chh_4p()
4-part candle higher high condition
Returns: bool
chh_5p()
5-part candle higher high condition
Returns: bool
chh_6p()
6-part candle higher high condition
Returns: bool
chh_7p()
7-part candle higher high condition
Returns: bool
chh_8p()
8-part candle higher high condition
Returns: bool
chh_9p()
9-part candle higher high condition
Returns: bool
chh_10p()
10-part candle higher high condition
Returns: bool
chh_11p()
11-part candle higher high condition
Returns: bool
chh_12p()
12-part candle higher high condition
Returns: bool
chh_13p()
13-part candle higher high condition
Returns: bool
chh_14p()
14-part candle higher high condition
Returns: bool
chh_15p()
15-part candle higher high condition
Returns: bool
chh_16p()
16-part candle higher high condition
Returns: bool
chh_17p()
17-part candle higher high condition
Returns: bool
chh_18p()
18-part candle higher high condition
Returns: bool
chh_19p()
19-part candle higher high condition
Returns: bool
chh_20p()
20-part candle higher high condition
Returns: bool
chh_21p()
21-part candle higher high condition
Returns: bool
chh_22p()
22-part candle higher high condition
Returns: bool
chh_23p()
23-part candle higher high condition
Returns: bool
chh_24p()
24-part candle higher high condition
Returns: bool
chh_25p()
25-part candle higher high condition
Returns: bool
chh_26p()
26-part candle higher high condition
Returns: bool
chh_27p()
27-part candle higher high condition
Returns: bool
chh_28p()
28-part candle higher high condition
Returns: bool
chh_29p()
29-part candle higher high condition
Returns: bool
chh_30p()
30-part candle higher high condition
Returns: bool
chl_1p()
1-part candle higher low condition
Returns: bool
chl_2p()
2-part candle higher low condition
Returns: bool
chl_3p()
3-part candle higher low condition
Returns: bool
chl_4p()
4-part candle higher low condition
Returns: bool
chl_5p()
5-part candle higher low condition
Returns: bool
chl_6p()
6-part candle higher low condition
Returns: bool
chl_7p()
7-part candle higher low condition
Returns: bool
chl_8p()
8-part candle higher low condition
Returns: bool
chl_9p()
9-part candle higher low condition
Returns: bool
chl_10p()
10-part candle higher low condition
Returns: bool
chl_11p()
11-part candle higher low condition
Returns: bool
chl_12p()
12-part candle higher low condition
Returns: bool
chl_13p()
13-part candle higher low condition
Returns: bool
chl_14p()
14-part candle higher low condition
Returns: bool
chl_15p()
15-part candle higher low condition
Returns: bool
chl_16p()
16-part candle higher low condition
Returns: bool
chl_17p()
17-part candle higher low condition
Returns: bool
chl_18p()
18-part candle higher low condition
Returns: bool
chl_19p()
19-part candle higher low condition
Returns: bool
chl_20p()
20-part candle higher low condition
Returns: bool
chl_21p()
21-part candle higher low condition
Returns: bool
chl_22p()
22-part candle higher low condition
Returns: bool
chl_23p()
23-part candle higher low condition
Returns: bool
chl_24p()
24-part candle higher low condition
Returns: bool
chl_25p()
25-part candle higher low condition
Returns: bool
chl_26p()
26-part candle higher low condition
Returns: bool
chl_27p()
27-part candle higher low condition
Returns: bool
chl_28p()
28-part candle higher low condition
Returns: bool
chl_29p()
29-part candle higher low condition
Returns: bool
chl_30p()
30-part candle higher low condition
Returns: bool
clh_1p()
1-part candle lower high condition
Returns: bool
clh_2p()
2-part candle lower high condition
Returns: bool
clh_3p()
3-part candle lower high condition
Returns: bool
clh_4p()
4-part candle lower high condition
Returns: bool
clh_5p()
5-part candle lower high condition
Returns: bool
clh_6p()
6-part candle lower high condition
Returns: bool
clh_7p()
7-part candle lower high condition
Returns: bool
clh_8p()
8-part candle lower high condition
Returns: bool
clh_9p()
9-part candle lower high condition
Returns: bool
clh_10p()
10-part candle lower high condition
Returns: bool
clh_11p()
11-part candle lower high condition
Returns: bool
clh_12p()
12-part candle lower high condition
Returns: bool
clh_13p()
13-part candle lower high condition
Returns: bool
clh_14p()
14-part candle lower high condition
Returns: bool
clh_15p()
15-part candle lower high condition
Returns: bool
clh_16p()
16-part candle lower high condition
Returns: bool
clh_17p()
17-part candle lower high condition
Returns: bool
clh_18p()
18-part candle lower high condition
Returns: bool
clh_19p()
19-part candle lower high condition
Returns: bool
clh_20p()
20-part candle lower high condition
Returns: bool
clh_21p()
21-part candle lower high condition
Returns: bool
clh_22p()
22-part candle lower high condition
Returns: bool
clh_23p()
23-part candle lower high condition
Returns: bool
clh_24p()
24-part candle lower high condition
Returns: bool
clh_25p()
25-part candle lower high condition
Returns: bool
clh_26p()
26-part candle lower high condition
Returns: bool
clh_27p()
27-part candle lower high condition
Returns: bool
clh_28p()
28-part candle lower high condition
Returns: bool
clh_29p()
29-part candle lower high condition
Returns: bool
clh_30p()
30-part candle lower high condition
Returns: bool
cll_1p()
1-part candle lower low condition
Returns: bool
cll_2p()
2-part candle lower low condition
Returns: bool
cll_3p()
3-part candle lower low condition
Returns: bool
cll_4p()
4-part candle lower low condition
Returns: bool
cll_5p()
5-part candle lower low condition
Returns: bool
cll_6p()
6-part candle lower low condition
Returns: bool
cll_7p()
7-part candle lower low condition
Returns: bool
cll_8p()
8-part candle lower low condition
Returns: bool
cll_9p()
9-part candle lower low condition
Returns: bool
cll_10p()
10-part candle lower low condition
Returns: bool
cll_11p()
11-part candle lower low condition
Returns: bool
cll_12p()
12-part candle lower low condition
Returns: bool
cll_13p()
13-part candle lower low condition
Returns: bool
cll_14p()
14-part candle lower low condition
Returns: bool
cll_15p()
15-part candle lower low condition
Returns: bool
cll_16p()
16-part candle lower low condition
Returns: bool
cll_17p()
17-part candle lower low condition
Returns: bool
cll_18p()
18-part candle lower low condition
Returns: bool
cll_19p()
19-part candle lower low condition
Returns: bool
cll_20p()
20-part candle lower low condition
Returns: bool
cll_21p()
21-part candle lower low condition
Returns: bool
cll_22p()
22-part candle lower low condition
Returns: bool
cll_23p()
23-part candle lower low condition
Returns: bool
cll_24p()
24-part candle lower low condition
Returns: bool
cll_25p()
25-part candle lower low condition
Returns: bool
cll_26p()
26-part candle lower low condition
Returns: bool
cll_27p()
27-part candle lower low condition
Returns: bool
cll_28p()
28-part candle lower low condition
Returns: bool
cll_29p()
29-part candle lower low condition
Returns: bool
cll_30p()
30-part candle lower low condition
Returns: bool
gc_1p()
1-part green candle condition
Returns: bool
gc_2p()
2-part green candle condition
Returns: bool
gc_3p()
3-part green candle condition
Returns: bool
gc_4p()
4-part green candle condition
Returns: bool
gc_5p()
5-part green candle condition
Returns: bool
gc_6p()
6-part green candle condition
Returns: bool
gc_7p()
7-part green candle condition
Returns: bool
gc_8p()
8-part green candle condition
Returns: bool
gc_9p()
9-part green candle condition
Returns: bool
gc_10p()
10-part green candle condition
Returns: bool
gc_11p()
11-part green candle condition
Returns: bool
gc_12p()
12-part green candle condition
Returns: bool
gc_13p()
13-part green candle condition
Returns: bool
gc_14p()
14-part green candle condition
Returns: bool
gc_15p()
15-part green candle condition
Returns: bool
gc_16p()
16-part green candle condition
Returns: bool
gc_17p()
17-part green candle condition
Returns: bool
gc_18p()
18-part green candle condition
Returns: bool
gc_19p()
19-part green candle condition
Returns: bool
gc_20p()
20-part green candle condition
Returns: bool
gc_21p()
21-part green candle condition
Returns: bool
gc_22p()
22-part green candle condition
Returns: bool
gc_23p()
23-part green candle condition
Returns: bool
gc_24p()
24-part green candle condition
Returns: bool
gc_25p()
25-part green candle condition
Returns: bool
gc_26p()
26-part green candle condition
Returns: bool
gc_27p()
27-part green candle condition
Returns: bool
gc_28p()
28-part green candle condition
Returns: bool
gc_29p()
29-part green candle condition
Returns: bool
gc_30p()
30-part green candle condition
Returns: bool
rc_1p()
1-part red candle condition
Returns: bool
rc_2p()
2-part red candle condition
Returns: bool
rc_3p()
3-part red candle condition
Returns: bool
rc_4p()
4-part red candle condition
Returns: bool
rc_5p()
5-part red candle condition
Returns: bool
rc_6p()
6-part red candle condition
Returns: bool
rc_7p()
7-part red candle condition
Returns: bool
rc_8p()
8-part red candle condition
Returns: bool
rc_9p()
9-part red candle condition
Returns: bool
rc_10p()
10-part red candle condition
Returns: bool
rc_11p()
11-part red candle condition
Returns: bool
rc_12p()
12-part red candle condition
Returns: bool
rc_13p()
13-part red candle condition
Returns: bool
rc_14p()
14-part red candle condition
Returns: bool
rc_15p()
15-part red candle condition
Returns: bool
rc_16p()
16-part red candle condition
Returns: bool
rc_17p()
17-part red candle condition
Returns: bool
rc_18p()
18-part red candle condition
Returns: bool
rc_19p()
19-part red candle condition
Returns: bool
rc_20p()
20-part red candle condition
Returns: bool
rc_21p()
21-part red candle condition
Returns: bool
rc_22p()
22-part red candle condition
Returns: bool
rc_23p()
23-part red candle condition
Returns: bool
rc_24p()
24-part red candle condition
Returns: bool
rc_25p()
25-part red candle condition
Returns: bool
rc_26p()
26-part red candle condition
Returns: bool
rc_27p()
27-part red candle condition
Returns: bool
rc_28p()
28-part red candle condition
Returns: bool
rc_29p()
29-part red candle condition
Returns: bool
rc_30p()
30-part red candle condition
Returns: bool
cdut()
candle double uptrend condition
Returns: bool
cddt()
candle double downtrend condition
Returns: bool
cdut_1p()
1-part candle double uptrend condition
Returns: bool
cdut_2p()
2-part candle double uptrend condition
Returns: bool
cdut_3p()
3-part candle double uptrend condition
Returns: bool
cdut_4p()
4-part candle double uptrend condition
Returns: bool
cdut_5p()
5-part candle double uptrend condition
Returns: bool
cdut_6p()
6-part candle double uptrend condition
Returns: bool
cdut_7p()
7-part candle double uptrend condition
Returns: bool
cdut_8p()
8-part candle double uptrend condition
Returns: bool
cdut_9p()
9-part candle double uptrend condition
Returns: bool
cdut_10p()
10-part candle double uptrend condition
Returns: bool
cdut_11p()
11-part candle double uptrend condition
Returns: bool
cdut_12p()
12-part candle double uptrend condition
Returns: bool
cdut_13p()
13-part candle double uptrend condition
Returns: bool
cdut_14p()
14-part candle double uptrend condition
Returns: bool
cdut_15p()
15-part candle double uptrend condition
Returns: bool
cdut_16p()
16-part candle double uptrend condition
Returns: bool
cdut_17p()
17-part candle double uptrend condition
Returns: bool
cdut_18p()
18-part candle double uptrend condition
Returns: bool
cdut_19p()
19-part candle double uptrend condition
Returns: bool
cdut_20p()
20-part candle double uptrend condition
Returns: bool
cdut_21p()
21-part candle double uptrend condition
Returns: bool
cdut_22p()
22-part candle double uptrend condition
Returns: bool
cdut_23p()
23-part candle double uptrend condition
Returns: bool
cdut_24p()
24-part candle double uptrend condition
Returns: bool
cdut_25p()
25-part candle double uptrend condition
Returns: bool
cdut_26p()
26-part candle double uptrend condition
Returns: bool
cdut_27p()
27-part candle double uptrend condition
Returns: bool
cdut_28p()
28-part candle double uptrend condition
Returns: bool
cdut_29p()
29-part candle double uptrend condition
Returns: bool
cdut_30p()
30-part candle double uptrend condition
Returns: bool
cddt_1p()
1-part candle double downtrend condition
Returns: bool
cddt_2p()
2-part candle double downtrend condition
Returns: bool
cddt_3p()
3-part candle double downtrend condition
Returns: bool
cddt_4p()
4-part candle double downtrend condition
Returns: bool
cddt_5p()
5-part candle double downtrend condition
Returns: bool
cddt_6p()
6-part candle double downtrend condition
Returns: bool
cddt_7p()
7-part candle double downtrend condition
Returns: bool
cddt_8p()
8-part candle double downtrend condition
Returns: bool
cddt_9p()
9-part candle double downtrend condition
Returns: bool
cddt_10p()
10-part candle double downtrend condition
Returns: bool
cddt_11p()
11-part candle double downtrend condition
Returns: bool
cddt_12p()
12-part candle double downtrend condition
Returns: bool
cddt_13p()
13-part candle double downtrend condition
Returns: bool
cddt_14p()
14-part candle double downtrend condition
Returns: bool
cddt_15p()
15-part candle double downtrend condition
Returns: bool
cddt_16p()
16-part candle double downtrend condition
Returns: bool
cddt_17p()
17-part candle double downtrend condition
Returns: bool
cddt_18p()
18-part candle double downtrend condition
Returns: bool
cddt_19p()
19-part candle double downtrend condition
Returns: bool
cddt_20p()
20-part candle double downtrend condition
Returns: bool
cddt_21p()
21-part candle double downtrend condition
Returns: bool
cddt_22p()
22-part candle double downtrend condition
Returns: bool
cddt_23p()
23-part candle double downtrend condition
Returns: bool
cddt_24p()
24-part candle double downtrend condition
Returns: bool
cddt_25p()
25-part candle double downtrend condition
Returns: bool
cddt_26p()
26-part candle double downtrend condition
Returns: bool
cddt_27p()
27-part candle double downtrend condition
Returns: bool
cddt_28p()
28-part candle double downtrend condition
Returns: bool
cddt_29p()
29-part candle double downtrend condition
Returns: bool
cddt_30p()
30-part candle double downtrend condition
Returns: bool
1000SATS and ORDI Market Cap RatioSure! Here is a detailed description and usage guide for your TradingView indicator:
### Indicator Description
**Title**: 1000SATS/ORDI Market Cap Ratio
**Description**: The "1000SATS/ORDI Market Cap Ratio" indicator calculates and visualizes the market capitalization ratio between 1000SATS and ORDI. This indicator allows traders and investors to analyze the relative market strength and valuation trends of 1000SATS compared to ORDI over time. By tracking this ratio, users can gain insights into market dynamics and potential trading opportunities between these two assets.
### Indicator Usage
**Purpose**:
- To compare the market capitalizations of 1000SATS and ORDI.
- To identify potential undervaluation or overvaluation of 1000SATS relative to ORDI.
- To assist in making informed trading and investment decisions based on market cap trends.
**How to Use**:
1. **Add the Indicator to Your Chart**:
- Open TradingView and navigate to your chart.
- Click on the "Indicators" button at the top of the chart.
- Select "Pine Editor" and paste the provided script.
- Click "Add to Chart" to apply the indicator.
2. **Interpret the Ratio**:
- The indicator will plot a line representing the ratio of the market capitalization of 1000SATS to ORDI.
- A rising ratio indicates that the market cap of 1000SATS is increasing relative to ORDI, suggesting stronger market performance or higher valuation of 1000SATS.
- A falling ratio indicates that the market cap of 1000SATS is decreasing relative to ORDI, suggesting weaker market performance or lower valuation of 1000SATS.
3. **Analyze Trends**:
- Use the indicator to spot trends and potential reversal points in the market cap ratio.
- Combine the ratio analysis with other technical indicators and chart patterns to enhance your trading strategy.
4. **Set Alerts**:
- Set custom alerts on the ratio to notify you of significant changes or specific thresholds being reached, enabling timely decision-making.
**Example**:
- If the ratio is consistently rising, it may indicate a good opportunity to consider 1000SATS as a stronger investment relative to ORDI.
- Conversely, if the ratio is falling, it may be a signal to reevaluate the strength of 1000SATS compared to ORDI.
**Note**: Always conduct thorough analysis and consider other market factors before making trading decisions based on this indicator.
### Script
```pinescript
//@version=4
study("1000SATS and ORDI Market Cap Ratio", shorttitle="1000SATS/ORDI Ratio", overlay=true)
// Define the circulating supply for ORDI and 1000SATS
ORDI_supply = 21000000 // Circulating supply of ORDI
SATS_1000_supply = 2100000000000 // Circulating supply of 1000SATS
// Fetch the price data for ORDI
ordi_price = security("BINANCE:ORDIUSDT", timeframe.period, close)
// Fetch the price data for 1000SATS
sats_1000_price = security("BINANCE:1000SATSUSDT", timeframe.period, close)
// Calculate the market capitalizations
ordi_market_cap = ordi_price * ORDI_supply
sats_1000_market_cap = sats_1000_price * SATS_1000_supply
// Calculate the market cap ratio
ratio = sats_1000_market_cap / ordi_market_cap
// Plot the ratio
plot(ratio, title="1000SATS/ORDI Market Cap Ratio", color=color.blue, linewidth=2)
```
This description and usage guide should help users understand the purpose and functionality of your indicator, as well as how to effectively apply it in their trading activities on TradingView.
Ethereum ETF Tracker (EET)Get all the information you need about all the different Ethereum ETF.
With the Ethereum ETF Tracker, you can observe all possible Ethereum ETF data:
ETF name.
Ticker.
Price.
Volume.
Share of total ETF volume.
Fees.
Exchange.
Custodian.
At the bottom of the table, you'll find the ETHE Premium (and ETH per Share), and day's total volume.
In addition, you can see the volume for the different Exchanges, as well as for the different Custodians.
If you don't want to display these lines to save space, you can uncheck "Show Additional Data" in the indicator settings.
The Idea
The goal is to provide the community with a tool for tracking all Ethereum ETF data in a synthesized way, directly in your TradingView chart.
How to Use
Simply read the information in the table. You can hover above the Fees and Exchanges cells for more details.
The table takes space on the chart, you can remove the extra lines by unchecking "Show Additional Data" in the indicator settings or reduce text size by changing the "Table Text Size" parameter.
Aggregate volume can be displayed directly on the graph (this volume can be displayed on any asset, such as Ethereum itself). The display can be disabled in the settings.
Coinbase vs Binance Spot Premium for All coins🔶 Coinbase Premium
This indicator allows you to track the premiums for various coins listed on Coinbase relative to Binance. The buying strength of US markets tend to be a good indicator for up trending markets.
The moving average crosses shown as ribbons can be used to time entries and exits
🔶 Available Pairs
Currently, the indicator includes 31 coins as listed below:
BTC, ETH, SOL, BONK, DOGE, XRP, SHIB, ONDO, AVAX, LINK, ENS, LTC, RNDR, INJ, BCH, ARB, OP, ADA, DOT, TIA, ICP, MATIC, LDO, NEAR, CVX, AERO, ORCA, SEI, STX, MKR, SUI
🔶 Key Features
Select Coin: You can select any of the 31 supported coins to track its premium.
Show Ribbons: Option to enable or disable the display of ribbon trend lines between two moving averages.
Adjust MA Lengths: Customizable lengths for the short and long moving averages to fine-tune the trend analysis.
🔶 Calculations
The premium is a simple nominal difference between the Coinbase price and the Binance price.
eg) Coinbase ETHUSD - Binance ETHUSDT = Premium
🔶 Disclaimer
This indicator is for informational purposes only and should not be considered financial advice.
Always conduct your own research and due diligence before making any trading decisions. Past performance is not necessarily indicative of future results.
[SGM Markov Chain]Introduction
A Markov chain is a mathematical model that describes a system evolving over time among a finite number of states. This model is based on the assumption that the future state of the system depends only on the current state and not on previous states, the so-called Markov property. In the context of financial markets, Markov chains can be used to model transitions between different market conditions, for example, the probability of a price going up after going up, or going down after going down.
Script Description
This script uses a Markov chain to calculate closing price transition probabilities across the entire accessible chart. It displays the probabilities of the following transitions:
- Up after Up (HH): Probability that the price rises after going up.
- Down after Down (BB): Probability that the price will go down after going down.
- Up after Down (HB): Probability that the price goes up after going down.
- Down after Up (BH): Probability that the price will go down after going up.
Features
- Color customization: Choose colors for each transition type.
- Table Position: Select the position of the probability display table (top/left, top/right, bottom/left, bottom/right).
Position Size CalculatorThe Position Size Calculator (PSC) is a comprehensive tool designed to assist traders in managing their trades risk by accurately calculating the optimal position size based on account settings, trade levels, and risk management parameters. This indicator helps traders make informed decisions by providing critical information about potential profit and loss , risk-reward ratio (RRR) , and position size (PS) .
█ Key Features
• Customizable Account Settings: Define your account size , currency , risk tolerance , and commission structure to personalize the calculations.
• Real-Time Trade Levels: Easily input your entry , stop loss , and take profit prices directly on the chart for immediate calculations.
• Visual Indicators: Clearly see your entry, stop loss, and take profit levels with customizable colors and labels.
• Comprehensive Position Information: View detailed information about your position, including potential profit and loss , risk-reward ratio , and position size .
• Currency Conversion: Automatically convert prices to your account currency, making it easy to manage trades in different markets.
• Hide Metrics : Choose which metrics to display to avoid emotional influence on your trading decisions (e.g., hiding PnL).
█ Conclusion
The Position Size Calculator is an essential tool for traders looking to optimize their trading strategies and manage risk effectively . By providing detailed calculations and visual indicators, this tool helps you make informed decisions, improving your overall trading performance.
█ Important
• Ensure that your stop loss and take profit levels are correctly set relative to your entry price to avoid errors.
• The default commission setting considers both entry and exit commissions. Adjust accordingly if only one commission is applicable.
Consider using this tool to manage every trade risk correctly and prevent significant drawdowns.
Hope you like it. Happy trading!
[SGM Return Distribution]Code Description
This Pine Script™ is designed to analyze the distribution of historical returns of a financial asset and project future confidence levels. It uses statistical techniques to estimate the probability of winning and losing as well as displaying confidence bands and distribution statistics.
User Entries
Length (252): The number of days used to calculate statistics.
Offset (20): Offset used to project future values.
Projection Days (10): Number of days projected into the future.
Smoothing Confidence Levels (10): Smoothing confidence bands.
Display Settings
Plot Distribution: Shows the distribution of returns.
Show Probabilities: Shows winning and losing probabilities.
Show Distribution Stats: Shows distribution statistics.
Show Confidence Bands: Shows confidence bands.
Show Confidence Lines: Shows confidence lines.
Calculations and Features
Distribution of Yields:
Calculates logarithmic returns and their statistics (average, volatility, skewness, kurtosis).
Projects the average and volatility over the projected number of days.
Displays the distribution of returns as a histogram.
Confidence Interval:
Uses the inv_norm function to calculate Z scores for different confidence levels.
Calculates the upper and lower bounds of the confidence bands.
Probability Display:
Calculates and displays win and loss probabilities based on the distribution of returns.
Statistics Display:
Shows key statistics such as mean, volatility, skewness and kurtosis.
Trust Bands and Lines:
Shows confidence bands and lines based on calculated confidence levels.
Mathematical Assumptions Used
Logarithmic Returns: Returns are calculated using the logarithm of prices, which is common for financial time series because it makes returns independent of price level.
Normal Distribution for Confidence Bands: Confidence interval calculations are based on the assumption that returns follow a normal distribution.
Average and Volatility Projection: Average returns and volatility are projected over a future period assuming they remain constant.
Skewness and Kurtosis: Although these measures are calculated for understanding the distribution of returns, they are not used in box projections but can provide additional information about the distribution of historical returns.
Use in Trading
Risk Estimation: Confidence bands can help estimate likely future price levels, which is crucial for determining strike levels and risk management.
Risk Management: Use confidence bands to set stop-loss and take-profit levels.
Probability Analysis: Win and loss probabilities can help assess a position's likelihood of success.
Potential Problems
Assumption of Normality for Confidence Bands: Financial returns do not always follow a normal distribution, especially in the presence of extreme events (fat tails).
Stationarity: Assuming that return statistics (average, volatility) remain constant over time can be erroneous in volatile market periods.
Limited Historical Data: Using a limited history (252 days) may not capture all possible behaviors of the asset.
Input Parameters: Results can be sensitive to the input parameters chosen (length, offset, etc.).
Harmonic Patterns Library [TradingFinder]🔵 Introduction
Harmonic patterns blend geometric shapes with Fibonacci numbers, making these numbers fundamental to understanding the patterns.
One person who has done a lot of research on harmonic patterns is Scott Carney.Scott Carney's research on harmonic patterns in technical analysis focuses on precise price structures based on Fibonacci ratios to identify market reversals.
Key patterns include the Gartley, Bat, Butterfly, and Crab, each with specific alignment criteria. These patterns help traders anticipate potential market turning points and make informed trading decisions, enhancing the predictability of technical analysis.
🟣 Understanding 5-Point Harmonic Patterns
In the current library version, you can easily draw and customize most XABCD patterns. These patterns often form M or W shapes, or a combination of both. By calculating the Fibonacci ratios between key points, you can estimate potential price movements.
All five-point patterns share a similar structure, differing only in line lengths and Fibonacci ratios. Learning one pattern simplifies understanding others.
🟣 Exploring the Gartley Pattern
The Gartley pattern appears in both bullish (M shape) and bearish (W shape) forms. In the bullish Gartley, point X is below point D, and point A surpasses point C. Point D marks the start of a strong upward trend, making it an optimal point to place a buy order.
The bearish Gartley mirrors the bullish pattern with inverted Fibonacci ratios. In this scenario, point D indicates the start of a significant price drop. Traders can place sell orders at this point and buy at lower prices for profit in two-way markets.
🟣 Analyzing the Butterfly Pattern
The Butterfly pattern also manifests in bullish (M shape) and bearish (W shape) forms. It resembles the Gartley pattern but with point D lower than point X in the bullish version.
The Butterfly pattern involves deeper price corrections than the Gartley, leading to more significant price fluctuations. Point D in the bullish Butterfly indicates the beginning of a sharp price rise, making it an entry point for buy orders.
The bearish Butterfly has inverted Fibonacci ratios, with point D marking the start of a sharp price decline, ideal for sell orders followed by buying at lower prices in two-way markets.
🟣 Insights into the Bat Pattern
The Bat pattern, appearing in bullish (M shape) and bearish (W shape) forms, is one of the most precise harmonic patterns. It closely resembles the Butterfly and Gartley patterns, differing mainly in Fibonacci levels.
The bearish Bat pattern shares the Fibonacci ratios with the bullish Bat, with an inverted structure. Point D in the bearish Bat marks the start of a significant price drop, suitable for sell orders followed by buying at lower prices for profit.
🟣 The Crab Pattern Explained
The Crab pattern, found in both bullish (M shape) and bearish (W shape) forms, is highly favored by analysts. Discovered in 2000, the Crab pattern features a larger final wave correction compared to other harmonic patterns.
The bearish Crab shares Fibonacci ratios with the bullish version but in an inverted form. Point D in the bearish Crab signifies the start of a sharp price decline, making it an ideal point for sell orders followed by buying at lower prices for profitable trades.
🟣 Understanding the Shark Pattern
The Shark pattern appears in bullish (M shape) and bearish (W shape) forms. It differs from previous patterns as point C in the bullish Shark surpasses point A, with unique level measurements.
The bearish Shark pattern mirrors the Fibonacci ratios of the bullish Shark but is inverted. Point D in the bearish Shark indicates the start of a sharp price drop, ideal for placing sell orders and buying at lower prices to capitalize on the pattern.
🟣 The Cypher Pattern Overview
The Cypher pattern is another that appears in both bullish (M shape) and bearish (W shape) forms. It resembles the Shark pattern, with point C in the bullish Cypher extending beyond point A, and point D forming within the XA line.
The bearish Cypher shares the Fibonacci ratios with the bullish Cypher but in an inverted structure. Point D in the bearish Cypher marks the start of a significant price drop, perfect for sell orders followed by buying at lower prices.
🟣 Introducing the Nen-Star Pattern
The Nen-Star pattern appears in both bullish (M shape) and bearish (W shape) forms. In the bullish Nen-Star, point C extends beyond point A, and point D, the final point, forms outside the XA line, making CD the longest wave.
The bearish Nen-Star has inverted Fibonacci ratios, with point D indicating the start of a significant price drop. Traders can place sell orders at point D and buy at lower prices to profit from this pattern in two-way markets.
The 5-point harmonic patterns, commonly referred to as XABCD patterns, are specific geometric price structures identified in financial markets. These patterns are used by traders to predict potential price movements based on historical price data and Fibonacci retracement levels.
Here are the main 5-point harmonic patterns :
Gartley Pattern
Anti-Gartley Pattern
Bat Pattern
Anti-Bat Pattern
Alternate Bat Pattern
Butterfly Pattern
Anti-Butterfly Pattern
Crab Pattern
Anti-Crab Pattern
Deep Crab Pattern
Shark Pattern
Anti- Shark Pattern
Anti Alternate Shark Pattern
Cypher Pattern
Anti-Cypher Pattern
🔵 How to Use
To add "Order Block Refiner Library", you must first add the following code to your script.
import TFlab/Harmonic_Chart_Pattern_Library_TradingFinder/1 as HP
🟣 Parameters
XABCD(Name, Type, Show, Color, LineWidth, LabelSize, ShVF, FLPC, FLPCPeriod, Pivot, ABXAmin, ABXAmax, BCABmin, BCABmax, CDBCmin, CDBCmax, CDXAmin, CDXAmax) =>
Parameters:
Name (string)
Type (string)
Show (bool)
Color (color)
LineWidth (int)
LabelSize (string)
ShVF (bool)
FLPC (bool)
FLPCPeriod (int)
Pivot (int)
ABXAmin (float)
ABXAmax (float)
BCABmin (float)
BCABmax (float)
CDBCmin (float)
CDBCmax (float)
CDXAmin (float)
CDXAmax (float)
🟣 Genaral Parameters
Name : The name of the pattern.
Type: Enter "Bullish" to draw a Bullish pattern and "Bearish" to draw an Bearish pattern.
Show : Enter "true" to display the template and "false" to not display the template.
Color : Enter the desired color to draw the pattern in this parameter.
LineWidth : You can enter the number 1 or numbers higher than one to adjust the thickness of the drawing lines. This number must be an integer and increases with increasing thickness.
LabelSize : You can adjust the size of the labels by using the "size.auto", "size.tiny", "size.smal", "size.normal", "size.large" or "size.huge" entries.
🟣 Logical Parameters
ShVF : If this parameter is on "true" mode, only patterns will be displayed that they have exact format and no noise can be seen in them. If "false" is, the patterns displayed that maybe are noisy and do not exactly correspond to the original pattern.
FLPC : if Turned on, you can see this ability of patterns when their last pivot is formed. If this feature is off, it will see the patterns as soon as they are formed. The advantage of this option being clear is less formation of fielded patterns, and it is accompanied by the lateest pattern seeing and a sharp reduction in reward to risk.
FLPCPeriod : Using this parameter you can determine that the last pivot is based on Pivot period.
Pivot : You need to determine the period of the zigzag indicator. This factor is the most important parameter in pattern recognition.
ABXAmin : Minimum retracement of "AB" line compared to "XA" line.
ABXAmax : Maximum retracement of "AB" line compared to "XA" line.
BCABmin : Minimum retracement of "BC" line compared to "AB" line.
BCABmax : Maximum retracement of "BC" line compared to "AB" line.
CDBCmin : Minimum retracement of "CD" line compared to "BC" line.
CDBCmax : Maximum retracement of "CD" line compared to "BC" line.
CDXAmin : Minimum retracement of "CD" line compared to "XA" line.
CDXAmax : Maximum retracement of "CD" line compared to "XA" line.
🟣 Function Outputs
This library has two outputs. The first output is related to the alert of the formation of a new pattern. And the second output is related to the formation of the candlestick pattern and you can draw it using the "plotshape" tool.
Candle Confirmation Logic :
Example :
import TFlab/Harmonic_Chart_Pattern_Library_TradingFinder/1 as HP
PP = input.int(3, 'ZigZag Pivot Period')
ShowBull = input.bool(true, 'Show Bullish Pattern')
ShowBear = input.bool(true, 'Show Bearish Pattern')
ColorBull = input.color(#0609bb, 'Color Bullish Pattern')
ColorBear = input.color(#0609bb, 'Color Bearish Pattern')
LineWidth = input.int(1 , 'Width Line')
LabelSize = input.string(size.small , 'Label size' , options = )
ShVF = input.bool(false , 'Show Valid Format')
FLPC = input.bool(false , 'Show Formation Last Pivot Confirm')
FLPCPeriod =input.int(2, 'Period of Formation Last Pivot')
//Call function
= HP.XABCD('Bullish Bat', 'Bullish', ShowBull, ColorBull , LineWidth, LabelSize ,ShVF, FLPC, FLPCPeriod, PP, 0.382, 0.50, 0.382, 0.886, 1.618, 2.618, 0.85, 0.9)
= HP.XABCD('Bearish Bat', 'Bearish', ShowBear, ColorBear , LineWidth, LabelSize ,ShVF, FLPC, FLPCPeriod, PP, 0.382, 0.50, 0.382, 0.886, 1.618, 2.618, 0.85, 0.9)
//Alert
if BearAlert
alert('Bearish Harmonic')
if BullAlert
alert('Bulish Harmonic')
//CandleStick Confirm
plotshape(BearCandleConfirm, style = shape.arrowdown, color = color.red)
plotshape(BullCandleConfirm, style = shape.arrowup, color = color.green, location = location.belowbar )
9:30 Opening Price MarkerIndicator Name: 9:30 Opening Price Marker
Description:
The "9:30 Opening Price Marker" is a custom indicator for TradingView that highlights the opening price at 9:30 AM in the UTC-4 time zone (Eastern Daylight Time) on the chart. It helps traders and analysts easily identify and track the price level at which the market opens each day.
Features:
Timezone Conversion: The indicator converts the current time to the UTC-4 timezone (Eastern Daylight Time) to accurately determine the 9:30 AM opening price.
Visual Marker: It visually marks the opening price with a dotted line on the chart, making it prominent for quick reference.
Label: Additionally, it includes a label next to the opening price line, indicating "9:30 Opening Price", enhancing clarity and usability.
Overlay: The indicator is designed to overlay on the price chart, ensuring it doesn't clutter other technical analysis tools or indicators.
Usage:
Day-to-Day Analysis: Traders can use this indicator to quickly gauge market sentiment at the daily opening, which can influence intraday trading strategies.
Reference Point: Acts as a reference point for identifying price movements and potential trading opportunities relative to the day's opening price.
Time-Specific Insights: Provides insights into price action immediately following the market open, aiding in decision-making based on early trading activity.
Installation: Copy the provided Pine Script code into TradingView's Pine Editor, save the script as an indicator, and apply it to your chart.
Disclaimer : This indicator is intended for informational purposes only and should not be solely relied upon for trading decisions. Always consider multiple sources of information and perform thorough analysis before executing trades.
Curved Smart Money Concepts Probability (Zeiierman)█ Overview
The Curved Smart Money Concepts Probability indicator, developed by Zeiierman, is a sophisticated trading tool designed to leverage the principles of Smart Money trading. This indicator identifies key market structure points and adapts to changing market conditions, providing traders with actionable insights into market trends and potential reversals. The trading tool stands out due to its unique curved structure and advanced probability features, which enhance its effectiveness and usability for traders.
█ How It Works
The indicator operates by analyzing market data to identify pivotal moments where institutional investors might be influencing price movements. It employs a combination of adaptive trend lengths, multipliers for sensitivity adjustments, and pivot periods to accurately capture market structure shifts. The indicator calculates upper and lower bands based on adaptive sizes and identifies zones of overbought (premium) and oversold (discount) conditions.
Key Features of Probability Calculations
The Curved Smart Money Concepts Probability indicator integrates sophisticated probability calculations to enhance trading decision-making:
Win/Loss Tracking: The indicator tracks the number of successful (win) and unsuccessful (loss) trades based on the identified market structure points (ChoCH, SMS, BMS). This provides a historical context of the indicator's performance.
Probability Percentages: For each market structure point (ChoCH, SMS, BMS), the indicator calculates the probability of the next move being successful or not. This is presented as a percentage, giving traders a quantifiable measure of confidence in the signals.
Dynamic Adaptation: The probability calculations adapt to market conditions by considering the frequency and success rate of the signals, allowing traders to adjust their strategies based on the indicator’s historical accuracy.
Visual Representation: Probabilities are displayed on the chart, helping traders quickly assess the likelihood of future price movements based on past performance.
Key benefits of the Curved Structure
The Curved Smart Money Concepts Probability indicator features a unique curved structure that offers several advantages over traditional linear structures:
Noise Reduction: The curved structure smooths out short-term market fluctuations, reducing the noise often seen in linear structures. This helps traders focus on the true trend direction rather than getting distracted by minor price movements.
Adaptive Sensitivity: The curved structure adjusts its sensitivity based on market conditions. This means it can effectively capture both short-term and long-term trends by dynamically adapting to changes in market volatility, something linear structures struggle with.
Enhanced Trend Detection: By providing a more gradual transition between market phases, the curved structure helps in identifying trends more accurately. This is particularly useful in volatile markets where linear structures might give false signals due to their rigid nature.
Improved Market Structure Analysis: The curved structure's ability to adapt and smooth out irregularities provides a clearer picture of the overall market structure. This clarity is essential for identifying premium and discount zones, as well as mid-range support and resistance levels, which are crucial for effective ICT Smart Money Trading.
█ Terminology
ChoCH (Change of Character): Indicates a potential reversal in market direction. It is identified when the price breaks a significant high or low, suggesting a shift from a bullish to bearish trend or vice versa.
SMS (Smart Money Shift): Represents the transition phase in market structure where smart money begins accumulating or distributing assets. It typically follows a BMS and indicates the start of a new trend.
BMS (Bullish/Bearish Market Structure): Confirms the trend direction. Bullish Market Structure (BMS) confirms an uptrend, while Bearish Market Structure (BMS) confirms a downtrend. It is characterized by a series of higher highs and higher lows (bullish) or lower highs and lower lows (bearish).
Premium: A zone where the price is considered overbought. It is calculated as the upper range of the current market structure and indicates a potential area for selling or shorting.
Mid Range: The midpoint between the high and low of the market structure. It often acts as a support or resistance level, helping traders identify potential reversal or continuation points.
Discount: A zone where the price is considered oversold. It is calculated as the lower range of the current market structure and indicates a potential area for buying or going long.
█ How to Use
Identifying Trends and Reversals: Traders can use the indicator to identify the overall market trend and potential reversal points. By observing the ChoCH, SMS, and BMS signals, traders can gauge whether the market is transitioning into a new trend or continuing the current trend.
Example Strategies
⚪ Trend Following Strategy:
Identify the current market trend using BMS signals.
Enter a trade in the direction of the trend when the price retraces to the mid-range zone.
Set a stop-loss just below the mid-range (for long trades) or above the mid-range (for short trades).
Take profit in the premium/discount zone or when a ChoCH signal indicates a potential reversal.
⚪ Reversal Strategy:
Wait for a ChoCH signal to identify a potential market reversal.
Enter a trade in the direction of the new trend as indicated by the SMS signal.
Set a stop-loss just beyond the recent high (for short trades) or low (for long trades).
Take profit when the price reaches the premium or discount zone opposite to the entry.
█ Settings
Curved Trend Length: Determines the length of the trend used to calculate the adaptive size of the structure. Adjusting this length allows traders to capture either longer-term trends (for smoother curves) or short-term trends (for more reactive curves).
Curved Multiplier: Scales the adjustment factors for the upper and lower bands. Increasing the multiplier widens the bands, reducing sensitivity to price changes. Decreasing it narrows the bands, making the structure more responsive.
Pivot Period: Sets the period for capturing trends. A higher period captures broader trends, while a lower period focuses on short-term trends.
Response Period: Adjusts the structure’s responsiveness. A low value focuses on short-term changes, while a high value smoothens the structure.
Premium/Discount Range: Allows toggling between displaying the active range or previous range to analyze real-time or historical levels.
Structure Candles: Enables the display of curved structure candles on the chart, providing a modified view of price action.
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
Moving Average Z-Score Suite [BackQuant]Moving Average Z-Score Suite
1. What is this indicator
The Moving Average Z-Score Suite is a versatile indicator designed to help traders identify and capitalize on market trends by utilizing a variety of moving averages. This indicator transforms selected moving averages into a Z-Score oscillator, providing clear signals for potential buy and sell opportunities. The indicator includes options to choose from eleven different moving average types, each offering unique benefits and characteristics. It also provides additional features such as standard deviation levels, extreme levels, and divergence detection, enhancing its utility in various market conditions.
2. What is a Z-Score
A Z-Score is a statistical measurement that describes a value's relationship to the mean of a group of values. It is measured in terms of standard deviations from the mean. For instance, a Z-Score of 1.0 means the value is one standard deviation above the mean, while a Z-Score of -1.0 indicates it is one standard deviation below the mean. In the context of financial markets, Z-Scores can be used to identify overbought or oversold conditions by determining how far a particular value (such as a moving average) deviates from its historical mean.
3. What moving averages can be used
The Moving Average Z-Score Suite allows users to select from the following eleven moving averages:
Simple Moving Average (SMA)
Hull Moving Average (HMA)
Exponential Moving Average (EMA)
Weighted Moving Average (WMA)
Double Exponential Moving Average (DEMA)
Running Moving Average (RMA)
Linear Regression Curve (LINREG) (This script can be found standalone )
Triple Exponential Moving Average (TEMA)
Arnaud Legoux Moving Average (ALMA)
Kalman Hull Moving Average (KHMA)
T3 Moving Average
Each of these moving averages has distinct properties and reacts differently to price changes, allowing traders to select the one that best fits their trading style and market conditions.
4. Why Turning a Moving Average into a Z-Score is Innovative and Its Benefits
Transforming a moving average into a Z-Score is an innovative approach because it normalizes the moving average values, making them more comparable across different periods and instruments. This normalization process helps in identifying extreme price movements and mean-reversion opportunities more effectively. By converting the moving average into a Z-Score, traders can better gauge the relative strength or weakness of a trend and detect potential reversals. This method enhances the traditional moving average analysis by adding a statistical perspective, providing clearer and more objective trading signals.
5. How It Can Be Used in the Context of a Trading System
In a trading system, it can be used to generate buy and sell signals based on the Z-Score values. When the Z-Score crosses above zero, it indicates a potential buying opportunity, suggesting that the price is above its mean and possibly trending upward. Conversely, a Z-Score crossing below zero signals a potential selling opportunity, indicating that the price is below its mean and might be trending downward. Additionally, the indicator's ability to show standard deviation levels and extreme levels helps traders set profit targets and stop-loss levels, improving risk management and trade planning.
6. How It Can Be Used for Trend Following
For trend-following strategies, it can be particularly useful. The Z-Score oscillator helps traders identify the strength and direction of a trend. By monitoring the Z-Score and its rate of change, traders can confirm the persistence of a trend and make informed decisions to enter or exit trades. The indicator's divergence detection feature further enhances trend-following by identifying potential reversals before they occur, allowing traders to capitalize on trend shifts. By providing a clear and quantifiable measure of trend strength, this indicator supports disciplined and systematic trend-following strategies.
No backtests for this indicator due to the many options and ways it can be used,
Enjoy
Trend Forecasting - The Quant Science🌏 Trend Forecasting | ENG 🌏
This plug-in acts as a statistical filter, adding new information to your chart that will allow you to quickly verify the direction of a trend and the probability with which the price will be above or below the average in the future, helping you to uncover probable market inefficiencies.
🧠 Model calculation
The model calculates the arithmetic mean in relation to positive and negative events within the available sample for the selected time series. Where a positive event is defined as a closing price greater than the average, and a negative event as a closing price less than the average. Once all events have been calculated, the probabilities are extrapolated by relating each event.
Example
Positive event A: 70
Negative event B: 30
Total events: 100
Probabilities A: (100 / 70) x 100 = 70%
Probabilities B: (100 / 30) x 100 = 30%
Event A has a 70% probability of occurring compared to Event B which has a 30% probability.
🔍 Information Filter
The data on the graph show the future probabilities of prices being above average (default in green) and the probabilities of prices being below average (default in red).
The information that can be quickly retrieved from this indicator is:
1. Trend: Above-average prices together with a constant of data in green greater than 50% + 1 indicate that the observed historical series shows a bullish trend. The probability is correlated proportionally to the value of the data; the higher and increasing the expected value, the greater the observed bullish trend. On the other hand, a below-average price together with a red-coloured data constant show quantitative data regarding the presence of a bearish trend.
2. Future Probability: By analysing the data, it is possible to find the probability with which the price will be above or below the average in the future. In green are classified the probabilities that the price will be higher than the average, in red are classified the probabilities that the price will be lower than the average.
🔫 Operational Filter .
The indicator can be used operationally in the search for investment or trading opportunities given its ability to identify an inefficiency within the observed data sample.
⬆ Bullish forecast
For bullish trades, the inefficiency will appear as a historical series with a bullish trend, with high probability of a bullish trend in the future that is currently below the average.
⬇ Bearish forecast
For short trades, the inefficiency will appear as a historical series with a bearish trend, with a high probability of a bearish trend in the future that is currently above the average.
📚 Settings
Input: via the Input user interface, it is possible to adjust the periods (1 to 500) with which the average is to be calculated. By default the periods are set to 200, which means that the average is calculated by taking the last 200 periods.
Style: via the Style user interface it is possible to adjust the colour and switch a specific output on or off.
🇮🇹Previsione Della Tendenza Futura | ITA 🇮🇹
Questo plug-in funge da filtro statistico, aggiungendo nuove informazioni al tuo grafico che ti permetteranno di verificare rapidamente tendenza di un trend, probabilità con la quale il prezzo si troverà sopra o sotto la media in futuro aiutandoti a scovare probabili inefficienze di mercato.
🧠 Calcolo del modello
Il modello calcola la media aritmetica in relazione con gli eventi positivi e negativi all'intero del campione disponibile per la serie storica selezionata. Dove per evento positivo si intende un prezzo alla chiusura maggiore della media, mentre per evento negativo si intende un prezzo alla chiusura minore della media. Calcolata la totalità degli eventi le probabilità vengono estrapolate rapportando ciascun evento.
Esempio
Evento positivo A: 70
Evento negativo B: 30
Totale eventi : 100
Formula A: (100 / 70) x 100 = 70%
Formula B: (100 / 30) x 100 = 30%
Evento A ha una probabilità del 70% di realizzarsi rispetto all' Evento B che ha una probabilità pari al 30%.
🔍 Filtro informativo
I dati sul grafico mostrano le probabilità future che i prezzi siano sopra la media (di default in verde) e le probabilità che i prezzi siano sotto la media (di default in rosso).
Le informazioni che si possono rapidamente reperire da questo indicatore sono:
1. Trend: I prezzi sopra la media insieme ad una costante di dati in verde maggiori al 50% + 1 indicano che la serie storica osservata presenta un trend rialzista. La probabilità è correlata proporzionalmente al valore del dato; tanto più sarà alto e crescente il valore atteso e maggiore sarà la tendenza rialzista osservata. Viceversa, un prezzo sotto la media insieme ad una costante di dati classificati in colore rosso mostrano dati quantitativi riguardo la presenza di una tendenza ribassista.
2. Probabilità future: analizzando i dati è possibile reperire la probabilità con cui il prezzo si troverà sopra o sotto la media in futuro. In verde vengono classificate le probabilità che il prezzo sarà maggiore alla media, in rosso vengono classificate le probabilità che il prezzo sarà minore della media.
🔫 Filtro operativo
L' indicatore può essere utilizzato a livello operativo nella ricerca di opportunità di investimento o di trading vista la capacità di identificare un inefficienza all'interno del campione di dati osservato.
⬆ Previsione rialzista
Per operatività di tipo rialzista l'inefficienza apparirà come una serie storica a tendenza rialzista, con alte probabilità di tendenza rialzista in futuro che attualmente si trova al di sotto della media.
⬇ Previsione ribassista
Per operatività di tipo short l'inefficienza apparirà come una serie storica a tendenza ribassista, con alte probabilità di tendenza ribassista in futuro che si trova attualmente sopra la media.
📚 Impostazioni
Input: tramite l'interfaccia utente Input è possibile regolare i periodi (da 1 a 500) con cui calcolare la media. Di default i periodi sono impostati sul valore di 200, questo significa che la media viene calcolata prendendo gli ultimi 200 periodi.
Style: tramite l'interfaccia utente Style è possibile regolare il colore e attivare o disattivare un specifico output.
ARIMA Indicator with Optional SmoothingOverview
The ARIMA (AutoRegressive Integrated Moving Average) Indicator is a powerful tool used to forecast future price movements by combining differencing, autoregressive, and moving average components. This indicator is designed to help traders identify trends and potential reversal points by analyzing the historical price data.
Key Features
AutoRegressive Component (AR): Utilizes past values to predict future prices.
Moving Average Component (MA): Averages past price differences to smooth out noise.
Differencing: Reduces non-stationarity in the time series data.
Optional Smoothing: Applies EMA to the ARIMA output for a smoother signal.
Customizable Parameters: Allows users to adjust AR and MA orders, differencing periods, and smoothing lengths.
Concepts Underlying the Calculations
Differencing: Subtracts previous prices from current prices to remove trends and seasonality, making the data stationary.
AutoRegressive Component (AR): Predicts future prices based on a linear combination of past values.
Moving Average Component (MA): Uses past forecast errors to refine future predictions.
Exponential Moving Average (EMA): Applies more weight to recent prices, providing a smoother and more responsive signal.
How It Works
The ARIMA Indicator first calculates the differenced series to achieve stationarity. Then, it computes the simple moving average (SMA) of this differenced series. The indicator uses the AR and MA components to adjust the SMA, creating an approximation of the ARIMA model. Finally, an optional smoothing step using EMA can be applied to the ARIMA approximation to produce a smoother signal.
How Traders Can Use It
Traders can use the ARIMA Indicator to:
Identify Trends: Detect emerging trends by observing the direction of the ARIMA line.
Spot Reversals: Look for divergences between the ARIMA line and the price to identify potential reversal points.
Generate Trading Signals: Use crossovers between the ARIMA line and the price to generate buy or sell signals.
Filter Noise: Enable the optional smoothing to filter out market noise and focus on significant price movements.
Example Usage Instructions
Add the ARIMA Indicator to your chart.
Adjust the input parameters to suit your trading strategy:
Set the SMA Length (e.g., 14).
Choose the Differencing Period (e.g., 1).
Define the AR Order (p) and MA Order (q) (e.g., 1).
Configure the Smoothing Length if smoothing is desired (e.g., 5).
Enable or disable smoothing as needed.
Observe the ARIMA line (blue) and compare it to the price chart.
Use the ARIMA line to identify trends and potential reversals.
Implement trading decisions based on the ARIMA line’s behavior relative to the price.
MarketAnalysisLibrary "MarketAnalysis"
A collection of frequently used market analysis functions in my scripts.
bullFibRet(priceLow, priceHigh, fibLevel)
Calculates a bullish fibonacci retracement value.
Parameters:
priceLow (float) : (float) The lowest price point.
priceHigh (float) : (float) The highest price point.
fibLevel (float) : (float) The fibonacci level to calculate.
Returns: The fibonacci value of the given retracement level.
bearFibRet(priceLow, priceHigh, fibLevel)
Calculates a bearish fibonacci retracement value.
Parameters:
priceLow (float) : (float) The lowest price point.
priceHigh (float) : (float) The highest price point.
fibLevel (float) : (float) The fibonacci level to calculate.
Returns: The fibonacci value of the given retracement level.
bullFibExt(priceLow, priceHigh, thirdPivot, fibLevel)
Calculates a bullish fibonacci extension value.
Parameters:
priceLow (float) : (float) The lowest price point.
priceHigh (float) : (float) The highest price point.
thirdPivot (float) : (float) The third price point.
fibLevel (float) : (float) The fibonacci level to calculate.
Returns: The fibonacci value of the given extension level.
bearFibExt(priceLow, priceHigh, thirdPivot, fibLevel)
Calculates a bearish fibonacci extension value.
Parameters:
priceLow (float) : (float) The lowest price point.
priceHigh (float) : (float) The highest price point.
thirdPivot (float) : (float) The third price point.
fibLevel (float) : (float) The fibonacci level to calculate.
Returns: The fibonacci value of the given extension level.
Markov Chain Trend IndicatorOverview
The Markov Chain Trend Indicator utilizes the principles of Markov Chain processes to analyze stock price movements and predict future trends. By calculating the probabilities of transitioning between different market states (Uptrend, Downtrend, and Sideways), this indicator provides traders with valuable insights into market dynamics.
Key Features
State Identification: Differentiates between Uptrend, Downtrend, and Sideways states based on price movements.
Transition Probability Calculation: Calculates the probability of transitioning from one state to another using historical data.
Real-time Dashboard: Displays the probabilities of each state on the chart, helping traders make informed decisions.
Background Color Coding: Visually represents the current market state with background colors for easy interpretation.
Concepts Underlying the Calculations
Markov Chains: A stochastic process where the probability of moving to the next state depends only on the current state, not on the sequence of events that preceded it.
Logarithmic Returns: Used to normalize price changes and identify states based on significant movements.
Transition Matrices: Utilized to store and calculate the probabilities of moving from one state to another.
How It Works
The indicator first calculates the logarithmic returns of the stock price to identify significant movements. Based on these returns, it determines the current state (Uptrend, Downtrend, or Sideways). It then updates the transition matrices to keep track of how often the price moves from one state to another. Using these matrices, the indicator calculates the probabilities of transitioning to each state and displays this information on the chart.
How Traders Can Use It
Traders can use the Markov Chain Trend Indicator to:
Identify Market Trends: Quickly determine if the market is in an uptrend, downtrend, or sideways state.
Predict Future Movements: Use the transition probabilities to forecast potential market movements and make informed trading decisions.
Enhance Trading Strategies: Combine with other technical indicators to refine entry and exit points based on predicted trends.
Example Usage Instructions
Add the Markov Chain Trend Indicator to your TradingView chart.
Observe the background color to quickly identify the current market state:
Green for Uptrend, Red for Downtrend, Gray for Sideways
Check the dashboard label to see the probabilities of transitioning to each state.
Use these probabilities to anticipate market movements and adjust your trading strategy accordingly.
Combine the indicator with other technical analysis tools for more robust decision-making.
SD Distance Mean BetaThe "SD Distance Mean Indicator" is a currently a developing tool designed to enhance trading precision by dynamically adjusting to market conditions. This indicator provides insights into price deviations from the mean, helping traders make inf OANDA:XAUUSD ormed decisions based on significant price movements.
Key Features:
Adaptive Length Adjustment:
The indicator dynamically adjusts the calculation period based on the Average True Range (ATR). This allows it to respond to different market conditions, using a shorter length during consolidations and a longer length during trends.
Standardized Distance Calculation:
The indicator calculates the distance of the current price from the mean and standardizes it using the standard deviation. This standardized distance is then smoothed to reduce noise and provide clearer signals.
Dynamic Standard Deviation (SD) Levels:
SD levels are adjusted dynamically based on ATR, providing a more accurate representation of price volatility. These levels are further smoothed to minimize wiggling on shorter timeframes like the 30-minute chart.
Visual Cues for Trading Signals:
The indicator plots multiple SD levels (+1, +2, +3, +4 and their negatives) and highlights significant price movements. When the standardized distance line hits or exceeds these levels, it signals potential overbought or oversold conditions.
Customizable Smoothing: The smoothing length for both the standardized distance and SD levels can be customized to suit different trading strategies and timeframes. Default values are set to provide a balance between responsiveness and stability.
Usage:
Identifying Reversals : The indicator helps in spotting potential reversal points. When the smoothed standardized distance line hits +2 SD or -2 SD and rebounds, it signals a possible price reversal back towards the mean.
Confirming Trends: Dynamic SD levels provide a clear visual representation of price volatility, helping traders confirm trend strength and potential breakout points.
Enhancing Precision: By dynamically adjusting to market conditions, the indicator enhances trading precision, making it suitable for various market environments.
This script is an essential addition to any trader's toolkit, offering a blend of adaptability, precision, and visual clarity to support more informed trading decisions.
Settings:
Short Length: Period length used during consolidations.
Long Length: Period length used during trends.
ATR Length: Length for ATR calculation.
ATR Threshold: Threshold value to switch between short and long lengths.
Smoothing Length: Length for smoothing the standardized distance.
SD Smoothing Length: Length for smoothing the dynamic SD levels.
By using this indicator, traders can leverage its adaptive capabilities to navigate various market conditions effectively and enhance their trading performance on XAUUSD and other assets.
Consecutive Closes Above/Below 3 SMA with Z-Score BandsA simple indicator that measures consecutive closes above & below the 3-period simple moving average. An upper and lower Z-score has been calculated to indicate where the 4 standard deviations of the last 60 bars sits.
Useful for identifying directional runs in price.
PEV Price BandThe PEV Price Band shows prices calculated using the high and low P/FQ EV of the previous period. (price to enterprise value per share for the last quarter) multiplied by FQ's current EVPS (similar to comparing marketcap to enterprise value but edit equations that are close to the theory of P/E)
If the current price is lower than the minimum P/EVPS, it is considered cheap. In other words, a current price is above the maximum is considered expensive.
PEV Price Band consists of 2 parts.
- First of all, the current P/EVPS value is "green" (if the markecap is less than the enterprise value) or "red" (if the marketcap is more than the enterprise value) or "gold" (if the market value is less than the enterprise value and less than equity)
- Second, the blue line is the closing price.
Easy Scalping Lot Calculator for ForexThe calculator was created to make it easier to calculate the lot size on Forex. I planned to use it for the following pairs: AUDCAD, AUDCHF, AUDJPY, AUDUSD, EURAUD, EURCAD, EURCHF, EURGBP, EURJPY, EURNZD, EURUSD, GBPCHF, GBPJPY, GBPUSD, NZDUSD, USDCAD, USDCHF, USDJPY, XAUUSD.
The indicator is a table that shows the calculation of the lot for a predetermined stop loss.
For example, you are planning a trade, have calculated a stop loss of 15 points, and by checking the table you understand approximately what lot you need to use to limit your risk.
In the settings you can change the risk and also determine the stop loss value in points.
The calculator does not take into account the spread in the calculations.
There are websites where you can accurately calculate the lot, but if you trade on small time frames this is not suitable for you.
The calculator uses the formula:
Lot size = maximum risk / stop loss (in pips) / minimum pip value x minimum trading lot.