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 |

Custom Indicators - Difference Value Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
investalert
Posted : Saturday, November 7, 2015 5:54:22 AM
Registered User
Joined: 4/29/2006
Posts: 75

Hi Bruce,

I have two custom indicators and need help developing a PCF to calculate the difference between them.

FIrst Indicator

Period:  55

Average Type:  Exponential

Formula:  (C-xavgC2.1)*(V/xavgV2.1)*1000

Data Source:  Price History

Second Indicator

Period:  48

Offset:  0

Average Type:  Front Weighted

Data Source:  First Indicator

Your help is greatly appreciated.

Bruce_L
Posted : Monday, November 9, 2015 3:06:43 PM


Worden Trainer

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

I cannot think of a way to create a formula for this which would be short and fast enough to post in the forums.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
investalert
Posted : Monday, November 9, 2015 3:55:46 PM
Registered User
Joined: 4/29/2006
Posts: 75


Would it be possible if we make all averages "simple",except those within the PCF fomulas of the first indicator, and omit the "1000"?

Bruce_L
Posted : Monday, November 9, 2015 4:00:16 PM


Worden Trainer

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

The *1000 part doesn't make any difference.

It should be possible with both averages being simple, both averages being front weighted or one moving average being simple and the other being front weighted. It will still be a very long and slow formula though.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
investalert
Posted : Monday, November 9, 2015 5:30:26 PM
Registered User
Joined: 4/29/2006
Posts: 75

After applying your suggestions and viewing my indicators I would prefer both averages be front weighted with the PCF formula remaining unchanged.  I am more interested in being able to scan at the end of the day than see it in realtime so the speed is not that important.

Thanks,

Investalert

 

 

Bruce_L
Posted : Tuesday, November 10, 2015 11:02:02 AM


Worden Trainer

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

Just want to verify you actually need a formula for this. If not, you can set up the first indicator (you can even have the Average Type set to Exponential) and add a MACD 1,48 to the chart with the Average Type set to Front Weighted.

Then change the Data Source of the MACD to use the first indicator.

How to change the data source for an Indicator

Just for reference, the Indicator Formula for the difference between the first and second indicators when the Average Type of both is set to Front Weighted can be written as follows.

25 * (62040 * V * (C - XAVGC2.1) / XAVGV2.1 + 58327 * V1 * (C1 - XAVGC2.2) / XAVGV2.2 + 54716 * V2 * (C2 - XAVGC2.3) / XAVGV2.3 + 51206 * V3 * (C3 - XAVGC2.4) / XAVGV2.4 + 47796 * V4 * (C4 - XAVGC2.5) / XAVGV2.5 + 44485 * V5 * (C5 - XAVGC2.6) / XAVGV2.6 + 41272 * V6 * (C6 - XAVGC2.7) / XAVGV2.7 + 38156 * V7 * (C7 - XAVGC2.8) / XAVGV2.8 + 35136 * V8 * (C8 - XAVGC2.9) / XAVGV2.9 + 32211 * V9 * (C9 - XAVGC2.10) / XAVGV2.10 + 29380 * V10 * (C10 - XAVGC2.11) / XAVGV2.11 + 26642 * V11 * (C11 - XAVGC2.12) / XAVGV2.12 + 23996 * V12 * (C12 - XAVGC2.13) / XAVGV2.13 + 21441 * V13 * (C13 - XAVGC2.14) / XAVGV2.14 + 18976 * V14 * (C14 - XAVGC2.15) / XAVGV2.15 + 16600 * V15 * (C15 - XAVGC2.16) / XAVGV2.16 + 14312 * V16 * (C16 - XAVGC2.17) / XAVGV2.17 + 12111 * V17 * (C17 - XAVGC2.18) / XAVGV2.18 + 9996 * V18 * (C18 - XAVGC2.19) / XAVGV2.19 + 7966 * V19 * (C19 - XAVGC2.20) / XAVGV2.20 + 6020 * V20 * (C20 - XAVGC2.21) / XAVGV2.21 + 4157 * V21 * (C21 - XAVGC2.22) / XAVGV2.22 + 2376 * V22 * (C22 - XAVGC2.23) / XAVGV2.23 + 676 * V23 * (C23 - XAVGC2.24) / XAVGV2.24 - 944 * V24 * (C24 - XAVGC2.25) / XAVGV2.25 - 2485 * V25 * (C25 - XAVGC2.26) / XAVGV2.26 - 3948 * V26 * (C26 - XAVGC2.27) / XAVGV2.27 - 5334 * V27 * (C27 - XAVGC2.28) / XAVGV2.28 - 6644 * V28 * (C28 - XAVGC2.29) / XAVGV2.29 - 7879 * V29 * (C29 - XAVGC2.30) / XAVGV2.30 - 9040 * V30 * (C30 - XAVGC2.31) / XAVGV2.31 - 10128 * V31 * (C31 - XAVGC2.32) / XAVGV2.32 - 11144 * V32 * (C32 - XAVGC2.33) / XAVGV2.33 - 12089 * V33 * (C33 - XAVGC2.34) / XAVGV2.34 - 12964 * V34 * (C34 - XAVGC2.35) / XAVGV2.35 - 13770 * V35 * (C35 - XAVGC2.36) / XAVGV2.36 - 14508 * V36 * (C36 - XAVGC2.37) / XAVGV2.37 - 15179 * V37 * (C37 - XAVGC2.38) / XAVGV2.38 - 15784 * V38 * (C38 - XAVGC2.39) / XAVGV2.39 - 16324 * V39 * (C39 - XAVGC2.40) / XAVGV2.40 - 16800 * V40 * (C40 - XAVGC2.41) / XAVGV2.41 - 17213 * V41 * (C41 - XAVGC2.42) / XAVGV2.42 - 17564 * V42 * (C42 - XAVGC2.43) / XAVGV2.43 - 17854 * V43 * (C43 - XAVGC2.44) / XAVGV2.44 - 18084 * V44 * (C44 - XAVGC2.45) / XAVGV2.45 - 18255 * V45 * (C45 - XAVGC2.46) / XAVGV2.46 - 18368 * V46 * (C46 - XAVGC2.47) / XAVGV2.47 - 18424 * (V47 * (C47 - XAVGC2.48) / XAVGV2.48 + V48 * (C48 - XAVGC2.49) / XAVGV2.49 + V49 * (C49 - XAVGC2.50) / XAVGV2.50 + V50 * (C50 - XAVGC2.51) / XAVGV2.51 + V51 * (C51 - XAVGC2.52) / XAVGV2.52 + V52 * (C52 - XAVGC2.53) / XAVGV2.53 + V53 * (C53 - XAVGC2.54) / XAVGV2.54 + V54 * (C54 - XAVGC2.55) / XAVGV2.55 + V55 * (C55 - XAVGC2.56) / XAVGV2.56) - 17296 * V56 * (C56 - XAVGC2.57) / XAVGV2.57 - 16215 * V57 * (C57 - XAVGC2.58) / XAVGV2.58 - 15180 * V58 * (C58 - XAVGC2.59) / XAVGV2.59 - 14190 * V59 * (C59 - XAVGC2.60) / XAVGV2.60 - 13244 * V60 * (C60 - XAVGC2.61) / XAVGV2.61 - 12341 * V61 * (C61 - XAVGC2.62) / XAVGV2.62 - 11480 * V62 * (C62 - XAVGC2.63) / XAVGV2.63 - 10660 * V63 * (C63 - XAVGC2.64) / XAVGV2.64 - 9880 * V64 * (C64 - XAVGC2.65) / XAVGV2.65 - 9139 * V65 * (C65 - XAVGC2.66) / XAVGV2.66 - 8436 * V66 * (C66 - XAVGC2.67) / XAVGV2.67 - 7770 * V67 * (C67 - XAVGC2.68) / XAVGV2.68 - 7140 * V68 * (C68 - XAVGC2.69) / XAVGV2.69 - 6545 * V69 * (C69 - XAVGC2.70) / XAVGV2.70 - 5984 * V70 * (C70 - XAVGC2.71) / XAVGV2.71 - 5456 * V71 * (C71 - XAVGC2.72) / XAVGV2.72 - 4960 * V72 * (C72 - XAVGC2.73) / XAVGV2.73 - 4495 * V73 * (C73 - XAVGC2.74) / XAVGV2.74 - 4060 * V74 * (C74 - XAVGC2.75) / XAVGV2.75 - 3654 * V75 * (C75 - XAVGC2.76) / XAVGV2.76 - 3276 * V76 * (C76 - XAVGC2.77) / XAVGV2.77 - 2925 * V77 * (C77 - XAVGC2.78) / XAVGV2.78 - 2600 * V78 * (C78 - XAVGC2.79) / XAVGV2.79 - 2300 * V79 * (C79 - XAVGC2.80) / XAVGV2.80 - 2024 * V80 * (C80 - XAVGC2.81) / XAVGV2.81 - 1771 * V81 * (C81 - XAVGC2.82) / XAVGV2.82 - 1540 * V82 * (C82 - XAVGC2.83) / XAVGV2.83 - 1330 * V83 * (C83 - XAVGC2.84) / XAVGV2.84 - 1140 * V84 * (C84 - XAVGC2.85) / XAVGV2.85 - 969 * V85 * (C85 - XAVGC2.86) / XAVGV2.86 - 816 * V86 * (C86 - XAVGC2.87) / XAVGV2.87 - 680 * V87 * (C87 - XAVGC2.88) / XAVGV2.88 - 560 * V88 * (C88 - XAVGC2.89) / XAVGV2.89 - 455 * V89 * (C89 - XAVGC2.90) / XAVGV2.90 - 364 * V90 * (C90 - XAVGC2.91) / XAVGV2.91 - 286 * V91 * (C91 - XAVGC2.92) / XAVGV2.92 - 220 * V92 * (C92 - XAVGC2.93) / XAVGV2.93 - 165 * V93 * (C93 - XAVGC2.94) / XAVGV2.94 - 120 * V94 * (C94 - XAVGC2.95) / XAVGV2.95 - 84 * V95 * (C95 - XAVGC2.96) / XAVGV2.96 - 56 * V96 * (C96 - XAVGC2.97) / XAVGV2.97 - 35 * V97 * (C97 - XAVGC2.98) / XAVGV2.98 - 20 * V98 * (C98 - XAVGC2.99) / XAVGV2.99 - 10 * V99 * (C99 - XAVGC2.100) / XAVGV2.100 - 4 * V100 * (C100 - XAVGC2.101) / XAVGV2.101 - V101 * (C101 - XAVGC2.102) / XAVGV2.102) / 45276



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