Convert TC codes to Thinkorswim


Category:
0
0

Hi Pete, thank you for the conditional wizard video, it was excellent. I chanced upon this code from telechart which provides a scan for trending chart pattern. I have also attached the notes on the scan criteria explained by the presenter.

C>avgc200 and C>avgc150 and

avgc150 >avgc200 and

avgc200>avgc200.25 and

avgc50 > avgc200 and

avgc50>avgc150 and c>avgc50 and

c>1.3*minl252 and c>.75*maxh252

 

Attachments:
Marked as spam
Posted by (Questions: 8, Answers: 15)
Asked on August 18, 2019 7:18 am
389 views
0
Private answer

I think this should do it. Never saw code from this platform before but it seems quite easy to read. I may have missed a thing or two. I have not tested this. So be sure to let me know how it works.

#C>avgc200 and C>avgc150 and
def one = close > Average(close, 200) and close > Average(close, 150);
#avgc150 >avgc200 and
def two = Average(close, 150) > Average(close, 200);
#avgc200>avgc200.25 and
def three = Average(close, 200) > Average(close, 200)[25];
#avgc50 > avgc200 and
def four = Average(close, 50) > Average(close, 200);
#avgc50>avgc150 and c>avgc50 and
def five = Average(close, 150) > Average(close, 50) and close > Average(close, 50);
#c>1.3*minl252 and c>.75*maxh252
def six = close > 1.3 * Lowest(low, 252) and close > 0.75 * Highest(high, 252);
plot scan = one and two and three and four and five and six;

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on August 18, 2019 12:29 pm
0
wow..that's fast!!! Thanks for the quick response. I will check if the scan should provide a list of strong trending stocks and compare with what was being scanned out. WIll get back asap. Thanks again!!
( at August 18, 2019 10:34 pm)
0
Hi Pete, i found out that this scan is suppose to scan out a watchlist that fulfills the criteria mentioned, not sure if any adjustments is required?
( at August 20, 2019 8:12 am)
0
I only translated the code to Thinkorswim language. I did not include any details from your screenshot. At first glance it looked like it was just a plain English description of the code. Now I see there are a couple of items listed that the code does not address. It's quite obvious we can't do anything about the IBD relative strength ranking. Aside from that, what else did you need help to implement?
( at August 20, 2019 9:59 am)
0
Thanks Pete, i have managed to generate a watchlist and have verified pt 1-7 are correct, except pt 4, the 50 day MA is above both 150MA and 200MA. Then I realised there was a typo error in the code and amended it. Now, it worked perfectly. Thanks again
( at August 22, 2019 9:16 am)