Connors Pullback from MetaStock to Thinkorswim


Category:
0
0

Hi Pete,

How to translate the attached MetaStock code to thinkscript scanner?

Thanks!

Editors Note: The title of this post has been changed to better reflect the context of the question. This makes it easier for others to search for a locate the solution to this request.

Attachments:
Marked as spam
Posted by (Questions: 23, Answers: 57)
Asked on October 12, 2017 4:00 pm
395 views
0

It’s going to take me a while to get to this one. I’m working to publish a few new videos. I am also going to change the name and URL of this post. I think the title is too vague, and should definitely contain the phrase “Connors Pullback” so folks have a clear idea what it’s about.

( at October 13, 2017 1:24 pm)
0
Thank you. I’ll wait until you get to it. Yes, the title should be changed to “Connors Pullback” (I tried to change but it did not allow me). Also, the scan should scan for Short pullback as well. I guess just change that last code line to: var1 AND CLOSE < Mov(C,50,S) AND CLOSE < Mov(C,200,S)
( at October 14, 2017 6:59 am)
0
Private answer

This was a real eye-chart. Not sure I was able to copy that from the screenshot correctly. The crucial task was to get all the parentheses in the correct positions. So if there are any mistakes, it’s in the placement of parentheses. Give it shot and let me know if it works. Screenshots of code are not very easy to work with. Please provide text versions in the future.

input length = 14;
input averageType = AverageType.WILDERS;
def var1 = ADX(length, averageType).ADX > 30 and
DMI(length, averageType)."DI+" > DMI(length, averageType)."DI-" and
((low < low[1] and low[1] < low[2] and low[2] < low[3]) or
((low < low[1] and low[1] < low[2] and high[2] < high[3] and low[2] > low[3]) or
(low < low[1] and low[2] < low[3] and high[1] < high[2] and low[1] > low[2]) or
(low[1] < low[2] and low[2] < low[3] and high < high[1] and low > low[1])));
plot scan = var1 and close > Average(close, 50) and close > Average(close, 200);

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on October 19, 2017 9:54 am
0

Thank you, Pete! That was great!

( at October 19, 2017 12:14 pm)