Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Code help Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
RC-EQUITIES
Posted : Wednesday, July 18, 2018 2:54:32 PM
Registered User
Joined: 2/15/2012
Posts: 25

Hi,  On a weekly chart, after a stock has posted its Highest Weekly close, I am looking for the next 3 weeks close to be lower, followed by the uptrend to resume.  Is it possible to write a code to identity that criteria?

Bruce_L
Posted : Wednesday, July 18, 2018 2:58:52 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

There are lots of different ways I could interpret this. Maybe something like the following using a weekly time frame?

C > C1 AND TrueInRow(C1 < C2, 3) = 3 AND C4 > MAXC47.5



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
RC-EQUITIES
Posted : Wednesday, July 18, 2018 3:56:40 PM
Registered User
Joined: 2/15/2012
Posts: 25

Thanks Bruce, thats exactly what i was looking for!  Is it possible to take this 1 step further?....After C > C1 AND TrueInRow(C1 < C2, 3) = 3 AND C4 > MAXC47.5

Afer that absolute weekly low, i'm looking for the next two weeks to be HIGHER
 
What i'm basically trying to do is find the absolute Weekly lows following what you just wrote, then want to see 2 WEEKS up in a row ...hope that makes sense
Bruce_L
Posted : Wednesday, July 18, 2018 4:03:49 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

So the following?

TrueInRow(C > C1, 2) = 2 AND TrueInRow(C2 < C3, 3) = 3 AND C5 > MAXC46.6



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
edw168
Posted : Monday, July 23, 2018 10:28:14 AM
Registered User
Joined: 12/1/2014
Posts: 7

Stock up 5 weeks or more in a roll, with a pullback <15%

I am looking for the stock has been up 5 weeks or more in a roll, and now in a pullback back of less than 15%.

How to write a code for this?

 

Thanks

Eddie

Bruce_L
Posted : Monday, July 23, 2018 11:10:23 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

So is the pullback just on the current bar (set to weekly for weeks)?

.85 * C1 < C AND C < C1 AND TrueInRow(C1 > C2, 5) = 5

Or are you interested in something else (such as based on highs instead of closes and/or pullback over multiple bars)?



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
edw168
Posted : Monday, July 23, 2018 11:43:30 AM
Registered User
Joined: 12/1/2014
Posts: 7

The pullback from the highest price from the last up week and also like to see the total gains for the 5week up greater 40%.

 

Thanks

Bruce_L
Posted : Monday, July 23, 2018 1:54:45 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

The 5 bar rise can happen up to 20 bars ago (use a weekly time frame).

IIF(TrueInRow(H1 > H2, 5) = 5, IIF(H1 >= MAXH1 AND H1 > 1.4 * LEAST(MINL5.1, C6), H1, C + C), IIF(TrueInRow(H2 > H3, 5) = 5, IIF(H2 >= MAXH2 AND H2 > 1.4 * LEAST(MINL5.2, C7), H2, C + C), IIF(TrueInRow(H3 > H4, 5) = 5, IIF(H3 >= MAXH3 AND H3 > 1.4 * LEAST(MINL5.3, C8), H3, C + C), IIF(TrueInRow(H4 > H5, 5) = 5, IIF(H4 >= MAXH4 AND H4 > 1.4 * LEAST(MINL5.4, C9), H4, C + C), IIF(TrueInRow(H5 > H6, 5) = 5, IIF(H5 >= MAXH5 AND H5 > 1.4 * LEAST(MINL5.5, C10), H5, C + C), IIF(TrueInRow(H6 > H7, 5) = 5, IIF(H6 >= MAXH6 AND H6 > 1.4 * LEAST(MINL5.6, C11), H6, C + C), IIF(TrueInRow(H7 > H8, 5) = 5, IIF(H7 >= MAXH7 AND H7 > 1.4 * LEAST(MINL5.7, C12), H7, C + C), IIF(TrueInRow(H8 > H9, 5) = 5, IIF(H8 >= MAXH8 AND H8 > 1.4 * LEAST(MINL5.8, C13), H8, C + C), IIF(TrueInRow(H9 > H10, 5) = 5, IIF(H9 >= MAXH9 AND H9 > 1.4 * LEAST(MINL5.9, C14), H9, C + C), IIF(TrueInRow(H10 > H11, 5) = 5, IIF(H10 >= MAXH10 AND H10 > 1.4 * LEAST(MINL5.10, C15), H10, C + C), IIF(TrueInRow(H11 > H12, 5) = 5, IIF(H11 >= MAXH11 AND H11 > 1.4 * LEAST(MINL5.11, C16), H11, C + C), IIF(TrueInRow(H12 > H13, 5) = 5, IIF(H12 >= MAXH12 AND H12 > 1.4 * LEAST(MINL5.12, C17), H12, C + C), IIF(TrueInRow(H13 > H14, 5) = 5, IIF(H13 >= MAXH13 AND H13 > 1.4 * LEAST(MINL5.13, C18), H13, C + C), IIF(TrueInRow(H14 > H15, 5) = 5, IIF(H14 >= MAXH14 AND H14 > 1.4 * LEAST(MINL5.14, C19), H14, C + C), IIF(TrueInRow(H15 > H16, 5) = 5, IIF(H15 >= MAXH15 AND H15 > 1.4 * LEAST(MINL5.15, C20), H15, C + C), IIF(TrueInRow(H16 > H17, 5) = 5, IIF(H16 >= MAXH16 AND H16 > 1.4 * LEAST(MINL5.16, C21), H16, C + C), IIF(TrueInRow(H17 > H18, 5) = 5, IIF(H17 >= MAXH17 AND H17 > 1.4 * LEAST(MINL5.17, C22), H17, C + C), IIF(TrueInRow(H18 > H19, 5) = 5, IIF(H18 >= MAXH18 AND H18 > 1.4 * LEAST(MINL5.18, C23), H18, C + C), IIF(TrueInRow(H19 > H20, 5) = 5, IIF(H19 >= MAXH19 AND H19 > 1.4 * LEAST(MINL5.19, C24), H19, C + C), IIF(TrueInRow(H20 > H21, 5) = 5, IIF(H20 >= MAXH20 AND H20 > 1.4 * LEAST(MINL5.20, C25), H20, C + C), C + C))))))))))))))))))))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.