Branch
Member
Yes that is how it worksSo if CCI is rising and Volume % is less than 50 = Bullish
If CCI is dropping and volume % is more than 50 = Bearish
Is that how it is meant to be read? Thanks
Yes that is how it worksSo if CCI is rising and Volume % is less than 50 = Bullish
If CCI is dropping and volume % is more than 50 = Bearish
Is that how it is meant to be read? Thanks
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
These are two different screeners, first one looks for long entries. Both of conditions must be met for a result, it should not show me if only one condition is met.
Long
CCI 8 5min < -135 provided at the same time CCI 34 30min > +100
and this one looks for short entries
Short
CCI 8 5min > +135 provided at the same time CCI 34 30min < -100
Ruby:#Long #CCI 8 5min < -135 provided at the same time CCI 34 30min > +100 #and this one looks for short entries #Short #CCI 8 5min > +135 provided at the same time CCI 34 30min < -100 script cci_agg { input length = 14; input agg = AggregationPeriod.FIVE_MIN; def c = close(period = agg); def h = high(period = agg); def l = low(period = agg); def price = c + l + h; def linDev = LinDev(price, length); plot CCI = if linDev == 0 then 0 else (price - Average(price, length)) / linDev / 0.015; } plot long = cci_agg(8) < -135 and cci_agg(34, agg = "THIRTY_MIN") > +100; plot short = cci_agg(8) > +135 and cci_agg(34, agg = "THIRTY_MIN") < -100;
I'm a little confused, I'd like to screen stocks based on the script and the condition, it is two different screeners the first one for long and the second one for short. For eg - I looked up the inbuilt screener but im still not confident about it. This is for long https://tos.mx/IMYwPKCSee if this helps
what speeyz posted will work,I'm a little confused, I'd like to screen stocks based on the script and the condition, it is two different screeners the first one for long and the second one for short. For eg - I looked up the inbuilt screener but im still not confident about it. This is for long https://tos.mx/IMYwPKC
I get an error called secondary period not allowed: 30m.what speeyz posted will work,
make 2 copies of sleepyz code
place a # in front of a different plot, in each copy, to disable one of them ( i prefer this over deleting things)
.....
plot long = cci_agg(8) < -135 and cci_agg(34, agg = "THIRTY_MIN") > +100;
#plot short = cci_agg(8) > +135 and cci_agg(34, agg = "THIRTY_MIN") < -100;
#plot long = cci_agg(8) < -135 and cci_agg(34, agg = "THIRTY_MIN") > +100;
plot short = cci_agg(8) > +135 and cci_agg(34, agg = "THIRTY_MIN") < -100;
I get an error called secondary period not allowed: 30m.
If you want to mirror @SleepyZ results; you need to mirror his settings.Why do I get different results than you?
Start a new thread and receive assistance from our community.
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.
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.