Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 1/7/2014 Posts: 26
|
I'm trying to create a PCF (boleen) formula that will identify peaks in the force index. The parameters are simple, the Force Index (2) has to Break above a 50EMA of itself.
This way I can create a % True indicator to identify the peaks for me.
Is this possible?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
A Condition Formula for the 2-period Elder Force Index being above its own 50-period exponential moving average can be written as:
.66697164 * ((C - C1) * V + 1 / 3 * ((C1 - C2) * V1 + 1 / 3 * ((C2 - C3) * V2 + 1 / 3 * ((C3 - C4) * V3 + 1 / 3 * ((C4 - C5) * V4 + 1 / 3 * ((C5 - C6) * V5 + 1 / 3 * ((C6 - C7) * V6))))))) > .039254427 * ((C - C1) * V + 49 / 51 * ((C1 - C2) * V1 + 49 / 51 * ((C2 - C3) * V2 + 49 / 51 * ((C3 - C4) * V3 + 49 / 51 * ((C4 - C5) * V4 + 49 / 51 * ((C5 - C6) * V5 + 49 / 51 * ((C6 - C7) * V6 + 49 / 51 * ((C7 - C8) * V7 + 49 / 51 * ((C8 - C9) * V8 + 49 / 51 * ((C9 - C10) * V9 + 49 / 51 * ((C10 - C11) * V10 + 49 / 51 * ((C11 - C12) * V11 + 49 / 51 * ((C12 - C13) * V12 + 49 / 51 * ((C13 - C14) * V13 + 49 / 51 * ((C14 - C15) * V14 + 49 / 51 * ((C15 - C16) * V15 + 49 / 51 * ((C16 - C17) * V16 + 49 / 51 * ((C17 - C18) * V17 + 49 / 51 * ((C18 - C19) * V18 + 49 / 51 * ((C19 - C20) * V19 + 49 / 51 * ((C20 - C21) * V20 + 49 / 51 * ((C21 - C22) * V21 + 49 / 51 * ((C22 - C23) * V22 + 49 / 51 * ((C23 - C24) * V23 + 49 / 51 * ((C24 - C25) * V24 + 49 / 51 * ((C25 - C26) * V25 + 49 / 51 * ((C26 - C27) * V26 + 49 / 51 * ((C27 - C28) * V27 + 49 / 51 * ((C28 - C29) * V28 + 49 / 51 * ((C29 - C30) * V29 + 49 / 51 * ((C30 - C31) * V30 + 49 / 51 * ((C31 - C32) * V31 + 49 / 51 * ((C32 - C33) * V32 + 49 / 51 * ((C33 - C34) * V33 + 49 / 51 * ((C34 - C35) * V34 + 49 / 51 * ((C35 - C36) * V35 + 49 / 51 * ((C36 - C37) * V36 + 49 / 51 * ((C37 - C38) * V37 + 49 / 51 * ((C38 - C39) * V38 + 49 / 51 * ((C39 - C40) * V39 + 49 / 51 * ((C40 - C41) * V40 + 49 / 51 * ((C41 - C42) * V41 + 49 / 51 * ((C42 - C43) * V42 + 49 / 51 * ((C43 - C44) * V43 + 49 / 51 * ((C44 - C45) * V44 + 49 / 51 * ((C45 - C46) * V45 + 49 / 51 * ((C46 - C47) * V46 + 49 / 51 * ((C47 - C48) * V47 + 49 / 51 * ((C48 - C49) * V48 + 49 / 51 * ((C49 - C50) * V49 + 49 / 51 * ((C50 - C51) * V50 + 49 / 51 * ((C51 - C52) * V51 + 49 / 51 * ((C52 - C53) * V52 + 49 / 51 * ((C53 - C54) * V53 + 49 / 51 * ((C54 - C55) * V54 + 49 / 51 * ((C55 - C56) * V55 + 49 / 51 * ((C56 - C57) * V56 + 49 / 51 * ((C57 - C58) * V57 + 49 / 51 * ((C58 - C59) * V58 + 49 / 51 * ((C59 - C60) * V59 + 49 / 51 * ((C60 - C61) * V60 + 49 / 51 * ((C61 - C62) * V61 + 49 / 51 * ((C62 - C63) * V62 + 49 / 51 * ((C63 - C64) * V63 + 49 / 51 * ((C64 - C65) * V64 + 49 / 51 * ((C65 - C66) * V65 + 49 / 51 * ((C66 - C67) * V66 + 49 / 51 * ((C67 - C68) * V67 + 49 / 51 * ((C68 - C69) * V68 + 49 / 51 * ((C69 - C70) * V69 + 49 / 51 * ((C70 - C71) * V70 + 49 / 51 * ((C71 - C72) * V71 + 49 / 51 * ((C72 - C73) * V72 + 49 / 51 * ((C73 - C74) * V73 + 49 / 51 * ((C74 - C75) * V74 + 49 / 51 * ((C75 - C76) * V75 + 49 / 51 * ((C76 - C77) * V76 + 49 / 51 * ((C77 - C78) * V77 + 49 / 51 * ((C78 - C79) * V78 + 49 / 51 * ((C79 - C80) * V79 + 49 / 51 * ((C80 - C81) * V80 + 49 / 51 * ((C81 - C82) * V81 + 49 / 51 * ((C82 - C83) * V82 + 49 / 51 * ((C83 - C84) * V83 + 49 / 51 * ((C84 - C85) * V84 + 49 / 51 * ((C85 - C86) * V85 + 49 / 51 * ((C86 - C87) * V86 + 49 / 51 * ((C87 - C88) * V87 + 49 / 51 * ((C88 - C89) * V88 + 49 / 51 * ((C89 - C90) * V89 + 49 / 51 * ((C90 - C91) * V90 + 49 / 51 * ((C91 - C92) * V91 + 49 / 51 * ((C92 - C93) * V92 + 49 / 51 * ((C93 - C94) * V93 + 49 / 51 * ((C94 - C95) * V94 + 49 / 51 * ((C95 - C96) * V95 + 49 / 51 * ((C96 - C97) * V96 + 49 / 51 * ((C97 - C98) * V97 + 49 / 51 * ((C98 - C99) * V98 + 49 / 51 * ((C99 - C100) * V99 + 49 / 51 * ((C100 - C101) * V100 + 49 / 51 * ((C101 - C102) * V101 + 49 / 51 * ((C102 - C103) * V102 + 49 / 51 * ((C103 - C104) * V103 + 49 / 51 * ((C104 - C105) * V104 + 49 / 51 * ((C105 - C106) * V105 + 49 / 51 * ((C106 - C107) * V106 + 49 / 51 * ((C107 - C108) * V107 + 49 / 51 * ((C108 - C109) * V108 + 49 / 51 * ((C109 - C110) * V109 + 49 / 51 * ((C110 - C111) * V110 + 49 / 51 * ((C111 - C112) * V111 + 49 / 51 * ((C112 - C113) * V112 + 49 / 51 * ((C113 - C114) * V113 + 49 / 51 * ((C114 - C115) * V114 + 49 / 51 * ((C115 - C116) * V115 + 49 / 51 * ((C116 - C117) * V116 + 49 / 51 * ((C117 - C118) * V117 + 49 / 51 * ((C118 - C119) * V118 + 49 / 51 * ((C119 - C120) * V119 + 49 / 51 * ((C120 - C121) * V120 + 49 / 51 * ((C121 - C122) * V121 + 49 / 51 * ((C122 - C123) * V122 + 49 / 51 * ((C123 - C124) * V123 + 49 / 51 * ((C124 - C125) * V124 + 49 / 51 * ((C125 - C126) * V125 + 49 / 51 * ((C126 - C127) * V126 + 49 / 51 * ((C127 - C128) * V127 + 49 / 51 * ((C128 - C129) * V128 + 49 / 51 * ((C129 - C130) * V129 + 49 / 51 * ((C130 - C131) * V130 + 49 / 51 * ((C131 - C132) * V131 + 49 / 51 * ((C132 - C133) * V132 + 49 / 51 * ((C133 - C134) * V133 + 49 / 51 * ((C134 - C135) * V134 + 49 / 51 * ((C135 - C136) * V135 + 49 / 51 * ((C136 - C137) * V136 + 49 / 51 * ((C137 - C138) * V137 + 49 / 51 * ((C138 - C139) * V138 + 49 / 51 * ((C139 - C140) * V139 + 49 / 51 * ((C140 - C141) * V140 + 49 / 51 * ((C141 - C142) * V141 + 49 / 51 * ((C142 - C143) * V142 + 49 / 51 * ((C143 - C144) * V143 + 49 / 51 * ((C144 - C145) * V144 + 49 / 51 * ((C145 - C146) * V145 + 49 / 51 * ((C146 - C147) * V146 + 49 / 51 * ((C147 - C148) * V147 + 49 / 51 * ((C148 - C149) * V148 + 49 / 51 * ((C149 - C150) * V149 + 49 / 51 * ((C150 - C151) * V150 + 49 / 51 * ((C151 - C152) * V151 + 49 / 51 * ((C152 - C153) * V152 + 49 / 51 * ((C153 - C154) * V153 + 49 / 51 * ((C154 - C155) * V154 + 49 / 51 * ((C155 - C156) * V155 + 49 / 51 * ((C156 - C157) * V156 + 49 / 51 * ((C157 - C158) * V157 + 49 / 51 * ((C158 - C159) * V158 + 49 / 51 * ((C159 - C160) * V159 + 49 / 51 * ((C160 - C161) * V160 + 49 / 51 * ((C161 - C162) * V161 + 49 / 51 * ((C162 - C163) * V162 + 49 / 51 * ((C163 - C164) * V163 + 49 / 51 * ((C164 - C165) * V164 + 49 / 51 * ((C165 - C166) * V165 + 49 / 51 * ((C166 - C167) * V166 + 49 / 51 * ((C167 - C168) * V167 + 49 / 51 * ((C168 - C169) * V168 + 49 / 51 * ((C169 - C170) * V169 + 49 / 51 * ((C170 - C171) * V170 + 49 / 51 * ((C171 - C172) * V171 + 49 / 51 * ((C172 - C173) * V172)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
Cascades of Moving Averages
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/7/2014 Posts: 26
|
Thank you Bruce! This is getting very close to what I want.
So everything seems to be working fine, but what if I wanted to make it so that the spike has to be a % higher than the moving average? For example here is a section of my chart that uses the Force index.
The Dotted yellow line is my 50SMA, and everytime the force index (purple) crosses it up we get a signal. How would we cut down the signals it's sending to only the peaks above the crosshair?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Are you interested in the 50SMA or 50EMA? The posts seem contradictory on the question.
On another note, percent is probably not the best option because the indicator can cross through zero.
I am not sure what other option you might want to try though. Checking for the Force Index being both above its moving average and a peak that is surrounded by lower values would not allow you to catch the peak until the bar after the peak since you would need to know the Force Index is moving back down for this sort of test.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/7/2014 Posts: 26
|
Sorry, It was a typo in the second post, I want to usea 50EMA like orginally stated. I just threw a MA to visualize how the indicator was working.
Okay So after Playing around with some more MAs I came up with this:
It looks like if I add a 4EMA (offset by -1) to the chart it helps filter some of those false signals out. So could the critera be as follows?
• 4EMA has to be above 50EMA
• Force index is above the 4EMA
Would that get us closer?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The problem with using the 4EMA offset by -1 is that it uses future data in its calculations. This is why it ends plotting 1-bar before the end of all of the other plots. It also means we end up having the same problem we had with checking for the Force Index being higher than its surrounding bars. We don't really get a signal until 1 bar after the peak instead of at the peak.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/7/2014 Posts: 26
|
Let me start off by saying thank you for working through this with me and giving me better insight on how this all works.
If I change it to a 3EMA with no offset I get similar signals as with the 4EMA -1. So:
3EMA above 50EMA
Force index above 3EMA
Think that would work?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The following Condition Formula should check for the Force Index being above its own 3-period exponential moving average and the 3-period exponential moving average of the Force Index being above the 50-period exponential moving average of the Force Index:
.66697164 * ((C - C1) * V + 1 / 3 * ((C1 - C2) * V1 + 1 / 3 * ((C2 - C3) * V2 + 1 / 3 * ((C3 - C4) * V3 + 1 / 3 * ((C4 - C5) * V4 + 1 / 3 * ((C5 - C6) * V5 + 1 / 3 * ((C6 - C7) * V6))))))) > .50048876 * ((C - C1) * V + .5 * ((C1 - C2) * V1 + .5 * ((C2 - C3) * V2 + .5 * ((C3 - C4) * V3 + .5 * ((C4 - C5) * V4 + .5 * ((C5 - C6) * V5 + .5 * ((C6 - C7) * V6 + .5 * ((C7 - C8) * V7 + .5 * ((C8 - C9) * V8 + .5 * ((C9 - C10) * V9)))))))))) AND 1.0009775 * ((C - C1) * V + .5 * ((C1 - C2) * V1 + .5 * ((C2 - C3) * V2 + .5 * ((C3 - C4) * V3 + .5 * ((C4 - C5) * V4 + .5 * ((C5 - C6) * V5 + .5 * ((C6 - C7) * V6 + .5 * ((C7 - C8) * V7 + .5 * ((C8 - C9) * V8 + .5 * ((C9 - C10) * V9)))))))))) > .6530764 * ((C - C1) * V + 1 / 3 * ((C1 - C2) * V1 + 1 / 3 * ((C2 - C3) * V2 + 1 / 3 * ((C3 - C4) * V3 + 1 / 3 * ((C4 - C5) * V4 + 1 / 3 * ((C5 - C6) * V5 + 1 / 3 * ((C6 - C7) * V6))))))) + .040072228 * ((C - C1) * V + 49 / 51 * ((C1 - C2) * V1 + 49 / 51 * ((C2 - C3) * V2 + 49 / 51 * ((C3 - C4) * V3 + 49 / 51 * ((C4 - C5) * V4 + 49 / 51 * ((C5 - C6) * V5 + 49 / 51 * ((C6 - C7) * V6 + 49 / 51 * ((C7 - C8) * V7 + 49 / 51 * ((C8 - C9) * V8 + 49 / 51 * ((C9 - C10) * V9 + 49 / 51 * ((C10 - C11) * V10 + 49 / 51 * ((C11 - C12) * V11 + 49 / 51 * ((C12 - C13) * V12 + 49 / 51 * ((C13 - C14) * V13 + 49 / 51 * ((C14 - C15) * V14 + 49 / 51 * ((C15 - C16) * V15 + 49 / 51 * ((C16 - C17) * V16 + 49 / 51 * ((C17 - C18) * V17 + 49 / 51 * ((C18 - C19) * V18 + 49 / 51 * ((C19 - C20) * V19 + 49 / 51 * ((C20 - C21) * V20 + 49 / 51 * ((C21 - C22) * V21 + 49 / 51 * ((C22 - C23) * V22 + 49 / 51 * ((C23 - C24) * V23 + 49 / 51 * ((C24 - C25) * V24 + 49 / 51 * ((C25 - C26) * V25 + 49 / 51 * ((C26 - C27) * V26 + 49 / 51 * ((C27 - C28) * V27 + 49 / 51 * ((C28 - C29) * V28 + 49 / 51 * ((C29 - C30) * V29 + 49 / 51 * ((C30 - C31) * V30 + 49 / 51 * ((C31 - C32) * V31 + 49 / 51 * ((C32 - C33) * V32 + 49 / 51 * ((C33 - C34) * V33 + 49 / 51 * ((C34 - C35) * V34 + 49 / 51 * ((C35 - C36) * V35 + 49 / 51 * ((C36 - C37) * V36 + 49 / 51 * ((C37 - C38) * V37 + 49 / 51 * ((C38 - C39) * V38 + 49 / 51 * ((C39 - C40) * V39 + 49 / 51 * ((C40 - C41) * V40 + 49 / 51 * ((C41 - C42) * V41 + 49 / 51 * ((C42 - C43) * V42 + 49 / 51 * ((C43 - C44) * V43 + 49 / 51 * ((C44 - C45) * V44 + 49 / 51 * ((C45 - C46) * V45 + 49 / 51 * ((C46 - C47) * V46 + 49 / 51 * ((C47 - C48) * V47 + 49 / 51 * ((C48 - C49) * V48 + 49 / 51 * ((C49 - C50) * V49 + 49 / 51 * ((C50 - C51) * V50 + 49 / 51 * ((C51 - C52) * V51 + 49 / 51 * ((C52 - C53) * V52 + 49 / 51 * ((C53 - C54) * V53 + 49 / 51 * ((C54 - C55) * V54 + 49 / 51 * ((C55 - C56) * V55 + 49 / 51 * ((C56 - C57) * V56 + 49 / 51 * ((C57 - C58) * V57 + 49 / 51 * ((C58 - C59) * V58 + 49 / 51 * ((C59 - C60) * V59 + 49 / 51 * ((C60 - C61) * V60 + 49 / 51 * ((C61 - C62) * V61 + 49 / 51 * ((C62 - C63) * V62 + 49 / 51 * ((C63 - C64) * V63 + 49 / 51 * ((C64 - C65) * V64 + 49 / 51 * ((C65 - C66) * V65 + 49 / 51 * ((C66 - C67) * V66 + 49 / 51 * ((C67 - C68) * V67 + 49 / 51 * ((C68 - C69) * V68 + 49 / 51 * ((C69 - C70) * V69 + 49 / 51 * ((C70 - C71) * V70 + 49 / 51 * ((C71 - C72) * V71 + 49 / 51 * ((C72 - C73) * V72 + 49 / 51 * ((C73 - C74) * V73 + 49 / 51 * ((C74 - C75) * V74 + 49 / 51 * ((C75 - C76) * V75 + 49 / 51 * ((C76 - C77) * V76 + 49 / 51 * ((C77 - C78) * V77 + 49 / 51 * ((C78 - C79) * V78 + 49 / 51 * ((C79 - C80) * V79 + 49 / 51 * ((C80 - C81) * V80 + 49 / 51 * ((C81 - C82) * V81 + 49 / 51 * ((C82 - C83) * V82 + 49 / 51 * ((C83 - C84) * V83 + 49 / 51 * ((C84 - C85) * V84 + 49 / 51 * ((C85 - C86) * V85 + 49 / 51 * ((C86 - C87) * V86 + 49 / 51 * ((C87 - C88) * V87 + 49 / 51 * ((C88 - C89) * V88 + 49 / 51 * ((C89 - C90) * V89 + 49 / 51 * ((C90 - C91) * V90 + 49 / 51 * ((C91 - C92) * V91 + 49 / 51 * ((C92 - C93) * V92 + 49 / 51 * ((C93 - C94) * V93 + 49 / 51 * ((C94 - C95) * V94 + 49 / 51 * ((C95 - C96) * V95 + 49 / 51 * ((C96 - C97) * V96 + 49 / 51 * ((C97 - C98) * V97 + 49 / 51 * ((C98 - C99) * V98 + 49 / 51 * ((C99 - C100) * V99 + 49 / 51 * ((C100 - C101) * V100 + 49 / 51 * ((C101 - C102) * V101 + 49 / 51 * ((C102 - C103) * V102 + 49 / 51 * ((C103 - C104) * V103 + 49 / 51 * ((C104 - C105) * V104 + 49 / 51 * ((C105 - C106) * V105 + 49 / 51 * ((C106 - C107) * V106 + 49 / 51 * ((C107 - C108) * V107 + 49 / 51 * ((C108 - C109) * V108 + 49 / 51 * ((C109 - C110) * V109 + 49 / 51 * ((C110 - C111) * V110 + 49 / 51 * ((C111 - C112) * V111 + 49 / 51 * ((C112 - C113) * V112 + 49 / 51 * ((C113 - C114) * V113 + 49 / 51 * ((C114 - C115) * V114 + 49 / 51 * ((C115 - C116) * V115 + 49 / 51 * ((C116 - C117) * V116 + 49 / 51 * ((C117 - C118) * V117 + 49 / 51 * ((C118 - C119) * V118 + 49 / 51 * ((C119 - C120) * V119 + 49 / 51 * ((C120 - C121) * V120 + 49 / 51 * ((C121 - C122) * V121 + 49 / 51 * ((C122 - C123) * V122 + 49 / 51 * ((C123 - C124) * V123 + 49 / 51 * ((C124 - C125) * V124 + 49 / 51 * ((C125 - C126) * V125 + 49 / 51 * ((C126 - C127) * V126 + 49 / 51 * ((C127 - C128) * V127 + 49 / 51 * ((C128 - C129) * V128 + 49 / 51 * ((C129 - C130) * V129 + 49 / 51 * ((C130 - C131) * V130 + 49 / 51 * ((C131 - C132) * V131 + 49 / 51 * ((C132 - C133) * V132 + 49 / 51 * ((C133 - C134) * V133 + 49 / 51 * ((C134 - C135) * V134 + 49 / 51 * ((C135 - C136) * V135 + 49 / 51 * ((C136 - C137) * V136 + 49 / 51 * ((C137 - C138) * V137 + 49 / 51 * ((C138 - C139) * V138 + 49 / 51 * ((C139 - C140) * V139 + 49 / 51 * ((C140 - C141) * V140 + 49 / 51 * ((C141 - C142) * V141 + 49 / 51 * ((C142 - C143) * V142 + 49 / 51 * ((C143 - C144) * V143 + 49 / 51 * ((C144 - C145) * V144 + 49 / 51 * ((C145 - C146) * V145 + 49 / 51 * ((C146 - C147) * V146 + 49 / 51 * ((C147 - C148) * V147 + 49 / 51 * ((C148 - C149) * V148 + 49 / 51 * ((C149 - C150) * V149 + 49 / 51 * ((C150 - C151) * V150 + 49 / 51 * ((C151 - C152) * V151 + 49 / 51 * ((C152 - C153) * V152 + 49 / 51 * ((C153 - C154) * V153 + 49 / 51 * ((C154 - C155) * V154 + 49 / 51 * ((C155 - C156) * V155 + 49 / 51 * ((C156 - C157) * V156 + 49 / 51 * ((C157 - C158) * V157 + 49 / 51 * ((C158 - C159) * V158 + 49 / 51 * ((C159 - C160) * V159 + 49 / 51 * ((C160 - C161) * V160 + 49 / 51 * ((C161 - C162) * V161 + 49 / 51 * ((C162 - C163) * V162 + 49 / 51 * ((C163 - C164) * V163 + 49 / 51 * ((C164 - C165) * V164 + 49 / 51 * ((C165 - C166) * V165 + 49 / 51 * ((C166 - C167) * V166 + 49 / 51 * ((C167 - C168) * V167 + 49 / 51 * ((C168 - C169) * V168 + 49 / 51 * ((C169 - C170) * V169 + 49 / 51 * ((C170 - C171) * V170 + 49 / 51 * ((C171 - C172) * V171 + 49 / 51 * ((C172 - C173) * V172)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/7/2014 Posts: 26
|
This works perfectly, thanks Bruce!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |