# Charles Drummond PLDot For ThinkOrSwim

#### Sully

##### New member
Hello,

Looking to convert TS code to TOS is for the Drummond PLDot.

Ideally, there would be two plots;

1- Plot dot of one color when dot is greater than the previous dot
2- Plot dot of another color when dot is less than the previous dot

Appreciate any assistance/guidance, recommendations, or revisions!

Thank you!

Last edited by a moderator:
@Sully see if this works for you

Code:
``````#Charles Drummond PLDot
# 1/8/2020 Version 1.0 Sully attempt

def H = high;
def L = low;
def C = close;

# Calculate Averages

def A1 = (H[1] + L[1] + C[1]) / 3;
def A2 = (H[2] + L[2] + C[2]) / 3;
def A3 = (H[3] + L[3] + C[3]) / 3;

def Average = (A1 + A2 + A3) /3;

# Plot the PLDot

plot PLDot = Average;
PLDot.SetLineWeight(3);
PLDot.SetStyle(Curve.POINTS);
PLDot.AssignValueColor(if Average > Average[1] then Color.CYAN else Color.YELLOW);

#END PLDot CODE``````

Last edited by a moderator:
@Sully see if this works for you

Code:
``````#Charles Drummond PLDot
# 1/8/2020 Version 1.0 Sully attempt

def H = high;
def L = low;
def C = close;

# Calculate Averages

def A1 = (H[1] + L[1] + C[1]) / 3;
def A2 = (H[2] + L[2] + C[2]) / 3;
def A3 = (H[3] + L[3] + C[3]) / 3;

def Average = (A1 + A2 + A3) /3;

# Plot the PLDot

plot PLDot = Average;
PLDot.SetLineWeight(3);
PLDot.SetStyle(Curve.POINTS);
PLDot.AssignValueColor(if Average > Average[1] then Color.CYAN else Color.YELLOW);

#END PLDot CODE``````

Last edited:

87k+ Posts
274 Online

## The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
• Exclusive indicators
• Proven strategies & setups
• Private Discord community
• Exclusive members-only content
• 1 full year of unlimited support

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?