• LIMITED TIME ONLY: Take $40 off VIP with code: BTD40.

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:

tomsk

Well-known member
VIP
@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:
Thread starter Similar threads Forum Replies Date
B What will happen to ThinkorSwim after Charles Schwab merger? Questions 5
blakecmathis Charles Schwab buying TD Ameritrade Questions 45

Similar threads

Top