Scanner for futures in a Bear Market

Branch

Member
VIP
Do we (useThinkScript family) have a scanner for futures that will show futures that are in a Bear market?
 

Branch

Member
VIP
Hi BenTen, For me when price is below the simple moving averages of 21MA and 35MA AND the RSI based on 14 period that is below 50%.
I currently use these labels to assist me with identifying bearish sentiment but would like to have my watch list provide this information.

Code:
input length1 = 21;
input length2 = 35;
input over_Bought = 80;
input over_Sold = 20;
input price = close;
input averageType = AverageType.SIMPLE;
input showBreakoutSignals = no;
input averageType1 = AverageType.SIMPLE;
input averageType2 = AverageType.SIMPLE;
input averageType3 = AverageType.SIMPLE;
input averageType4 = AverageType.SIMPLE;
input crossingType = {default above, below};

def NetChgAvg = MovingAverage(averageType, price - price[1], length1);
def TotChgAvg = MovingAverage(averageType, AbsValue(price - price[1]), length1);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;
def avg1 = MovingAverage(averageType1, price, length1);
def avg2 = MovingAverage(averageType2, price, length2);

plot RSI = 50 * (ChgRatio + 1);
plot OverSold = over_Sold;
plot OverBought = over_Bought;
plot UpSignal = if RSI crosses above OverSold then OverSold else Double.NaN;
plot DownSignal = if RSI crosses below OverBought then OverBought else Double.NaN;

#RSI Labes above midline
AddLabel (yes, if RSI  between 96 and 100 then "L1 Over-Consider Exit  96%-100%"  else "", Color.RED);
AddLabel (yes, if RSI  between 90 and 95.9999 then "L2 Over-90%-95%"  else "", Color.YELLOW);
AddLabel (yes, if RSI  between 79.99991 and 89.9999 then "L3 Over-79%-89%"  else "", Color.cyan);
AddLabel (yes, if RSI  between 70 and 79.9999 then "RSI 70%Range"  else "", Color.GREEN);
AddLabel (yes, if RSI  between 60 and 69.9999 then "RSI 60%Range "  else "", Color.GREEN);
AddLabel (yes, if RSI  between 51 and 59.9999 then "RSI 50%Range"  else "", Color.GREEN);
AddLabel (yes, if RSI  between 50 and 50.9999 then "RSI 50%Range"  else "", Color.YELLOW);

#RSI Labels below midline
AddLabel (yes, if RSI  between 40 and 49.9999 then "RSI 40%Range"  else "", Color.RED);
AddLabel (yes, if RSI  between 30 and 39.9999 then "RSI 30%Range"  else "", Color.RED);
AddLabel (yes, if RSI  between 21 and 29.9999 then "RSI 20%Range"  else "", Color.RED);
AddLabel (yes, if RSI  between 10 and 20.9999 then "L3 Under-11%-20%"  else "", Color.cyan);
AddLabel (yes, if RSI  between 6 and 9.9999 then "L2 Under-6%-10%"  else "", Color.YELLOW);
AddLabel (yes, if RSI  between 0 and 5.9999 then "L1 Under-Consider Exit  0%-6%"  else "", Color.RED);

#MA Aligned
AddLabel (yes, if close < avg1 and close < avg2  then "(SELL)" + "" else "", Color.RED);
AddLabel (yes, if close > avg1 and close > avg2  then "(BUY)" + "" else "", Color.GREEN);

#Moving average labels
AddLabel (yes, if close < avg1 then "MA.21 SELL" + "" else "", Color.RED);
AddLabel (yes, if close > avg1 then "MA.21 BUY" + "" else "", Color.GREEN);
AddLabel (yes, if close < avg2 then "MA.35 SELL" + "" else "", Color.RED);
AddLabel (yes, if close > avg2 then "MA.35 BUY" + "" else "", Color.GREEN);
 
Last edited:

BenTen

Administrative
Staff member
Staff
VIP
Lifetime
You can easily set you a scanner based on those conditions you just listed.

For example: this condition will look for stocks closing below the 21 simple moving average.

hGMrhwe.png
 

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.
Top