#### Sully

##### New member

Hello,

My first attempt of converting TS code to TOS is for the Drummond PLDot.

It seems simple enough until I get to the plot portion. For some reason, the plot is a few hundred dollars above the actual price rendering the chart useless.

This is the TS code:

This is what I have so far for the TOS code:

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!

My first attempt of converting TS code to TOS is for the Drummond PLDot.

It seems simple enough until I get to the plot portion. For some reason, the plot is a few hundred dollars above the actual price rendering the chart useless.

This is the TS code:

Code:

```
c=close
h=high
l=low
a=avg(h[1],l[1],c[1])
b=avg(h[2],l[2],c[2])
t=avg(h[3],l[3],c[3])
k=a+b+t
Pldot=k/3
Cosodelcolor = input(title="Cosodelcolor ?", type=bool, defval=true)
Pldotcolor= Cosodelcolor ? (Pldot > Pldot[1] ? lime : red) : orange
plot(Pldot, title="PLDOT", style=circles, linewidth=4, color=Pldotcolor, transp=0, offset=1)
```

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);
#END PLDot CODE
```

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: