NexusFi: Find Your Edge


Home Menu

 





Scan for stocks above or below simple moving average


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one apollo23 with 6 posts (1 thanks)
    2. looks_two trepidation with 5 posts (9 thanks)
    3. looks_3 teo2020 with 2 posts (0 thanks)
    4. looks_4 appplejack003 with 1 posts (0 thanks)
    1. trending_up 17,651 views
    2. thumb_up 10 thanks given
    3. group 3 followers
    1. forum 12 posts
    2. attach_file 18 attachments




 
Search this Thread

Scan for stocks above or below simple moving average

  #11 (permalink)
appplejack003
Toronto,Canada
 
Posts: 1 since May 2020
Thanks Given: 1
Thanks Received: 0


trepidation View Post
Hi, here's your full suite for the indicator.


Watchlist Indicator
 
Code
input ma_length = 20;
def sma = SimpleMovingAvg(length=ma_length);
def bearish = open > sma && close < sma;
def bullish = close > sma && open < sma;

plot signal = if bullish then 1 else if bearish then 0 else -1;

signal.AssignValueColor(if signal == 1 then Color.Green else if signal == 0 then Color.Red else Color.Black);
AssignBackgroundCOlor(if signal == 1 then Color.Green else if signal == 0 then Color.Red else Color.Black);

Thank you for this Watchlist column,

By the way, I tried changing SMA to EMA but simple swapping "SimpleMovingAvg" with "ExpAverage"didn't work for me. I'm not very experienced with Thinkscript.

Also how could I set color "yellow" to show when the price is trading between 8EMA and 21EMA?

Thank you!!

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
How to apply profiles
Traders Hideout
MC PL editor upgrade
MultiCharts
NexusFi Journal Challenge - May 2024
Feedback and Announcements
Cheap historycal L1 data for stocks
Stocks and ETFs
 
  #12 (permalink)
teo2020
chicago
 
Posts: 3 since Jan 2020
Thanks Given: 1
Thanks Received: 0

Hello everybody.

I am looking for script to scan stocks in TOS, that the price is above 50EMA less than 10% or 5%. Is there anyone who can share it with me. Thank you so much.

Reply With Quote
  #13 (permalink)
teo2020
chicago
 
Posts: 3 since Jan 2020
Thanks Given: 1
Thanks Received: 0


Hello everybody.

I am looking for script to scan stocks in TOS, that the price is above month or week open less than 10% or 5% from the open. Is there anyone who can share it with me. Thank you so much.

Reply With Quote




Last Updated on March 9, 2022


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts