The beginning of a Stock uptrend movement?

I

Idan

New member
Hi.

If I want to catch the whole move of the upward movement from the beginning movement of any stock, does anyone have any code for this? Or at least can tell me what parameters I need to set in a stock scanner to catch such cases? And how can I set this as an alert? Whenever there is such a thing, I want immediately be notified by email.
I would like to get your help please.

Thank you all!!!

idan.
 
Last edited:
E

ezrollin

Member
What are some good ways of scanning that we are in an uptrend? (maybe even specifically with using the standard deviation channel study)?? thanks
 
E

ezrollin

Member
I have been thinking of 8/34 ema cross or something, positive slope of like a 20 ema on daily, close over 20 ema on daily, positive momentum on weekly macd (less negative momentum), etc..
I just dont know how to figure something working with the standard deviation channel.
I want to use the standard deviation channel because I have a scan script for it.
 
Last edited:
E

ezrollin

Member
I went with this until I can figure out the Standard Deviation Channel

MACD()."Diff" is greater than MACD()."Diff"[1]
 
rad14733

rad14733

Active member
VIP
I have been playing around with the ZigZagStepPattern that is a pattern built into TOS and it seems to work surprisingly well... In fact, I was up late last night working on a strategy based on the pattern... Unlike the ZigZagHighLow Study it doesn't seem to repaint but more testing is forthcoming...
 
H

HighBredCloud

Well-known member
VIP
MACD needs to be positive...RSI setting needs to be ABOVE 60 on 1 hour...ABOVE 40 on the DAILY...Even scanning for 50 100 or 200 SMA/EMA on the DAILY wouldn't hurt...Here is actually a really nice scanner that catches nice moves on the DAILY...as well as lower timeframes...just add this to the bottom of the script and comment out the ones you don't want:

https://usethinkscript.com/threads/slim-ribbon-indicator-for-thinkorswim.245/page-3#post-21700

Code:
#plot results = bullish;
#plot results = bearish;
#plot results = both; include both bullish and bearish

plot resultsChanged = bullish and bullish[0] != bullish[1];
#plot resultsChanged = bearish and bearish[0] != bearish[1];
 
Last edited:
E

ezrollin

Member
Without modifying that, I get 7568 results :p

Let me show you what I'm working on...
5min scan for day trading stocks that have dipped to lower than the standard deviation channel, but have positive macd momentum on the 1hr (uptrend) and 5min macd is changing positive.

https://filebin.net/nahntg6elretqkli
I just want to narrow it down to stocks that have upwards moving standard deviations but I cant use ADX because there wouldnt be any results...
I'll figure a compromise

hmm... using my dip buy standard deviation scan, i only get EA and ADSK, RSI is at 50 and 63 on daily (so very bullish but in cheap areas is how I read that)!
 
Last edited:
H

HighBredCloud

Well-known member
VIP
Without modifying that, I get 7568 results :p

Let me show you what I'm working on...
5min scan for day trading stocks that have dipped to lower than the standard deviation channel, but have positive macd momentum on the 1hr (uptrend) and 5min macd is changing positive.

https://filebin.net/nahntg6elretqkli
I just want to narrow it down to stocks that have upwards moving standard deviations but I cant use ADX because there wouldnt be any results...
I'll figure a compromise
I also use the 5 min chart to dial in my entries...I would use the SLIM scanner on the DAILY with the ResultsChanged instead of the Bullish/Bearish condition...From there you can make the secondary instance of the SLIM scanner to scan for the same thing on the 5 min timeframe...or use other scanners as filter scanners such as the MACD or RSI...In my opinion the RSI is more important than the MACD on the 1 hour timeframe...you can also use a second instance of the RSI scanner on the 30 min timeframe to also be up ABOVE 60 RSI when going long or BELOW 40 RSI when shorting...

When you get your momentum scanner working post it here...I am also looking for a good momentum scanner myself...I was toying with the idea of making a scanner that catches 2-3 candle runners...but my coding skills are limited...

Going back to the basics when scanning for stocks to look for MA cross overs such as 50/200 or 13/50...Golden Cross and or scanning for Death Cross on the DAILY...all of these should pull up trending stocks in one direction...making your life trading them easier.
 
E

ezrollin

Member
Yes, I also agree, RSI is more reliable than MACD. Just had that convo the other day actually
 
BenTen

BenTen

Administrative
Staff
VIP
@rad14733 Sorry to burst your bubble but the ZigZagStepPattern does repaint :(
 
rad14733

rad14733

Active member
VIP
@rad14733 Sorry to burst your bubble but the ZigZagStepPattern does repaint :(
It very well may... I just haven't seen it do so in what limited realtime trading I've watched it with... I only had it on a single option the other day and it was moving upward far too slowly to repaint... But considering how it relies partially on ZigZagHighLow it would be entirely within the realm of probability... And nothing repaints with backtesting strategies and I've found TOS OnDemand to be nearly worthless... :cautious:
 
H

HighBredCloud

Well-known member
VIP
Yes, I also agree, RSI is more reliable than MACD. Just had that convo the other day actually
Try searching for 60 RSI on 1 hour and 30min...along with RSI 40 on the DAILY...see if that helps out...

The SLIM scanner seems to pull great results...combine that with ORB and you should have a nice set to of stocks to chose from...I think last week sortable ORB watchlist column was made...It's in one of the ORB threads. That should help you narrow down your pick from the list generated by the scanner.
 
V

vandna.fin

New member
VIP
i am trying to make a scan for candlestick ZigZagStepPattern .its giving me error. Can somebody help me to make it ?
 
BenTen

BenTen

Administrative
Staff
VIP
@vandna.fin Like I was telling @rad14733, since the ZigZagStepPattern is a repainting indicator, you will need to adjust the lookback period to more than 1.



I have no issue with it using the scanner.

 
markos

markos

Well-known member
VIP
MACD needs to be positive...RSI setting needs to be ABOVE 60 on 1 hour...ABOVE 40 on the DAILY...Even scanning for 50 100 or 200 SMA/EMA on the DAILY wouldn't hurt...Here is actually a really nice scanner that catches nice moves on the DAILY...as well as lower timeframes...just add this to the bottom of the script and comment out the ones you don't want:

https://usethinkscript.com/threads/slim-ribbon-indicator-for-thinkorswim.245/page-3#post-21700

Code:
#plot results = bullish;
#plot results = bearish;
#plot results = both; include both bullish and bearish

plot resultsChanged = bullish and bullish[0] != bullish[1];
#plot resultsChanged = bearish and bearish[0] != bearish[1];
@HighBredCloud thanks for bringing the SlimRibbon up. As a position investor I find it invaluable. Steve Miller created this indicator when he worked in the old OEX pits at the CBOT. SLM was his floor badge and hence, where the name came from. In a chat room a few yrs back he was saying that it should work on practically any time frame. See his video at his website, askslim.com.

@dougn do you have a scan and watchlist columns for this?
 
dougn

dougn

Member
2019 Donor
@HighBredCloud thanks for bringing the SlimRibbon up. As a position investor I find it invaluable. Steve Miller created this indicator when he worked in the old OEX pits at the CBOT. SLM was his floor badge and hence, where the name came from. In a chat room a few yrs back he was saying that it should work on practically any time frame. See his video at his website, askslim.com.

@dougn do you have a scan and watchlist columns for this?
Sure. Here's the watchlist column. For the scan I just use the study and direct the scan to the Slim Beta study and then adjust settings to what I'm interested in. But the column script should also work for the scan.

Code:
###############SLIM Column by easycators.com ####################
#Slims Trend and Momo

input price = close;

input superfast_length = 8;

input fast_length = 13;

input slow_length = 21;

input displace = 0;


def mov_avg8 = ExpAverage(price[-displace], superfast_length);

def mov_avg13 = ExpAverage(price[-displace], fast_length);

def mov_avg21 = ExpAverage(price[-displace], slow_length);


#moving averages

def Superfast = mov_avg8;

def Fast = mov_avg13;

def Slow = mov_avg21;


def buy = mov_avg8 > mov_avg13 and mov_avg13 > mov_avg21 and low > mov_avg8;

def stopbuy = mov_avg8 <= mov_avg13;

def buynow = !buy[1] and buy;

def buysignal = CompoundValue(1, if buynow and !stopbuy then 1 else if buysignal[1]==1 and stopbuy then 0 else buysignal[1], 0);


def Buy_Signal = buysignal[1] == 0 and buysignal==1;

def Momentum_Down = buysignal[1] ==1 and buysignal==0;


def sell = mov_avg8 < mov_avg13 and mov_avg13 < mov_avg21 and high < mov_avg8;

def stopsell = mov_avg8 >= mov_avg13;

def sellnow = !sell[1] and sell;

def sellsignal = CompoundValue(1, if sellnow and !stopsell then 1 else if sellsignal[1]==1 and stopsell then 0 else sellsignal[1], 0);


def Sell_Signal = sellsignal[1] ==0 and sellsignal;

def Momentum_Up = sellsignal[1]==1 and sellSignal==0;

# when using this as a custom scan, change the word plot to def
# then remove the '#' from in front of one of the "plot Scan" statements below
def Colorbars = if buysignal ==1 then 1 else if sellsignal ==1 then -1 else if buysignal ==0 or sellsignal==0 then 0 else 0;

# use this first Scan plot for SLM Ribbon Momentum UP
#plot Scan = if Colorbars == 1 then yes else no;

# use this second Scan plot for SLM Ribbon Momentum DOWN
#plot Scan = if Colorbars == -1 then yes else no;

# use this third Scan plot for SLM Ribbon Momentum FLAT
#plot Scan = if Colorbars == 0 then yes else no;

plot signal =
         if buy_signal then 4
    #else if momentum_up then 3
    #else if momentum_down then 2
    else if sell_signal then 1
    else 0;

signal.assignValueColor(
         if buy_signal then color.light_green
    else if sell_signal then color.light_red
    else if momentum_Up then color.dark_green
    else if momentum_Down then color.dark_red
    else color.black
);

assignBackgroundColor(
         if buy_signal then color.light_green
    else if sell_signal then color.light_red
    else if momentum_Up then color.DARK_GREEN
    else if momentum_Down then color.dark_red
    else color.black
);
P.S. Alot of problems now with "loading' that I didn't have before last week. This and other WL of my custom stuff has been effected. They tell me it may be due to some "adjustments" made in preparation for this weekends update.
 
dougn

dougn

Member
2019 Donor
This is another version of the SLIM watchlist column that indicates the current status of the indicator. Useful in different ways but what I have found is placing 2 or 3 columns together of different time frames its easy to spot what you might be looking for such as stocks in your watchlist that are in a long term uptrend but have paused shorter term.

Code:
#### SLIM Current Status ####
input price = close;

input superfast_length = 8;

input fast_length = 13;

input slow_length = 21;

input displace = 0;


def mov_avg8 = ExpAverage(price[-displace], superfast_length);

def mov_avg13 = ExpAverage(price[-displace], fast_length);

def mov_avg21 = ExpAverage(price[-displace], slow_length);


#moving averages

def Superfast = mov_avg8;

def Fast = mov_avg13;

def Slow = mov_avg21;


def buy = mov_avg8 > mov_avg13 and mov_avg13 > mov_avg21 and low > mov_avg8;

def stopbuy = mov_avg8 <= mov_avg13;

def buynow = !buy[1] and buy;

def buysignal = CompoundValue(1, if buynow and !stopbuy then 1 else if buysignal[1]==1 and stopbuy then 0 else buysignal[1], 0);


def Buy_Signal = buysignal[1] == 0 and buysignal==1;

def Momentum_Down = buysignal[1] ==1 and buysignal==0;


def sell = mov_avg8 < mov_avg13 and mov_avg13 < mov_avg21 and high < mov_avg8;

def stopsell = mov_avg8 >= mov_avg13;

def sellnow = !sell[1] and sell;

def sellsignal = CompoundValue(1, if sellnow and !stopsell then 1 else if sellsignal[1]==1 and stopsell then 0 else sellsignal[1], 0);


def Sell_Signal = sellsignal[1] ==0 and sellsignal;

def Momentum_Up = sellsignal[1]==1 and sellSignal==0;

# when using this as a custom scan, change the word plot to def
# then remove the '#' from in front of one of the "plot Scan" statements below
def Colorbars = if buysignal ==1 then 1 else if sellsignal ==1 then -1 else if buysignal ==0 or sellsignal==0 then 0 else 0;

# use this first Scan plot for SLM Ribbon Momentum UP
#plot Scan = if Colorbars == 1 then yes else no;

# use this second Scan plot for SLM Ribbon Momentum DOWN
#plot Scan = if Colorbars == -1 then yes else no;

# use this third Scan plot for SLM Ribbon Momentum FLAT
plot Scan = if Colorbars == 0 then yes else no;

assignBackgroundColor(if Colorbars == 1 then color.GREEN else if Colorbars == -1 then color.RED else color.YELLOW);
scan.setDefaultColor(color.black);
 

Similar threads

Top