Registered User Joined: 8/1/2006 Posts: 97
|
Hi. Is there any way to program the Money Flow Index (MFI) indicator? 14-period, by the way. Thanks.
|
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
Money Flow Index is in the indicator library in TC2000 version 11.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Money Flow Index is one of the Indicators available as part of the TC2000.com version 11 beta. If you are using the current production release of TeleChart, you could use the following formula as a Custom Indicator:
100 - 100 / (1 + ((H + L + C > H1 + L1 + C1) * (H + L + C) * V + (H1 + L1 + C1 > H2 + L2 + C2) * (H1 + L1 + C1) * V1 + (H2 + L2 + C2 > H3 + L3 + C3) * (H2 + L2 + C2) * V2 + (H3 + L3 + C3 > H4 + L4 + C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 > H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5 + C5 > H6 + L6 + C6) * (H5 + L5 + C5) * V5 + (H6 + L6 + C6 > H7 + L7 + C7) * (H6 + L6 + C6) * V6 + (H7 + L7 + C7 > H8 + L8 + C8) * (H7 + L7 + C7) * V7 + (H8 + L8 + C8 > H9 + L9 + C9) * (H8 + L8 + C8) * V8 + (H9 + L9 + C9 > H10 + L10 + C10) * (H9 + L9 + C9) * V9 + (H10 + L10 + C10 > H11 + L11 + C11) * (H10 + L10 + C10) * V10 + (H11 + L11 + C11 > H12 + L12 + C12) * (H11 + L11 + C11) * V11 + (H12 + L12 + C12 > H13 + L13 + C13) * (H12 + L12 + C12) * V12 + (H13 + L13 + C13 > H14 + L14 + C14) * (H13 + L13 + C13) * V13) / ((H + L + C < H1 + L1 + C1) * (H + L + C) * V + (H1 + L1 + C1 < H2 + L2 + C2) * (H1 + L1 + C1) * V1 + (H2 + L2 + C2 < H3 + L3 + C3) * (H2 + L2 + C2) * V2 + (H3 + L3 + C3 < H4 + L4 + C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 < H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5 + C5 < H6 + L6 + C6) * (H5 + L5 + C5) * V5 + (H6 + L6 + C6 < H7 + L7 + C7) * (H6 + L6 + C6) * V6 + (H7 + L7 + C7 < H8 + L8 + C8) * (H7 + L7 + C7) * V7 + (H8 + L8 + C8 < H9 + L9 + C9) * (H8 + L8 + C8) * V8 + (H9 + L9 + C9 < H10 + L10 + C10) * (H9 + L9 + C9) * V9 + (H10 + L10 + C10 < H11 + L11 + C11) * (H10 + L10 + C10) * V10 + (H11 + L11 + C11 < H12 + L12 + C12) * (H11 + L11 + C11) * V11 + (H12 + L12 + C12 < H13 + L13 + C13) * (H12 + L12 + C12) * V12 + (H13 + L13 + C13 < H14 + L14 + C14) * (H13 + L13 + C13) * V13 - .00001))
How to create a Personal Criteria Forumula (PCF)
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: 8/1/2006 Posts: 97
|
Hi. Okay, two fairly different responses there. I AM, in fact, using the current release, and am pretty comfortable with it. Is that custom indicator a good approximation of the real thing -- the one included in the version 11 beta? Thanks again.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I would not have posted the formula if it were not a reasonably good approximation.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 8/1/2006 Posts: 97
|
Fair enough! I was just a bit thrown off by the previous reply (StockGuy's).
|
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
I didn't think it could be done with a PCF. Bruce proved me wrong
|
|
Registered User Joined: 8/1/2006 Posts: 97
|
Guess he's pretty good at what he does!
|
|
Registered User Joined: 3/27/2011 Posts: 56
|
QUOTE (Bruce_L) Money Flow Index is one of the Indicators available as part of the TC2000.com version 11 beta. If you are using the current production release of TeleChart, you could use the following formula as a Custom Indicator: 100 - 100 / (1 + ((H + L + C > H1 + L1 + C1) * (H + L + C) * V + (H1 + L1 + C1 > H2 + L2 + C2) * (H1 + L1 + C1) * V1 + (H2 + L2 + C2 > H3 + L3 + C3) * (H2 + L2 + C2) * V2 + (H3 + L3 + C3 > H4 + L4 + C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 > H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5 + C5 > H6 + L6 + C6) * (H5 + L5 + C5) * V5 + (H6 + L6 + C6 > H7 + L7 + C7) * (H6 + L6 + C6) * V6 + (H7 + L7 + C7 > H8 + L8 + C8) * (H7 + L7 + C7) * V7 + (H8 + L8 + C8 > H9 + L9 + C9) * (H8 + L8 + C8) * V8 + (H9 + L9 + C9 > H10 + L10 + C10) * (H9 + L9 + C9) * V9 + (H10 + L10 + C10 > H11 + L11 + C11) * (H10 + L10 + C10) * V10 + (H11 + L11 + C11 > H12 + L12 + C12) * (H11 + L11 + C11) * V11 + (H12 + L12 + C12 > H13 + L13 + C13) * (H12 + L12 + C12) * V12 + (H13 + L13 + C13 > H14 + L14 + C14) * (H13 + L13 + C13) * V13) / ((H + L + C < H1 + L1 + C1) * (H + L + C) * V + (H1 + L1 + C1 < H2 + L2 + C2) * (H1 + L1 + C1) * V1 + (H2 + L2 + C2 < H3 + L3 + C3) * (H2 + L2 + C2) * V2 + (H3 + L3 + C3 < H4 + L4 + C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 < H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5 + C5 < H6 + L6 + C6) * (H5 + L5 + C5) * V5 + (H6 + L6 + C6 < H7 + L7 + C7) * (H6 + L6 + C6) * V6 + (H7 + L7 + C7 < H8 + L8 + C8) * (H7 + L7 + C7) * V7 + (H8 + L8 + C8 < H9 + L9 + C9) * (H8 + L8 + C8) * V8 + (H9 + L9 + C9 < H10 + L10 + C10) * (H9 + L9 + C9) * V9 + (H10 + L10 + C10 < H11 + L11 + C11) * (H10 + L10 + C10) * V10 + (H11 + L11 + C11 < H12 + L12 + C12) * (H11 + L11 + C11) * V11 + (H12 + L12 + C12 < H13 + L13 + C13) * (H12 + L12 + C12) * V12 + (H13 + L13 + C13 < H14 + L14 + C14) * (H13 + L13 + C13) * V13 - .00001)) How to create a Personal Criteria Forumula (PCF)PCF Formula DescriptionsHandy PCF example formulas to help you learn the syntax of PCFs!
Hey there. I'm trying to make a few different PCFs for Money Flow Index from different dates such as 3 days ago, 2 days ago, and a day ago. The time frame of 14 is okay. I see here in this post it accurately represents the current value. I'm looking for a PCF that represents a previous value (if I hadn't made myself clear). It would be highly appreciated if I can be directed on the right track. I attempted to modify the PCF for a reading of MFI from 2 days ago but I am showing something different from what the actual MFI shows. I'm in TC2000 v11 and when I use the PCF for todays value for MFI provided here it matches the system's indicator. Here's what I did in attempt to alter this PCF and get the MFI reading from two days ago and perhaps I made a mistake somewhere. All I did was add 2 to almost every appropiate integer.
100 - 100 / (1 + ((H2 + L2 + C2 > H3 + L3 + C3)
* (H2 + L2 + C2) * V2 + (H3 + L3 + C3 > H4 + L4
+ C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 >
H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5
+ C5 > H6 + L6 + C6) * (H5 + L5 + C5) * V5 +
(H6 + L6 + C6 > H7 + L7 + C7) * (H6 + L6 + C6)
* V6 + (H7 + L7 + C7 > H8 + L8 + C8) * (H7 + L7
+ C7) * V7 + (H8 + L8 + C8 > H9 + L9 + C9) *
(H8 + L8 + C8) * V8 + (H9 + L9 + C9 > H10 + L10
+ C10) * (H9 + L9 + C9) * V9 + (H10 + L10 + C10
> H11 + L11 + C11) * (H10 + L10 + C10) * V10 +
(H11 + L11 + C11 > H12 + L12 + C12) * (H11 +
L11 + C11) * V11 + (H12 + L12 + C12 > H13 + L13
+ C13) * (H12 + L12 + C12) * V12 + (H13 + L13 +
C13 > H14 + L14 + C14) * (H13 + L13 + C13) *
V13 + (H14 + L14 + C14 > H15 + L15 + C15) *
(H14 + L14 + C14) * V14 + (H15 + L15 + C15 >
H16 + L16 + C16) * (H15 + L15 + C15) * V15) /
((H2 + L2 + C2) * V2 + (H3 + L3 + C3 < H4 + L4
+ C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 <
H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5
+ C5 < H6 + L6 + C6) * (H5 + L5 + C5) * V5 +
(H6 + L6 + C6 < H7 + L7 + C7) * (H6 + L6 + C6)
* V6 + (H7 + L7 + C7 < H8 + L8 + C8) * (H7 + L7
+ C7) * V7 + (H8 + L8 + C8 < H9 + L9 + C9) *
(H8 + L8 + C8) * V8 + (H9 + L9 + C9 < H10 + L10
+ C10) * (H9 + L9 + C9) * V9 + (H10 + L10 + C10
< H11 + L11 + C11) * (H10 + L10 + C10) * V10 +
(H11 + L11 + C11 < H12 + L12 + C12) * (H11 +
L11 + C11) * V11 + (H12 + L12 + C12 < H13 + L13
+ C13) * (H12 + L12 + C12) * V12 + (H13 + L13 +
C13 < H14 + L14 + C14) * (H13 + L13 + C13) *
V13 + (H14 + L14 + C14 < H15 + L15 + C15) *
(H14 + L14 + C14) * V14 + (H15 + L15 + C15 <
H16 + L16 + C16) * (H15 + L15 + C15) * V15 -
.00001))
Any help would be appreciated. There might be something I don't understand in the calculation or a simple typo. I haven't been successful in getting myself a reading from any previous date in a PCF for MFI. Once again, if possible I would like help with creating an MFI (14 days used in the calculation) PCF from 3 days ago, 2 days ago, and yesterday. Thanks alot.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
While I have not figured out the error, I suspect it is a simple typo as the basic technique you appear to be using seems sound. The formula for 1-Bar Ago could be written as:
100 - 100 / (1 + ((H1 + L1 + C1 > H2 + L2 + C2) * (H1 + L1 + C1) * V1 + (H2 + L2 + C2 > H3 + L3 + C3) * (H2 + L2 + C2) * V2 + (H3 + L3 + C3 > H4 + L4 + C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 > H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5 + C5 > H6 + L6 + C6) * (H5 + L5 + C5) * V5 + (H6 + L6 + C6 > H7 + L7 + C7) * (H6 + L6 + C6) * V6 + (H7 + L7 + C7 > H8 + L8 + C8) * (H7 + L7 + C7) * V7 + (H8 + L8 + C8 > H9 + L9 + C9) * (H8 + L8 + C8) * V8 + (H9 + L9 + C9 > H10 + L10 + C10) * (H9 + L9 + C9) * V9 + (H10 + L10 + C10 > H11 + L11 + C11) * (H10 + L10 + C10) * V10 + (H11 + L11 + C11 > H12 + L12 + C12) * (H11 + L11 + C11) * V11 + (H12 + L12 + C12 > H13 + L13 + C13) * (H12 + L12 + C12) * V12 + (H13 + L13 + C13 > H14 + L14 + C14) * (H13 + L13 + C13) * V13 + (H14 + L14 + C14 > H15 + L15 + C15) * (H14 + L14 + C14) * V14) / ((H1 + L1 + C1 < H2 + L2 + C2) * (H1 + L1 + C1) * V1 + (H2 + L2 + C2 < H3 + L3 + C3) * (H2 + L2 + C2) * V2 + (H3 + L3 + C3 < H4 + L4 + C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 < H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5 + C5 < H6 + L6 + C6) * (H5 + L5 + C5) * V5 + (H6 + L6 + C6 < H7 + L7 + C7) * (H6 + L6 + C6) * V6 + (H7 + L7 + C7 < H8 + L8 + C8) * (H7 + L7 + C7) * V7 + (H8 + L8 + C8 < H9 + L9 + C9) * (H8 + L8 + C8) * V8 + (H9 + L9 + C9 < H10 + L10 + C10) * (H9 + L9 + C9) * V9 + (H10 + L10 + C10 < H11 + L11 + C11) * (H10 + L10 + C10) * V10 + (H11 + L11 + C11 < H12 + L12 + C12) * (H11 + L11 + C11) * V11 + (H12 + L12 + C12 < H13 + L13 + C13) * (H12 + L12 + C12) * V12 + (H13 + L13 + C13 < H14 + L14 + C14) * (H13 + L13 + C13) * V13 + (H14 + L14 + C14 < H15 + L15 + C15) * (H14 + L14 + C14) * V14 - .00001))
The formula for 2-Bars Ago could be written as:
100 - 100 / (1 + ((H2 + L2 + C2 > H3 + L3 + C3) * (H2 + L2 + C2) * V2 + (H3 + L3 + C3 > H4 + L4 + C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 > H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5 + C5 > H6 + L6 + C6) * (H5 + L5 + C5) * V5 + (H6 + L6 + C6 > H7 + L7 + C7) * (H6 + L6 + C6) * V6 + (H7 + L7 + C7 > H8 + L8 + C8) * (H7 + L7 + C7) * V7 + (H8 + L8 + C8 > H9 + L9 + C9) * (H8 + L8 + C8) * V8 + (H9 + L9 + C9 > H10 + L10 + C10) * (H9 + L9 + C9) * V9 + (H10 + L10 + C10 > H11 + L11 + C11) * (H10 + L10 + C10) * V10 + (H11 + L11 + C11 > H12 + L12 + C12) * (H11 + L11 + C11) * V11 + (H12 + L12 + C12 > H13 + L13 + C13) * (H12 + L12 + C12) * V12 + (H13 + L13 + C13 > H14 + L14 + C14) * (H13 + L13 + C13) * V13 + (H14 + L14 + C14 > H15 + L15 + C15) * (H14 + L14 + C14) * V14 + (H15 + L15 + C15 > H16 + L16 + C16) * (H15 + L15 + C15) * V15) / ((H2 + L2 + C2 < H3 + L3 + C3) * (H2 + L2 + C2) * V2 + (H3 + L3 + C3 < H4 + L4 + C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 < H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5 + C5 < H6 + L6 + C6) * (H5 + L5 + C5) * V5 + (H6 + L6 + C6 < H7 + L7 + C7) * (H6 + L6 + C6) * V6 + (H7 + L7 + C7 < H8 + L8 + C8) * (H7 + L7 + C7) * V7 + (H8 + L8 + C8 < H9 + L9 + C9) * (H8 + L8 + C8) * V8 + (H9 + L9 + C9 < H10 + L10 + C10) * (H9 + L9 + C9) * V9 + (H10 + L10 + C10 < H11 + L11 + C11) * (H10 + L10 + C10) * V10 + (H11 + L11 + C11 < H12 + L12 + C12) * (H11 + L11 + C11) * V11 + (H12 + L12 + C12 < H13 + L13 + C13) * (H12 + L12 + C12) * V12 + (H13 + L13 + C13 < H14 + L14 + C14) * (H13 + L13 + C13) * V13 + (H14 + L14 + C14 < H15 + L15 + C15) * (H14 + L14 + C14) * V14 + (H15 + L15 + C15 < H16 + L16 + C16) * (H15 + L15 + C15) * V15 - .00001))
The formula for 3-Bars Ago could be written as:
100 - 100 / (1 + ((H3 + L3 + C3 > H4 + L4 + C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 > H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5 + C5 > H6 + L6 + C6) * (H5 + L5 + C5) * V5 + (H6 + L6 + C6 > H7 + L7 + C7) * (H6 + L6 + C6) * V6 + (H7 + L7 + C7 > H8 + L8 + C8) * (H7 + L7 + C7) * V7 + (H8 + L8 + C8 > H9 + L9 + C9) * (H8 + L8 + C8) * V8 + (H9 + L9 + C9 > H10 + L10 + C10) * (H9 + L9 + C9) * V9 + (H10 + L10 + C10 > H11 + L11 + C11) * (H10 + L10 + C10) * V10 + (H11 + L11 + C11 > H12 + L12 + C12) * (H11 + L11 + C11) * V11 + (H12 + L12 + C12 > H13 + L13 + C13) * (H12 + L12 + C12) * V12 + (H13 + L13 + C13 > H14 + L14 + C14) * (H13 + L13 + C13) * V13 + (H14 + L14 + C14 > H15 + L15 + C15) * (H14 + L14 + C14) * V14 + (H15 + L15 + C15 > H16 + L16 + C16) * (H15 + L15 + C15) * V15 + (H16 + L16 + C16 > H17 + L17 + C17) * (H16 + L16 + C16) * V16) / ((H3 + L3 + C3 < H4 + L4 + C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 < H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5 + C5 < H6 + L6 + C6) * (H5 + L5 + C5) * V5 + (H6 + L6 + C6 < H7 + L7 + C7) * (H6 + L6 + C6) * V6 + (H7 + L7 + C7 < H8 + L8 + C8) * (H7 + L7 + C7) * V7 + (H8 + L8 + C8 < H9 + L9 + C9) * (H8 + L8 + C8) * V8 + (H9 + L9 + C9 < H10 + L10 + C10) * (H9 + L9 + C9) * V9 + (H10 + L10 + C10 < H11 + L11 + C11) * (H10 + L10 + C10) * V10 + (H11 + L11 + C11 < H12 + L12 + C12) * (H11 + L11 + C11) * V11 + (H12 + L12 + C12 < H13 + L13 + C13) * (H12 + L12 + C12) * V12 + (H13 + L13 + C13 < H14 + L14 + C14) * (H13 + L13 + C13) * V13 + (H14 + L14 + C14 < H15 + L15 + C15) * (H14 + L14 + C14) * V14 + (H15 + L15 + C15 < H16 + L16 + C16) * (H15 + L15 + C15) * V15 + (H16 + L16 + C16 < H17 + L17 + C17) * (H16 + L16 + C16) * V16 - .00001))
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/27/2011 Posts: 56
|
Bruce you are the man! I have to admit this made my day. Thanks a bunch
|
|
Registered User Joined: 8/1/2006 Posts: 97
|
Hi. Two questions. First, could I please have the 10-period version of the MFI indicator posted above? Second, is there any way to express the condition "10-period MFI crossing above 80 today"? I guess that the question someone else asked above is a pretty good hint -- I would just need the 10-period version of "MFI one bar ago." Then, can I assume that I can just write (in PCF language, of course), "MFI one bar ago < 80 AND MFI > 80"? Any need to add brackets or anything? Thanks.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You are correct about what you need to do. There is no need to add brackets or parentheses. A formula for the current 10-Period MFI could be written as:
100 - 100 / (1 + ((H + L + C > H1 + L1 + C1) * (H + L + C) * V + (H1 + L1 + C1 > H2 + L2 + C2) * (H1 + L1 + C1) * V1 + (H2 + L2 + C2 > H3 + L3 + C3) * (H2 + L2 + C2) * V2 + (H3 + L3 + C3 > H4 + L4 + C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 > H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5 + C5 > H6 + L6 + C6) * (H5 + L5 + C5) * V5 + (H6 + L6 + C6 > H7 + L7 + C7) * (H6 + L6 + C6) * V6 + (H7 + L7 + C7 > H8 + L8 + C8) * (H7 + L7 + C7) * V7 + (H8 + L8 + C8 > H9 + L9 + C9) * (H8 + L8 + C8) * V8 + (H9 + L9 + C9 > H10 + L10 + C10) * (H9 + L9 + C9) * V9) / ((H + L + C < H1 + L1 + C1) * (H + L + C) * V + (H1 + L1 + C1 < H2 + L2 + C2) * (H1 + L1 + C1) * V1 + (H2 + L2 + C2 < H3 + L3 + C3) * (H2 + L2 + C2) * V2 + (H3 + L3 + C3 < H4 + L4 + C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 < H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5 + C5 < H6 + L6 + C6) * (H5 + L5 + C5) * V5 + (H6 + L6 + C6 < H7 + L7 + C7) * (H6 + L6 + C6) * V6 + (H7 + L7 + C7 < H8 + L8 + C8) * (H7 + L7 + C7) * V7 + (H8 + L8 + C8 < H9 + L9 + C9) * (H8 + L8 + C8) * V8 + (H9 + L9 + C9 < H10 + L10 + C10) * (H9 + L9 + C9) * V9 - .00001))
While the formula for the 10-Period MFI of 1-Bar Ago could be written as:
100 - 100 / (1 + ((H1 + L1 + C1 > H2 + L2 + C2) * (H1 + L1 + C1) * V1 + (H2 + L2 + C2 > H3 + L3 + C3) * (H2 + L2 + C2) * V2 + (H3 + L3 + C3 > H4 + L4 + C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 > H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5 + C5 > H6 + L6 + C6) * (H5 + L5 + C5) * V5 + (H6 + L6 + C6 > H7 + L7 + C7) * (H6 + L6 + C6) * V6 + (H7 + L7 + C7 > H8 + L8 + C8) * (H7 + L7 + C7) * V7 + (H8 + L8 + C8 > H9 + L9 + C9) * (H8 + L8 + C8) * V8 + (H9 + L9 + C9 > H10 + L10 + C10) * (H9 + L9 + C9) * V9 + (H10 + L10 + C10 > H11 + L11 + C11) * (H10 + L10 + C10) * V10) / ((H1 + L1 + C1 < H2 + L2 + C2) * (H1 + L1 + C1) * V1 + (H2 + L2 + C2 < H3 + L3 + C3) * (H2 + L2 + C2) * V2 + (H3 + L3 + C3 < H4 + L4 + C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 < H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5 + C5 < H6 + L6 + C6) * (H5 + L5 + C5) * V5 + (H6 + L6 + C6 < H7 + L7 + C7) * (H6 + L6 + C6) * V6 + (H7 + L7 + C7 < H8 + L8 + C8) * (H7 + L7 + C7) * V7 + (H8 + L8 + C8 < H9 + L9 + C9) * (H8 + L8 + C8) * V8 + (H9 + L9 + C9 < H10 + L10 + C10) * (H9 + L9 + C9) * V9 + (H10 + L10 + C10 < H11 + L11 + C11) * (H10 + L10 + C10) * V10 - .00001))
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 8/1/2006 Posts: 97
|
Perfect. Thanks again.
|
|
Registered User Joined: 12/22/2009 Posts: 8
|
Bruce,
Any chance you could provide the formula for a 14 period MFI? Also, is it possible to create a formula in Telechart for the McClellan (Volume) Oscillator? Thanks
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
There isn't currently a way to create the McClellan Oscillator as a formula in either TeleChart 2007 or TC2000 version 12. However, T2106 is the symbol for the McClellan Oscillator and you can view it bring bring up T2106 as the symbol being displayed on the chart.
Worden’s Market Indicators (T2s)
Market Stats, TICK and TRIN
The formula for a 14-Period MFI to recreate it as a Custom Indicator in TeleChart 2007 was already provided in my Monday, April 18, 2011 11:03:43 AM ET post.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 794
|
Can you provide the formula for 8 period MFI? Thank you!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
An Indicator Formula for an 8-Period MFI can be written as:
100 - 100 / (1 + ((H + L + C > H1 + L1 + C1) * (H + L + C) * V + (H1 + L1 + C1 > H2 + L2 + C2) * (H1 + L1 + C1) * V1 + (H2 + L2 + C2 > H3 + L3 + C3) * (H2 + L2 + C2) * V2 + (H3 + L3 + C3 > H4 + L4 + C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 > H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5 + C5 > H6 + L6 + C6) * (H5 + L5 + C5) * V5 + (H6 + L6 + C6 > H7 + L7 + C7) * (H6 + L6 + C6) * V6 + (H7 + L7 + C7 > H8 + L8 + C8) * (H7 + L7 + C7) * V7) / ((H + L + C < H1 + L1 + C1) * (H + L + C) * V + (H1 + L1 + C1 < H2 + L2 + C2) * (H1 + L1 + C1) * V1 + (H2 + L2 + C2 < H3 + L3 + C3) * (H2 + L2 + C2) * V2 + (H3 + L3 + C3 < H4 + L4 + C4) * (H3 + L3 + C3) * V3 + (H4 + L4 + C4 < H5 + L5 + C5) * (H4 + L4 + C4) * V4 + (H5 + L5 + C5 < H6 + L6 + C6) * (H5 + L5 + C5) * V5 + (H6 + L6 + C6 < H7 + L7 + C7) * (H6 + L6 + C6) * V6 + (H7 + L7 + C7 < H8 + L8 + C8) * (H7 + L7 + C7) * V7 - .00001))
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 794
|
Thank you!
|
|
Registered User Joined: 4/1/2011 Posts: 90
|
Hi Bruce,
I have a two part request.
#1 - Can you create a PCF %True Indicator that will identify when the 12 period MFI is the lowest it's been in 250 bars but today is greater than yesterday.
#2 - Can you create a PCF (for a column) that will count the number of days ago (within the last 250 bars ) that the above indicator was true.
Thanks in advance,
|
|
Registered User Joined: 6/30/2017 Posts: 1,227
|
I know this is from 2011, but I love this :) ...
QUOTE (JordanS) Hi. Okay, two fairly different responses there...
QUOTE (Bruce_L) I would not have posted the formula if it were not a reasonably good approximation.
QUOTE (JordanS) Fair enough! I was just a bit thrown off by the previous reply (StockGuy's).
QUOTE (StockGuy) I didn't think it could be done with a PCF. Bruce proved me wrong
|
|
Registered User Joined: 4/1/2011 Posts: 90
|
Hi Bruce,
Btw, I actually using v17, not v7. (Sorry for posting this request in the wrong fourum).
Thanks in advance
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I probably wouldn't be able to do this at all in TC2000 v7, so it is good that you are using TC2000 v17.
The longest low which isn't too slow to post in the forums is 108 bars.
SUM(IIF(H + L + C > H1 + L1 + C1, (H + L + C) * V, 0), 12) / SUM((H + L + C) * V, 12) > SUM(IIF(H1 + L1 + C1 > H2 + L2 + C2, (H1 + L1 + C1) * V1, 0), 12) / SUM((H1 + L1 + C1) * V1, 12) AND SUM(IIF(H1 + L1 + C1 > H2 + L2 + C2, (H1 + L1 + C1) * V1, 0), 12) / SUM((H1 + L1 + C1) * V1, 12) = MIN(SUM(IIF(H1 + L1 + C1 > H2 + L2 + C2, (H1 + L1 + C1) * V1, 0), 12) / SUM((H1 + L1 + C1) * V1, 12), 108)
While you could generally use a condition formula such as the above as the first argument in a SinceTrue(w, x) function where w would be the condition formula and x would be the period, the resulting formula would be way too slow to be practical or post in the forums.
There is also the additional complication that if the first formula actually used a period of 250 instead of 108 and the second formula also used a period of 250, it would require 513 bars of data to calculate the formula. This is somewhat in that each time frame starts each trading day with the most recent 500 bars of data available and then adds new bars throughout the trading if applicable. So having 501 bars of data available to calculate the formula would not be guaranteed.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 4/1/2011 Posts: 90
|
Thanks Bruce, both PCF's work perfectly.
Can you create the same twp PCF's for the Ultimate Oscillator (7,14,28) indicator? v17 ofcourse.
Thanks in advance
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The longest low which isn't too slow to post in the forums is only 17 bars for the Ultimate Oscillator.
4 * SUM(C - LEAST(L, C1), 7) / SUM(ATR, 7) + 2 * SUM(C - LEAST(L, C1), 14) / SUM(ATR, 14) + SUM(C - LEAST(L, C1), 28) / SUM(ATR, 28) > 4 * SUM(C1 - LEAST(L1, C2), 7) / SUM(ATR1.1, 7) + 2 * SUM(C1 - LEAST(L1, C2), 14) / SUM(ATR1.1, 14) + SUM(C1 - LEAST(L1, C2), 28) / SUM(ATR1.1, 28) AND 4 * SUM(C1 - LEAST(L1, C2), 7) / SUM(ATR1.1, 7) + 2 * SUM(C1 - LEAST(L1, C2), 14) / SUM(ATR1.1, 14) + SUM(C1 - LEAST(L1, C2), 28) / SUM(ATR1.1, 28) = MIN(4 * SUM(C1 - LEAST(L1, C2), 7) / SUM(ATR1.1, 7) + 2 * SUM(C1 - LEAST(L1, C2), 14) / SUM(ATR1.1, 14) + SUM(C1 - LEAST(L1, C2), 28) / SUM(ATR1.1, 28), 17)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 4/1/2011 Posts: 90
|
Hi Bruce,
Can you write a PCF (for v17)where the MFI 12 period is below 25 but today's value is greater than yesterday's value.
Thanks in advance.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following Condition Formula.
100 * SUM(IIF(H + L + C > H1 + L1 + C1, (H + L + C) * V, 0), 12) / SUM((H + L + C) * V, 12) < 25 AND 100 * SUM(IIF(H + L + C > H1 + L1 + C1, (H + L + C) * V, 0), 12) / SUM((H + L + C) * V, 12) > 100 * SUM(IIF(H1 + L1 + C1 > H2 + L2 + C2, (H1 + L1 + C1) * V1, 0), 12) / SUM((H1 + L1 + C1) * V1, 12)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |