Registered User Joined: 7/13/2014 Posts: 29
|
Hi,
I'd like to know the codes to make a
20-day simple moving average of volume for today is greater than 900
and
60-day simple moving average of close for today is greater than 1.
2. how do you write the code for
weekly close for 5 weeks ago
Daily Williams %R (1) for today is less than -5
Thank you in advance.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
20-day simple moving average of volume for today is greater than 900
and
60-day simple moving average of close for today is greater than 1.[/QUOTE]
Please try the following daily Condition Formula.
AVGV20 > 900 AND AVGC60 > 1
QUOTE (Rainbow Trader) weekly close for 5 weeks ago
You will need to set the time frame of the following Indicator Formula to weekly.
C5
QUOTE (Rainbow Trader) Daily Williams %R (1) for today is less than -5
Please try the following daily Condition Formula.
STOC1 < 95
Understanding Stochastics
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
Thank you sir!
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
About the weekly close, I need to compare the close today should be higher than 5 weeks ago. Do you know how to do this?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Make sure you are using a weekly time frame for this Condition Formula.
C > C5
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
If I use the weekly formula won't it affect the my daily conditions inside?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You can set the time frame of each condition in an EasyScan indipendently. So you could have a one weekly condition and several daily conditions.
If you really want to try a daily version of this, you could use the following instead.
C > C25
But this will be defining each week as 5 trading days instead of using calendar weeks like the weekly version.
Building a Scan with Multiple Conditions (7:29)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
Hi Bruce,
How can I make this a formula: 1% or 1x ATR% away from the 10 day MA?
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
Hi Bruce,
Can you translate this to me in a formula if possible?
(W%R(260) <-80)
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
QUOTE (Rainbow Trader) How can I make this a formula: 1% or 1x ATR% away from the 10 day MA?
Do you mean at least 1% or 1xATR away from the 10 day MA or at most 1% or 1xATR away from the 10 day MA?
What is the period of the ATR?
Is the MA simple or exponential?
Do you want one formula for % and one formula for ATR or do you want a single formula combining the two?
QUOTE (Rainbow Trader) (W%R(260) <-80)
STOC260 < 20
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
at least 1% or 1xATR away from the 10 day MA simple.
I need a formula combining the 2 for reference to my indicators.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following Condition Formula (it assumes the default 14 period ATR as plotted in TC2000 version 12.4).
ABS(C / AVGC10 - 1) >= .01 OR ABS(C - AVGC10) >= (AVGH14 - AVGL14) / 2 + (ABS(H - C1) + ABS(C1 - L) + ABS(H1 - C2) + ABS(C2 - L1) + ABS(H2 - C3) + ABS(C3 - L2) + ABS(H3 - C4) + ABS(C4 - L3) + ABS(H4 - C5) + ABS(C5 - L4) + ABS(H5 - C6) + ABS(C6 - L5) + ABS(H6 - C7) + ABS(C7 - L6) + ABS(H7 - C8) + ABS(C8 - L7) + ABS(H8 - C9) + ABS(C9 - L8) + ABS(H9 - C10) + ABS(C10 - L9) + ABS(H10 - C11) + ABS(C11 - L10) + ABS(H11 - C12) + ABS(C12 - L11) + ABS(H12 - C13) + ABS(C13 - L12) + ABS(H13 - C14) + ABS(C14 - L13)) / 28
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
Hi bruce how do I put this into formula.
ADX is greater than 25
C < avgc20 and/or stoc10 < 30
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
It is not possible to create the ADX portion as a formula. You will need to add the ADX to the chart and click on it to select Create Scan Condition (this is usually the better option anyway).
Create Conditions from Your Chart (5:25)
The other portion can be created as a Condition Formula by just changing the and/or to OR instead.
C < AVGC20 OR STOC10 < 30
You can then add both conditions to the same EasyScan.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
Hi Bruce,
Is it possible to place a hotkey for the 3 minute chart?
I'm also quite curious on your platinum membership. If ever can I get a 1 month free trial for that so that I can try what's in it?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
No, there isn't a way to set up your own hot key for a 3 minute chart in TC2000.
We do not offer a free trial for TC2000 Platinum, but we do offer a 30 day money back guarantee (on everything except the $9.25 per month non-professional exchange fee).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
Please brief me more about the 30 money back guarantee. How does it work ?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The following will explain it better than I could.
Offer Terms & Guarantee
But it basically boils down to getting your money back (with the exception of exchange fees) if you call in to cancel during the first 30 days.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
Hi bruce I need the computation of
o- c I am measuring the gap between the close and the open everyday for the past 14 days.
I also need to know the standard deviation of the the range or close - open range.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
If you want the 14 period simple moving average of the open minus the close:
AVGO14 - AVGC14
The 14 period standard deviation would be:
SQR(ABS((O - C) ^ 2 + (O1 - C1) ^ 2 + (O2 - C2) ^ 2 + (O3 - C3) ^ 2 + (O4 - C4) ^ 2 + (O5 - C5) ^ 2 + (O6 - C6) ^ 2 + (O7 - C7) ^ 2 + (O8 - C8) ^ 2 + (O9 - C9) ^ 2 + (O10 - C10) ^ 2 + (O11 - C11) ^ 2 + (O12 - C12) ^ 2 + (O13 - C13) ^ 2 - 14 * (AVGO14 - AVGC14) ^ 2) / 14)
If you want the 14 period simple moving average of the absolute difference between the open and the close:
(ABS(O - C) + ABS(O1 - C1) + ABS(O2 - C2) + ABS(O3 - C3) + ABS(O4 - C4) + ABS(O5 - C5) + ABS(O6 - C6) + ABS(O7 - C7) + ABS(O8 - C8) + ABS(O9 - C9) + ABS(O10 - C10) + ABS(O11 - C11) + ABS(O12 - C12) + ABS(O13 - C13)) / 14
The 14 period standard deviation would be:
SQR(ABS((O - C) ^ 2 + (O1 - C1) ^ 2 + (O2 - C2) ^ 2 + (O3 - C3) ^ 2 + (O4 - C4) ^ 2 + (O5 - C5) ^ 2 + (O6 - C6) ^ 2 + (O7 - C7) ^ 2 + (O8 - C8) ^ 2 + (O9 - C9) ^ 2 + (O10 - C10) ^ 2 + (O11 - C11) ^ 2 + (O12 - C12) ^ 2 + (O13 - C13) ^ 2 - 14 * ((ABS(O - C) + ABS(O1 - C1) + ABS(O2 - C2) + ABS(O3 - C3) + ABS(O4 - C4) + ABS(O5 - C5) + ABS(O6 - C6) + ABS(O7 - C7) + ABS(O8 - C8) + ABS(O9 - C9) + ABS(O10 - C10) + ABS(O11 - C11) + ABS(O12 - C12) + ABS(O13 - C13)) / 14) ^ 2) / 14)
Modelling Bollinger Bands (& Standard Deviation) in a TC PCF
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
Hi Bruce,
I need to know how to make a range stat or H-L for the past 30 days. Can you help me?
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
I need the average range of the last 30 days and the standard deviation of the range please.
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
Sorry please disregard the 2 messages.
The 30 day average range / Standard Deviation (30)
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Total range over the last 30 bars can be written as follows.
MAXH30 - MINL30
Average range over the last 30 bars can be written as follows.
AVGH30 - AVGL30
Average range over the last 30 bars divided by the standard deviation of range over the last 30 bars can be written as follows.
(AVGH30 - AVGL30) / SQR(ABS((H - L) ^ 2 + (H1 - L1) ^ 2 + (H2 - L2) ^ 2 + (H3 - L3) ^ 2 + (H4 - L4) ^ 2 + (H5 - L5) ^ 2 + (H6 - L6) ^ 2 + (H7 - L7) ^ 2 + (H8 - L8) ^ 2 + (H9 - L9) ^ 2 + (H10 - L10) ^ 2 + (H11 - L11) ^ 2 + (H12 - L12) ^ 2 + (H13 - L13) ^ 2 + (H14 - L14) ^ 2 + (H15 - L15) ^ 2 + (H16 - L16) ^ 2 + (H17 - L17) ^ 2 + (H18 - L18) ^ 2 + (H19 - L19) ^ 2 + (H20 - L20) ^ 2 + (H21 - L21) ^ 2 + (H22 - L22) ^ 2 + (H23 - L23) ^ 2 + (H24 - L24) ^ 2 + (H25 - L25) ^ 2 + (H26 - L26) ^ 2 + (H27 - L27) ^ 2 + (H28 - L28) ^ 2 + (H29 - L29) ^ 2 - 30 * (AVGH30 - AVGL30) ^ 2) / 30)
Average range over the last 30 bars divided by the standard deviation of price over the last 30 bars can be written as follows.
(AVGH30 - AVGL30) / SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 + C20 ^ 2 + C21 ^ 2 + C22 ^ 2 + C23 ^ 2 + C24 ^ 2 + C25 ^ 2 + C26 ^ 2 + C27 ^ 2 + C28 ^ 2 + C29 ^ 2 - 30 * AVGC30 ^ 2) / 30)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
For the avg range last 30 bars divided by std of range 30. They said that it does not return a boolean result. Anyways of producing this with a boolean result?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The formula as described returns a value as dividing the range by the standard deviation of range returns a value.
A Boolean formula would return a true or false result. You would need to define the condition you want to be true or false to create a Boolean formula instead.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
Hi Bruce,
(AVGH30 - AVGL30) / SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 + C20 ^ 2 + C21 ^ 2 + C22 ^ 2 + C23 ^ 2 + C24 ^ 2 + C25 ^ 2 + C26 ^ 2 + C27 ^ 2 + C28 ^ 2 + C29 ^ 2 - 30 * AVGC30 ^ 2) / 30
Is this the same with the average of 30 day range / std of (average of 30 day range)
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Yes, all of the formulas given in my Tuesday, December 02, 2014 10:41:57 AM ET post return values and are not Boolean. So you could plot them on the chart with a Custom PCF Indicator (but not with a Custom PCF % True Indicator).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
Sorry for confusing you bruce.
It should be
average range of 30 days / std (range 30). Is this in line with what am I asking?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Unless I'm misunderstanding your request, that is the Average range over the last 30 bars divided by the standard deviation of range over the last 30 bars formula provided earlier.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
How do I get the standard deviation of a 30 day range?
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
How do I get the standard deviation of a 30 day range?
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
Is there such a formula for the st. dev of a stock?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The standard deviation of the range can be written as follows.
SQR(ABS((H - L) ^ 2 + (H1 - L1) ^ 2 + (H2 - L2) ^ 2 + (H3 - L3) ^ 2 + (H4 - L4) ^ 2 + (H5 - L5) ^ 2 + (H6 - L6) ^ 2 + (H7 - L7) ^ 2 + (H8 - L8) ^ 2 + (H9 - L9) ^ 2 + (H10 - L10) ^ 2 + (H11 - L11) ^ 2 + (H12 - L12) ^ 2 + (H13 - L13) ^ 2 + (H14 - L14) ^ 2 + (H15 - L15) ^ 2 + (H16 - L16) ^ 2 + (H17 - L17) ^ 2 + (H18 - L18) ^ 2 + (H19 - L19) ^ 2 + (H20 - L20) ^ 2 + (H21 - L21) ^ 2 + (H22 - L22) ^ 2 + (H23 - L23) ^ 2 + (H24 - L24) ^ 2 + (H25 - L25) ^ 2 + (H26 - L26) ^ 2 + (H27 - L27) ^ 2 + (H28 - L28) ^ 2 + (H29 - L29) ^ 2 - 30 * (AVGH30 - AVGL30) ^ 2) / 30)
The standard deviation of price can be written as follows.
SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 + C20 ^ 2 + C21 ^ 2 + C22 ^ 2 + C23 ^ 2 + C24 ^ 2 + C25 ^ 2 + C26 ^ 2 + C27 ^ 2 + C28 ^ 2 + C29 ^ 2 - 30 * AVGC30 ^ 2) / 30)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
May I know the formula for:
stdev yesterday. Thank you bruce!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The standard deviation of the range for the previous bar can be written as follows.
SQR(ABS((H1 - L1) ^ 2 + (H2 - L2) ^ 2 + (H3 - L3) ^ 2 + (H4 - L4) ^ 2 + (H5 - L5) ^ 2 + (H6 - L6) ^ 2 + (H7 - L7) ^ 2 + (H8 - L8) ^ 2 + (H9 - L9) ^ 2 + (H10 - L10) ^ 2 + (H11 - L11) ^ 2 + (H12 - L12) ^ 2 + (H13 - L13) ^ 2 + (H14 - L14) ^ 2 + (H15 - L15) ^ 2 + (H16 - L16) ^ 2 + (H17 - L17) ^ 2 + (H18 - L18) ^ 2 + (H19 - L19) ^ 2 + (H20 - L20) ^ 2 + (H21 - L21) ^ 2 + (H22 - L22) ^ 2 + (H23 - L23) ^ 2 + (H24 - L24) ^ 2 + (H25 - L25) ^ 2 + (H26 - L26) ^ 2 + (H27 - L27) ^ 2 + (H28 - L28) ^ 2 + (H29 - L29) ^ 2 + (H30 - 30) ^ 2 - 30 * (AVGH30.1 - AVGL30.1) ^ 2) / 30)
The standard deviation of price for the previous bar can be written as follows.
SQR(ABS(C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 + C20 ^ 2 + C21 ^ 2 + C22 ^ 2 + C23 ^ 2 + C24 ^ 2 + C25 ^ 2 + C26 ^ 2 + C27 ^ 2 + C28 ^ 2 + C29 ^ 2 + C30 ^ 2 - 30 * AVGC30.1 ^ 2) / 30)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/13/2014 Posts: 29
|
Hi Bruce,
How can I get the average of the gaps for the last 30 days?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
How do you want to calculate the average of the gaps?
Do you want to use net difference, percent difference, absolute net difference, absolute percent difference or something else?
Do you want to use the difference between the open and previous close, the open and previous high or low, the current high or low and the previous high or low or something else?
Do you want to divide the sum of the gaps by 30 to get the average or only divide the sum of the gaps by the number of days that actually gapped?
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |