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 |

writing Indicators Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Richard_Holden
Posted : Thursday, August 23, 2012 11:16:47 AM
Registered User
Joined: 6/8/2012
Posts: 6

Hi

I'm pretty good at writing code but could do with some help regarding syntax and parameters.

Could you detail the exact syntax for the following PCF Indicators:-

   Volume - The 25 day Exponental Moving Average of Volume

   TSV(24Period) - The 12 Day Exp Moving Average of TSV(24Period)

   Wilders RSI15 - Wilders RSI75

 

I should be able to work a number of otherthings out from this

Thanks

Richard

StockGuy
Posted : Thursday, August 23, 2012 11:20:46 AM

Administration

Joined: 9/30/2004
Posts: 9,187

XAVGV25

XAVG = exponential average

V = Volume

25 = period (days)

XAVG(TSV24,12)

TSV 24 = 24 period TSV

12 = period to use in the average

We don't have a function for Wilder's RSI.  It can be calculated mathematically but our formula expert, Bruce, is on vacation until Aug 28th.  I'll see if he can look at this when he gets back.

Richard_Holden
Posted : Thursday, August 23, 2012 11:29:02 AM
Registered User
Joined: 6/8/2012
Posts: 6

QUOTE (StockGuy)

XAVGV25

XAVG = exponential average

V = Volume

25 = period (days)

XAVG(TSV24,12)

TSV 24 = 24 period TSV

12 = period to use in the average

We don't have a function for Wilder's RSI.  It can be calculated mathematically but our formula expert, Bruce, is on vacation until Aug 28th.  I'll see if he can look at this when he gets back.

Thanks, this is very helpfull

Is there an online document with more examples. the user guide is quite sparce ?

If not, how do I get the previous days TSV24 ( TSV24,-1) ?

 

Thanks

 

Bruce_L
Posted : Tuesday, August 28, 2012 11:23:30 AM


Worden Trainer

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

The prior 25-Period Exponential Moving Average of Volume would be:

XAVGV25.1

The prior 12-Period Exponential Moving Average of a 24-Period Simple TSV could be written as:

XAVG(TSV24.1,12)

A 15-Period Wilder's Smoothed RSI could be written as:

50 * (C - XAVGC29.1) / 15 / (.0666731065612527 * (ABS(C - C1) + 14 / 15 * (ABS(C1 - C2) + 14 / 15 * (ABS(C2 - C3) + 14 / 15 * (ABS(C3 - C4) + 14 / 15 * (ABS(C4 - C5) + 14 / 15 * (ABS(C5 - C6) + 14 / 15 * (ABS(C6 - C7) + 14 / 15 * (ABS(C7 - C8) + 14 / 15 * (ABS(C8 - C9) + 14 / 15 * (ABS(C9 - C10) + 14 / 15 * (ABS(C10 - C11) + 14 / 15 * (ABS(C11 - C12) + 14 / 15 * (ABS(C12 - C13) + 14 / 15 * (ABS(C13 - C14) + 14 / 15 * (ABS(C14 - C15) + 14 / 15 * (ABS(C15 - C16) + 14 / 15 * (ABS(C16 - C17) + 14 / 15 * (ABS(C17 - C18) + 14 / 15 * (ABS(C18 - C19) + 14 / 15 * (ABS(C19 - C20) + 14 / 15 * (ABS(C20 - C21) + 14 / 15 * (ABS(C21 - C22) + 14 / 15 * (ABS(C22 - C23) + 14 / 15 * (ABS(C23 - C24) + 14 / 15 * (ABS(C24 - C25) + 14 / 15 * (ABS(C25 - C26) + 14 / 15 * (ABS(C26 - C27) + 14 / 15 * (ABS(C27 - C28) + 14 / 15 * (ABS(C28 - C29) + 14 / 15 * (ABS(C29 - C30) + 14 / 15 * (ABS(C30 - C31) + 14 / 15 * (ABS(C31 - C32) + 14 / 15 * (ABS(C32 - C33) + 14 / 15 * (ABS(C33 - C34) + 14 / 15 * (ABS(C34 - C35) + 14 / 15 * (ABS(C35 - C36) + 14 / 15 * (ABS(C36 - C37) + 14 / 15 * (ABS(C37 - C38) + 14 / 15 * (ABS(C38 - C39) + 14 / 15 * (ABS(C39 - C40) + 14 / 15 * (ABS(C40 - C41) + 14 / 15 * (ABS(C41 - C42) + 14 / 15 * (ABS(C42 - C43) + 14 / 15 * (ABS(C43 - C44) + 14 / 15 * (ABS(C44 - C45) + 14 / 15 * (ABS(C45 - C46) + 14 / 15 * (ABS(C46 - C47) + 14 / 15 * (ABS(C47 - C48) + 14 / 15 * (ABS(C48 - C49) + 14 / 15 * (ABS(C49 - C50) + 14 / 15 * (ABS(C50 - C51) + 14 / 15 * (ABS(C51 - C52) + 14 / 15 * (ABS(C52 - C53) + 14 / 15 * (ABS(C53 - C54) + 14 / 15 * (ABS(C54 - C55) + 14 / 15 * (ABS(C55 - C56) + 14 / 15 * (ABS(C56 - C57) + 14 / 15 * (ABS(C57 - C58) + 14 / 15 * (ABS(C58 - C59) + 14 / 15 * (ABS(C59 - C60) + 14 / 15 * (ABS(C60 - C61) + 14 / 15 * (ABS(C61 - C62) + 14 / 15 * (ABS(C62 - C63) + 14 / 15 * (ABS(C63 - C64) + 14 / 15 * (ABS(C64 - C65) + 14 / 15 * (ABS(C65 - C66) + 14 / 15 * (ABS(C66 - C67) + 14 / 15 * (ABS(C67 - C68) + 14 / 15 * (ABS(C68 - C69) + 14 / 15 * (ABS(C69 - C70) + 14 / 15 * (ABS(C70 - C71) + 14 / 15 * (ABS(C71 - C72) + 14 / 15 * (ABS(C72 - C73) + 14 / 15 * (ABS(C73 - C74) + 14 / 15 * (ABS(C74 - C75) + 14 / 15 * (ABS(C75 - C76) + 14 / 15 * (ABS(C76 - C77) + 14 / 15 * (ABS(C77 - C78) + 14 / 15 * (ABS(C78 - C79) + 14 / 15 * (ABS(C79 - C80) + 14 / 15 * (ABS(C80 - C81) + 14 / 15 * (ABS(C81 - C82) + 14 / 15 * (ABS(C82 - C83) + 14 / 15 * (ABS(C83 - C84) + 14 / 15 * (ABS(C84 - C85) + 14 / 15 * (ABS(C85 - C86) + 14 / 15 * (ABS(C86 - C87) + 14 / 15 * (ABS(C87 - C88) + 14 / 15 * (ABS(C88 - C89) + 14 / 15 * (ABS(C89 - C90) + 14 / 15 * (ABS(C90 - C91) + 14 / 15 * (ABS(C91 - C92) + 14 / 15 * (ABS(C92 - C93) + 14 / 15 * (ABS(C93 - C94) + 14 / 15 * (ABS(C94 - C95) + 14 / 15 * (ABS(C95 - C96) + 14 / 15 * (ABS(C96 - C97) + 14 / 15 * (ABS(C97 - C98) + 14 / 15 * (ABS(C98 - C99) + 14 / 15 * (ABS(C99 - C100) + 14 / 15 * (ABS(C100 - C101) + 14 / 15 * (ABS(C101 - C102) + 14 / 15 * (ABS(C102 - C103) + 14 / 15 * (ABS(C103 - C104) + 14 / 15 * (ABS(C104 - C105) + 14 / 15 * (ABS(C105 - C106) + 14 / 15 * (ABS(C106 - C107) + 14 / 15 * (ABS(C107 - C108) + 14 / 15 * (ABS(C108 - C109) + 14 / 15 * (ABS(C109 - C110) + 14 / 15 * (ABS(C110 - C111) + 14 / 15 * (ABS(C111 - C112) + 14 / 15 * (ABS(C112 - C113) + 14 / 15 * (ABS(C113 - C114) + 14 / 15 * (ABS(C114 - C115) + 14 / 15 * (ABS(C115 - C116) + 14 / 15 * (ABS(C116 - C117) + 14 / 15 * (ABS(C117 - C118) + 14 / 15 * (ABS(C118 - C119) + 14 / 15 * (ABS(C119 - C120) + 14 / 15 * (ABS(C120 - C121) + 14 / 15 * (ABS(C121 - C122) + 14 / 15 * (ABS(C122 - C123) + 14 / 15 * (ABS(C123 - C124) + 14 / 15 * (ABS(C124 - C125) + 14 / 15 * (ABS(C125 - C126) + 14 / 15 * (ABS(C126 - C127) + 14 / 15 * (ABS(C127 - C128) + 14 / 15 * (ABS(C128 - C129) + 14 / 15 * (ABS(C129 - C130) + 14 / 15 * (ABS(C130 - C131) + 14 / 15 * (ABS(C131 - C132) + 14 / 15 * (ABS(C132 - C133) + 14 / 15 * (ABS(C133 - C134)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) + 50

But a 75-Period Wilder's Smoothed RSI is way too long and slow for me to post in the forums. If you used non-Wilder's Smoothed RSI instead, the formula could be written as:

RSI15 - RSI75

The PCF Formula Descriptions topic has a fairly comprehensive list of the syntax which is valid in the Personal Criteria Formula Language and the Handy PCF example formulas to help you learn the syntax of PCFs! topic has some basic example PCFs.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Richard_Holden
Posted : Tuesday, August 28, 2012 11:50:33 AM
Registered User
Joined: 6/8/2012
Posts: 6

Hi Bruce,

Thanks for the info, I'm starting to get the hang of the PCF syntax etc.

Although an If Then Else clause would be very useful

 

Richard

Bruce_L
Posted : Tuesday, August 28, 2012 12:35:22 PM


Worden Trainer

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

The fact that a boolean that returns true equals negative one and a boolean that returns false equals zero does allow for very ugly and complicated If Then Else type syntax. You can see how this would work in the Days Since Last Peak (or other day-counting needs) topic.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Richard_Holden
Posted : Tuesday, August 28, 2012 2:46:32 PM
Registered User
Joined: 6/8/2012
Posts: 6

You're right the If Then is just about doable, however the Else clause gets really ugly.

I'm sure i'm not the first to ask, but are there any plans to offer something a little more structures. It really wouldn't be that difficult to implement.

Thanks

Bruce_L
Posted : Tuesday, August 28, 2012 3:20:10 PM


Worden Trainer

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

I am not aware of any current plans to do so. That said, it is a popular suggestion and probably what I would personally most like to see added to TC2000 version 12.2.



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