Unable to align Scanner results

8Nick8

Active member
2019 Donor
VIP
Hi, from the FB chart, i noticed that there two Arrows being plotted( the conditions are met based on the script) but when i run the scanner with the script for the ARROWS, I am unable to get the stock FB from the scanner,

Tried to troubleshoot and like to check if my understanding on the scanner is correct.
1. The scanner will only display those stocks when ALL 3 criteria are met, in this case, FB did not meet one of the criteria and there is no result produced for FB

2. If there is no scan results for FB being produced, there should not be any ARROWs plotted on the chart.

So where are the errors?

Proposed corrections to be made
1. Add all 3 criteria into the ARROW script in order to align the scan results??

2. Add another condition group into the scanner to separate one of the condition? Not too sure how this work.

miaPwq4.png


Thanks
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

@Nick In addition to @BenTen's request, it would help if you were to post the Study script that is generating the arrows in question on your chart... The more information we have, the better we can assist you...
 
It's impossible for us to help if you don't list out those conditions or provide the script that you're using in your scanner.
@BenTen @rad14733

Thanks for the prompt response. My bad, I have forgotten to attach the pics and added the scripts in.

Code:
#This is the script for the Arrows to be plotted

plot Trend1 = MovAvgExponential(close, 10);
Trend1.AssignValueColor(if close > Trend1 then Color.GREEN else Color.RED);
trend1.setLineWeight(2);
plot Trend2 = MovAvgExponential(close, 30);
Trend2.AssignValueColor(if close > Trend2 then Color.GREEN else Color.RED);
#########################################################################
input length = 14;
input calcLength = 5;
input smoothLength = 3;
input agg = AggregationPeriod.WEEK;
def o = open(period = agg);
def c = close(period = agg);
def data = fold i = 0 to length
           with s
           do s + (if c > GetValue(o, i)
                   then 1
                   else if c < GetValue(o, i)
                        then - 1
                        else 0);
def EMA5 = ExpAverage(data, calcLength);
def Main = ExpAverage(EMA5, smoothLength);
def Signal = ExpAverage(Main, smoothLength);
def ob = if IsNaN(c) then Double.NaN else Round(length * 0.72);
def os = if IsNaN(c) then Double.NaN else -Round(length * 0.1);

plot Arrow_Up = Main < os and Main crosses above Signal and close>trend1;
Arrow_Up.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Arrow_Up.SetLineWeight(3);
Arrow_Up.AssignValueColor(Color.BLUE);
##########################################################
def Price2MA=MovAvgExponential(close,10);
def Condition1 = Close>Price2MA;
input length2 = 14;
input over_sold = -100;
input over_bought = 100;
def price = close + low + high;
def linDev = LinDev(price, length2);
def CCI = if linDev == 0 then 0 else (price - Average(price, length2)) / linDev / 0.015;
def ZeroLine = 0;
def condition2=CCI crosses above zeroline;

Plot Signal_2= condition1 and condition2;
Signal_2.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Signal_2.SetLineWeight(5);
Signal_2.AssignValueColor(Color.White);
#End

Chart with arrows

Scanner setup

In this scanner setup, the two conditions that I have added are

Mark Minervini Trend template from this post,
https://usethinkscript.com/threads/mark-minervini-trend-template-thinkorswim-scanner.563/post-26623

and the other condition is

Code:
def conditionOne = Average(close, 7) / Average(close, 65) >= 1.05;
plot x = conditionOne;

Both of these scripts are included in the scanner together with the script for the Arrows to be plotted as shown above

I did a test, and when I removed the Mark Minervini trend condition, and did another scan, FB is able to be scanned out.

I am not sure if I should add the Mark Minervini script into the script for the arrows to be plotted?

Request some help.
Thanks
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
317 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

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?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top