SVEPivots indicator I want to built a scanner based on theis indicator need some help

yahalomi3

New member
Hello everyone i use pivot points as strategy, im trying to built watchlist/scanner that will alert me every time a stock hit S3 or R3 but cant make it to work. the indicator called SVEPivots is anyone using it or willing to help?
 
Solution
Hello everyone i use pivot points as strategy, im trying to built watchlist/scanner that will alert me every time a stock hit S3 or R3 but cant make it to work. the indicator called SVEPivots is anyone using it or willing to help?


i removed the second aggregation parameters. can't use them in a column or scan.

set the environment to DAY

----------------------------------------------

column study link
zpivotcross
http://tos.mx/NBAx2FG

column study
colors the column cell cyan when r3 or s3 is crossed


Code:
# zpivotcross

# SVEPivots_01_s3r3_cross

#https://usethinkscript.com/threads/svepivots-indicator-i-want-to-built-a-scanner-based-on-theis-indicator-need-some-help.11745/

# SVEPivots indicator I want to built a...

halcyonguy

Well-known member
VIP
Lifetime
Hello everyone i use pivot points as strategy, im trying to built watchlist/scanner that will alert me every time a stock hit S3 or R3 but cant make it to work. the indicator called SVEPivots is anyone using it or willing to help?


i removed the second aggregation parameters. can't use them in a column or scan.

set the environment to DAY

----------------------------------------------

column study link
zpivotcross
http://tos.mx/NBAx2FG

column study
colors the column cell cyan when r3 or s3 is crossed


Code:
# zpivotcross

# SVEPivots_01_s3r3_cross

#https://usethinkscript.com/threads/svepivots-indicator-i-want-to-built-a-scanner-based-on-theis-indicator-need-some-help.11745/

# SVEPivots indicator I want to built a scanner based on theis indicator need some help
# yahalomi3  Start dateWednesday at 1:45 PM  Tagsunanswered
# Hello everyone i use pivot points as strategy, im trying to built watchlist/scanner that will alert me every time a stock hit S3 or R3 but cant make it to work. the indicator called SVEPivots is anyone using it or willing to help?


# set to day

# SVEPivots
# TD Ameritrade IP Company, Inc. (c) 2018-2022
#input aggregationPeriod = AggregationPeriod.DAY;

#def PH = high(period = aggregationPeriod)[1];
#def PL = low(period = aggregationPeriod)[1];
#def PC = close(period = aggregationPeriod)[1];

#declare lower;

def bn = barnumber();

def PH = high[1];
def PL = low[1];
def PC = close[1];


def R3;
def R3M;
def R2;
def R2M;
def R1;
def R1M;
def HH;
def PP;
def LL;
def S1M;
def S1;
def S2M;
def S2;
def S3M;
def S3;

HH = PH;
LL = PL;
PP = (PH + PL + PC) / 3;
R1 = 2 * PP - PL;
R1M = (R1 - PP) / 2 + PP;
R2 = PP + (PH - PL);
R2M = (R2 - R1) / 2 + R1;
R3 = 2 * PP + (PH - 2 * PL);
R3M = (R3 - R2) / 2 + R2;
S1 = 2 * PP - PH;
S1M = (PP - S1) / 2 + S1;
S2 = PP - (PH - PL);
S2M = (S1 - S2) / 2 + S2;
S3 = 2 * PP - (2 * PH - PL);
S3M = (S2 - S3) / 2 + S3;

def s3x = close crosses s3;
def r3x = close crosses r3;

def s3cross_cnt = if bn == 1 then 0 else if s3x then s3cross_cnt[1] + 1 else s3cross_cnt[1];
def r3cross_cnt = if bn == 1 then 0 else if r3x then r3cross_cnt[1] + 1 else r3cross_cnt[1];

#addlabel(1, "s3 crosses " + s3cross_cnt, color.yellow);
#addlabel(1, "r3 crosses " + r3cross_cnt, color.yellow);

#addverticalline(s3x, "s3 x", color.green);
#addverticalline(r3x, "r3 x", color.red);

#plot zs3x = s3x;
#plot zr3x = r3x;

plot z = s3x or r3x;
z.setdefaultcolor(color.black);
assignbackgroundcolor( if z then color.cyan else color.gray);
#


----------------------------------------------



lower test study
draws pulses. goes to 1 when a cross happens

Code:
# SVEPivots_01_s3r3_cross

#https://usethinkscript.com/threads/svepivots-indicator-i-want-to-built-a-scanner-based-on-theis-indicator-need-some-help.11745/

# SVEPivots indicator I want to built a scanner based on theis indicator need some help
# yahalomi3  Start dateWednesday at 1:45 PM  Tagsunanswered
# Hello everyone i use pivot points as strategy, im trying to built watchlist/scanner that will alert me every time a stock hit S3 or R3 but cant make it to work. the indicator called SVEPivots is anyone using it or willing to help?


# set to day

# SVEPivots
# TD Ameritrade IP Company, Inc. (c) 2018-2022
#input aggregationPeriod = AggregationPeriod.DAY;

#def PH = high(period = aggregationPeriod)[1];
#def PL = low(period = aggregationPeriod)[1];
#def PC = close(period = aggregationPeriod)[1];

declare lower;

def bn = barnumber();

def PH = high[1];
def PL = low[1];
def PC = close[1];


def R3;
def R3M;
def R2;
def R2M;
def R1;
def R1M;
def HH;
def PP;
def LL;
def S1M;
def S1;
def S2M;
def S2;
def S3M;
def S3;

HH = PH;
LL = PL;
PP = (PH + PL + PC) / 3;
R1 = 2 * PP - PL;
R1M = (R1 - PP) / 2 + PP;
R2 = PP + (PH - PL);
R2M = (R2 - R1) / 2 + R1;
R3 = 2 * PP + (PH - 2 * PL);
R3M = (R3 - R2) / 2 + R2;
S1 = 2 * PP - PH;
S1M = (PP - S1) / 2 + S1;
S2 = PP - (PH - PL);
S2M = (S1 - S2) / 2 + S2;
S3 = 2 * PP - (2 * PH - PL);
S3M = (S2 - S3) / 2 + S3;

def s3x = close crosses s3;
def r3x = close crosses r3;

def s3cross_cnt = if bn == 1 then 0 else if s3x then s3cross_cnt[1] + 1 else s3cross_cnt[1];
def r3cross_cnt = if bn == 1 then 0 else if r3x then r3cross_cnt[1] + 1 else r3cross_cnt[1];

addlabel(1, "s3 crosses " + s3cross_cnt, color.yellow);
addlabel(1, "r3 crosses " + r3cross_cnt, color.yellow);

#addverticalline(s3x, "s3 x", color.green);
#addverticalline(r3x, "r3 x", color.red);

#plot zs3x = s3x;
#plot zr3x = r3x;

plot z = s3x or r3x;
#
 
Solution

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Top