Persons Pivots and Camarilla Pts on Renko Chart?

Darth Tradicus

Member
VIP
Hey guys, when I add Person's Pivots and Camarilla Points to Renko Charts they don't show up. Is there any way to do this, or any bit of code I could add to make them appear?
 
Solution
Hey guys, when I add Person's Pivots and Camarilla Points to Renko Charts they don't show up. Is there any way to do this, or any bit of code I could add to make them appear?

Here is both TOS indicators adapted to appear on Renko Charts. The same logic for hlc was used to adapt both of these.

The image shows the indicators in the upper chart set to 5D 10 ticks renko bar , and the lower a 5D 10m chart/

Capture.jpg

Here is Person's Pivots##########################################################################
Ruby:
#Persons Pivots adapted to Renko Charts
#Days Defined
def ymd      = GetYYYYMMDD();
def rthrs    = SecondsFromTime(0930) >= 0 and SecondsFromTime(1600) <= 0;

def capture  = !IsNaN(close) and ymd !=...
Hey guys, when I add Person's Pivots and Camarilla Points to Renko Charts they don't show up. Is there any way to do this, or any bit of code I could add to make them appear?

Here is both TOS indicators adapted to appear on Renko Charts. The same logic for hlc was used to adapt both of these.

The image shows the indicators in the upper chart set to 5D 10 ticks renko bar , and the lower a 5D 10m chart/


Here is Person's Pivots##########################################################################
Ruby:
#Persons Pivots adapted to Renko Charts
#Days Defined
def ymd      = GetYYYYMMDD();
def rthrs    = SecondsFromTime(0930) >= 0 and SecondsFromTime(1600) <= 0;

def capture  = !IsNaN(close) and ymd != ymd[1];
def dayCount = CompoundValue(1, if capture then dayCount[1] + 1 else dayCount[1], 0);
def thisDay  = (HighestAll(dayCount) - dayCount) ;

#Days High, Low, Close
def rthrsH = CompoundValue(1, if capture then high else if high > rthrsH[1] then high else rthrsH[1], high);
def rthrsL = CompoundValue(1, if capture then low else if low < rthrsL[1] then low else rthrsL[1], low);

#Yesterdays
def H  = if thisDay == 1 and rthrs  then rthrsH else H[1];
def L  = if thisDay == 1 and rthrs  then rthrsL else L[1];
def C  = if thisDay == 1 and rthrs  then close else C[1];

#2 Days Ago
def H2 = if thisDay == 2 and rthrs  then rthrsH else H2[1];
def L2 = if thisDay == 2 and rthrs  then rthrsL else L2[1];
def C2 = if thisDay == 2 and rthrs then close else C2[1];
#AddLabel(1, H + " " + L + " " + C + " " + H2 + " " + L2 + " " + C2);

#Persons Level Filter
input marketThreshold = 0.0025;
input applyPersonsLevelsFilter = yes;
Assert(marketThreshold >= 0, "'market threshold' must not be negative: " + marketThreshold);
def marketType = {default DISABLED, NEUTRAL, BEARISH, BULLISH};
def PP2 = (H2 + L2 + C2) / 3;
marketType = if !applyPersonsLevelsFilter then marketType.DISABLED else
if PP2[-1] > (PP2[-1] + PP2 + PP2[1]) / 3 + marketThreshold then marketType.BULLISH else
if PP2[-1] < (PP2[-1] + PP2 + PP2[1]) / 3 - marketThreshold then marketType.BEARISH else marketType.NEUTRAL;

#Pivots
plot R3;
plot R2;
plot R1;
plot RR;
plot PP;
plot SS;
plot S1;
plot S2;
plot S3;

if GetDay() != GetLastDay()
then {
    R1 = Double.NaN;
    R2 = Double.NaN;
    R3 = Double.NaN;
    PP = Double.NaN;
    S1 = Double.NaN;
    S2 = Double.NaN;
    S3 = Double.NaN;
} else {
    PP = (H + L + C) / 3;
    R1 = 2 * PP - L;
    R2 = PP + H - L;
    R3 = R2 + H - L;
    S1 = 2 * PP - H;
    S2 = PP - H + L;
    S3 = S2 - H + L;
}


PP.SetDefaultColor(GetColor(0));
R1.SetDefaultColor(GetColor(5));
R2.SetDefaultColor(GetColor(5));
R3.SetDefaultColor(GetColor(5));
S1.SetDefaultColor(GetColor(6));
S2.SetDefaultColor(GetColor(6));
S3.SetDefaultColor(GetColor(6));


PP.SetStyle(Curve.SHORT_DASH);
RR.SetStyle(Curve.SHORT_DASH);
R1.SetStyle(Curve.SHORT_DASH);
R2.SetStyle(Curve.SHORT_DASH);
R3.SetStyle(Curve.SHORT_DASH);
SS.SetStyle(Curve.SHORT_DASH);
S1.SetStyle(Curve.SHORT_DASH);
S2.SetStyle(Curve.SHORT_DASH);
S3.SetStyle(Curve.SHORT_DASH);

def paintingStrategy = PaintingStrategy.LINE_VS_POINTS;

RR = if (marketType == marketType.BEARISH or marketType == marketType.NEUTRAL) then R1 else R2;
SS = if (marketType == marketType.BULLISH or marketType == marketType.NEUTRAL) then S1 else S2;

RR.SetHiding(!applyPersonsLevelsFilter);
R1.SetHiding(applyPersonsLevelsFilter);
R2.SetHiding(applyPersonsLevelsFilter);
R3.Hide();
SS.SetHiding(!applyPersonsLevelsFilter);
S1.SetHiding(applyPersonsLevelsFilter);
S2.SetHiding(applyPersonsLevelsFilter);
S3.Hide();

PP.SetPaintingStrategy(paintingStrategy);
RR.SetPaintingStrategy(paintingStrategy);
R1.SetPaintingStrategy(paintingStrategy);
R2.SetPaintingStrategy(paintingStrategy);
R3.SetPaintingStrategy(paintingStrategy);
SS.SetPaintingStrategy(paintingStrategy);
S1.SetPaintingStrategy(paintingStrategy);
S2.SetPaintingStrategy(paintingStrategy);
S3.SetPaintingStrategy(paintingStrategy);

Here is Camarilla Points##############################################
Ruby:
#
#Days Defined
def ymd      = GetYYYYMMDD();
def rthrs    = SecondsFromTime(0930) >= 0 and SecondsFromTime(1600) <= 0;

def capture  = !IsNaN(close) and ymd != ymd[1];
def dayCount = CompoundValue(1, if capture then dayCount[1] + 1 else dayCount[1], 0);
def thisDay  = (HighestAll(dayCount) - dayCount) ;

#Days High, Low, Close
def rthrsH = CompoundValue(1, if capture then high else if high > rthrsH[1] then high else rthrsH[1], high);
def rthrsL = CompoundValue(1, if capture then low else if low < rthrsL[1] then low else rthrsL[1], low);

#Yesterdays
def H  = if thisDay == 1 and rthrs  then rthrsH else H[1];
def L  = if thisDay == 1 and rthrs  then rthrsL else L[1];
def C  = if thisDay == 1 and rthrs  then close else C[1];

input aggregationPeriod = {default "DAY", "WEEK", "MONTH"};
input length = 1;

Assert(length > 0, "'length' should be positive: " + length);

def highValue = H;
def lowValue = L;
def closeValue = if getday()!=getlastday() then double.nan else C;
def range = highValue - lowValue;

plot R5 = (highValue / lowValue) * closeValue;
plot R4 = closeValue + range * (1.1) / 2;
plot R3 = closeValue + range * (1.1) / 4;
plot R2 = closeValue + range * (1.1) / 6;
plot R1 = closeValue + range * (1.1) / 12;
plot S1 = closeValue - range * (1.1) / 12;
plot S2 = closeValue - range * (1.1) / 6;
plot S3 = closeValue - range * (1.1) / 4;
plot S4 = closeValue - range * (1.1) / 2;
plot S5 = (closeValue - (R5 - closeValue));

R1.Hide();
S1.Hide();

R5.SetDefaultColor(GetColor(5));
R4.SetDefaultColor(GetColor(5));
R3.SetDefaultColor(GetColor(5));
R2.SetDefaultColor(GetColor(5));
R1.SetDefaultColor(GetColor(5));
S1.SetDefaultColor(GetColor(6));
S2.SetDefaultColor(GetColor(6));
S3.SetDefaultColor(GetColor(6));
S4.SetDefaultColor(GetColor(6));
S5.SetDefaultColor(GetColor(6));

def paintingStrategy = PaintingStrategy.POINTS;

R5.SetPaintingStrategy(paintingStrategy);
R4.SetPaintingStrategy(paintingStrategy);
R3.SetPaintingStrategy(paintingStrategy);
R2.SetPaintingStrategy(paintingStrategy);
R1.SetPaintingStrategy(paintingStrategy);
S1.SetPaintingStrategy(paintingStrategy);
S2.SetPaintingStrategy(paintingStrategy);
S3.SetPaintingStrategy(paintingStrategy);
S4.SetPaintingStrategy(paintingStrategy);
S5.SetPaintingStrategy(paintingStrategy);
 
Solution
Thanks @Darth Tradicus ! Do you know if @SleepyZ code would have to be modified to reflect the different ticks or should it work for any ticks ? Thank you again !
Should work for any tick setting as far as I know. I've noticed the RENKO versions don't always match up with the time/tick versions perfectly, as I believe they line up to the increments you're using but they're close enough for me.
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Thread starter Similar threads Forum Replies Date
D Persons Market Catcher (PMC) Indicator Questions 6
Bingy Episodic Pivots Questions 0
R ATR Pivots Questions 0
Ringandpinion Mobius Trend Pivots cloud length Questions 4
Z 2nd & 3rd Order pivots Questions 2

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
425 Online
Create Post

Similar threads

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.
Back
Top