Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

help with writing an indicator formula Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
JA5
Posted : Monday, March 5, 2012 3:05:31 PM
Registered User
Joined: 7/25/2011
Posts: 17
Can you please help me with expanding the indicator which you created for me above? The indicator requirements are as follows:
Definition: 
   ST = Moving Linear Regression = 20
  LT = Moving Linear Regression = 80

Conditions for Positive Screening:
1)      Relative Strength indicator >= 20 day moving average
2)      Last Price > Par Sar (0.02, 0.07)
3)      LT >= (LT(prior bar) x 0.995)
4)      Either:
a.       Last Price/ST <= 1.015; or
b.      Last Price/LT <= 1.015; or
5)      The volume on at least one of the last 10 trading bars is > (20 day moving avg X 1.25)
6)      20 day average daily volume X Price > $1million
7)      20 day average daily volume > 150,000 shares
JA5
Posted : Monday, March 5, 2012 3:06:29 PM
Registered User
Joined: 7/25/2011
Posts: 17
sorry, this is a new indicator - obviously nothing above,  just using the same ST and LT definitions as previously used in another formula you wrote for me in Assistance needed for Screening conditions for Moving Linear Regression.  thanks.
Bruce_L
Posted : Monday, March 5, 2012 3:26:41 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (JA5)
1)      Relative Strength indicator >= 20 day moving average
2)      Last Price > Par Sar (0.02, 0.07)

Neither of these can be created using a Condition Formula. You would need to click on the indicators and select Create Conditions to create Conditions for these. You could then include these Conditions in the same Scan as your other Condition.

Indicators, Sorting & Scanning

QUOTE (JA5)
3)      LT >= (LT(prior bar) x 0.995)
4)      Either:
a.       Last Price/ST <= 1.015; or
b.      Last Price/LT <= 1.015; or
5)      The volume on at least one of the last 10 trading bars is > (20 day moving avg X 1.25)
6)      20 day average daily volume X Price > $1million
7)      20 day average daily volume > 150,000 shares

AVGC80 + 39.5 * (39.5 * C + 38.5 * C1 + 37.5 * C2 + 36.5 * C3 + 35.5 * C4 + 34.5 * C5 + 33.5 * C6 + 32.5 * C7 + 31.5 * C8 + 30.5 * C9 + 29.5 * C10 + 28.5 * C11 + 27.5 * C12 + 26.5 * C13 + 25.5 * C14 + 24.5 * C15 + 23.5 * C16 + 22.5 * C17 + 21.5 * C18 + 20.5 * C19 + 19.5 * C20 + 18.5 * C21 + 17.5 * C22 + 16.5 * C23 + 15.5 * C24 + 14.5 * C25 + 13.5 * C26 + 12.5 * C27 + 11.5 * C28 + 10.5 * C29 + 9.5 * C30 + 8.5 * C31 + 7.5 * C32 + 6.5 * C33 + 5.5 * C34 + 4.5 * C35 + 3.5 * C36 + 2.5 * C37 + 1.5 * C38 + 0.5 * C39 - 0.5 * C40 - 1.5 * C41 - 2.5 * C42 - 3.5 * C43 - 4.5 * C44 - 5.5 * C45 - 6.5 * C46 - 7.5 * C47 - 8.5 * C48 - 9.5 * C49 - 10.5 * C50 - 11.5 * C51 - 12.5 * C52 - 13.5 * C53 - 14.5 * C54 - 15.5 * C55 - 16.5 * C56 - 17.5 * C57 - 18.5 * C58 - 19.5 * C59 - 20.5 * C60 - 21.5 * C61 - 22.5 * C62 - 23.5 * C63 - 24.5 * C64 - 25.5 * C65 - 26.5 * C66 - 27.5 * C67 - 28.5 * C68 - 29.5 * C69 - 30.5 * C70 - 31.5 * C71 - 32.5 * C72 - 33.5 * C73 - 34.5 * C74 - 35.5 * C75 - 36.5 * C76 - 37.5 * C77 - 38.5 * C78 - 39.5 * C79) / 42660 >= .995 * (AVGC80 + 39.5 * (39.5 * C + 38.5 * C1 + 37.5 * C2 + 36.5 * C3 + 35.5 * C4 + 34.5 * C5 + 33.5 * C6 + 32.5 * C7 + 31.5 * C8 + 30.5 * C9 + 29.5 * C10 + 28.5 * C11 + 27.5 * C12 + 26.5 * C13 + 25.5 * C14 + 24.5 * C15 + 23.5 * C16 + 22.5 * C17 + 21.5 * C18 + 20.5 * C19 + 19.5 * C20 + 18.5 * C21 + 17.5 * C22 + 16.5 * C23 + 15.5 * C24 + 14.5 * C25 + 13.5 * C26 + 12.5 * C27 + 11.5 * C28 + 10.5 * C29 + 9.5 * C30 + 8.5 * C31 + 7.5 * C32 + 6.5 * C33 + 5.5 * C34 + 4.5 * C35 + 3.5 * C36 + 2.5 * C37 + 1.5 * C38 + 0.5 * C39 - 0.5 * C40 - 1.5 * C41 - 2.5 * C42 - 3.5 * C43 - 4.5 * C44 - 5.5 * C45 - 6.5 * C46 - 7.5 * C47 - 8.5 * C48 - 9.5 * C49 - 10.5 * C50 - 11.5 * C51 - 12.5 * C52 - 13.5 * C53 - 14.5 * C54 - 15.5 * C55 - 16.5 * C56 - 17.5 * C57 - 18.5 * C58 - 19.5 * C59 - 20.5 * C60 - 21.5 * C61 - 22.5 * C62 - 23.5 * C63 - 24.5 * C64 - 25.5 * C65 - 26.5 * C66 - 27.5 * C67 - 28.5 * C68 - 29.5 * C69 - 30.5 * C70 - 31.5 * C71 - 32.5 * C72 - 33.5 * C73 - 34.5 * C74 - 35.5 * C75 - 36.5 * C76 - 37.5 * C77 - 38.5 * C78 - 39.5 * C79) / 42660) AND (C <= 1.015 * (AVGC20 + 9.5 * (9.5 * C + 8.5 * C1 + 7.5 * C2 + 6.5 * C3 + 5.5 * C4 + 4.5 * C5 + 3.5 * C6 + 2.5 * C7 + 1.5 * C8 + 0.5 * C9 - 0.5 * C10 - 1.5 * C11 - 2.5 * C12 - 3.5 * C13 - 4.5 * C14 - 5.5 * C15 - 6.5 * C16 - 7.5 * C17 - 8.5 * C18 - 9.5 * C19) / 665) OR C <= 1.015 * (AVGC80 + 39.5 * (39.5 * C + 38.5 * C1 + 37.5 * C2 + 36.5 * C3 + 35.5 * C4 + 34.5 * C5 + 33.5 * C6 + 32.5 * C7 + 31.5 * C8 + 30.5 * C9 + 29.5 * C10 + 28.5 * C11 + 27.5 * C12 + 26.5 * C13 + 25.5 * C14 + 24.5 * C15 + 23.5 * C16 + 22.5 * C17 + 21.5 * C18 + 20.5 * C19 + 19.5 * C20 + 18.5 * C21 + 17.5 * C22 + 16.5 * C23 + 15.5 * C24 + 14.5 * C25 + 13.5 * C26 + 12.5 * C27 + 11.5 * C28 + 10.5 * C29 + 9.5 * C30 + 8.5 * C31 + 7.5 * C32 + 6.5 * C33 + 5.5 * C34 + 4.5 * C35 + 3.5 * C36 + 2.5 * C37 + 1.5 * C38 + 0.5 * C39 - 0.5 * C40 - 1.5 * C41 - 2.5 * C42 - 3.5 * C43 - 4.5 * C44 - 5.5 * C45 - 6.5 * C46 - 7.5 * C47 - 8.5 * C48 - 9.5 * C49 - 10.5 * C50 - 11.5 * C51 - 12.5 * C52 - 13.5 * C53 - 14.5 * C54 - 15.5 * C55 - 16.5 * C56 - 17.5 * C57 - 18.5 * C58 - 19.5 * C59 - 20.5 * C60 - 21.5 * C61 - 22.5 * C62 - 23.5 * C63 - 24.5 * C64 - 25.5 * C65 - 26.5 * C66 - 27.5 * C67 - 28.5 * C68 - 29.5 * C69 - 30.5 * C70 - 31.5 * C71 - 32.5 * C72 - 33.5 * C73 - 34.5 * C74 - 35.5 * C75 - 36.5 * C76 - 37.5 * C77 - 38.5 * C78 - 39.5 * C79) / 42660)) AND MAXV10 > 1.25 * AVGV20 AND AVGV20 * C > 1000000 AND AVGV20 > 150000

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
JA5
Posted : Tuesday, March 6, 2012 7:43:37 AM
Registered User
Joined: 7/25/2011
Posts: 17
TC2000 doesn't allow me to create a condition for Relative Strength > 20day mov avg.  Not sure how to deal with that.  suggestion please.
Bruce_L
Posted : Tuesday, March 6, 2012 7:59:25 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I had forgotten that you couldn't click on Relative Strength to create a Condition. I do not have what I would consider a reasonable workaround.

You could force the program to give you prompts for the Conditions by adding a 1-Period Simple Moving Average to the RS and a 20-Period Simple Moving Average to the 1-Period Simple Moving Average, but the resulting Condition would not actually work (there's a reason Create Condition isn't an option when clicking on Relative Strength).

I do not know of a practical automated method of writing Relative Strength PCFs in either verison of TC2000 as the Personal Criteria Formula Language does not have syntax for referencing other symbols. You may wish to review the following for a semi-automated technique for creating Relative Strength in a PCF:

RSMA PCFs
Indexes in PCF's

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
JA5
Posted : Tuesday, March 6, 2012 8:15:14 AM
Registered User
Joined: 7/25/2011
Posts: 17
is there a way to plot the formula you have above on a chart? 
Bruce_L
Posted : Tuesday, March 6, 2012 8:24:27 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Use it as the formula in a Custom PCF % True indicator (the same indicator we used in the technique to test if a formula is true over a period of several days in the Assistance needed for Screening conditions for Moving Linear Regression topic).

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