Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 3/24/2005 Posts: 72
|
Would you be so kind as to give me the actual code for a PCF. I would like to include that in a pcf with other code.
Thanks
|
|
 Administration
Joined: 9/30/2004 Posts: 9,187
|
OBV1
It will not match the value plotted on the chart since OBV is cumulative and the PCF only calculates using enough data to return a value.
But formulas like OBV1 > OBV1.1 will return True if OBV is up from the previous bar.
|
|
Registered User Joined: 3/24/2005 Posts: 72
|
I would be highly appreciative if you could give me the entire formula for OBV. I am trying to learn how to code an OBV formula so that I can create a PCF. And, by learning how to code that,I can learn how to handle accumulations, something I have no knowledge about. And by creating the PCF I have some ideas on how to alter the formula.
Its OK with me if it does not create an exact value. What I want to know is how they deal with accumulations, since I understand OBV has to maintain the value of a high close day - hold that value and then deal with a low close day.
Thanks for your help
|
|
 Administration
Joined: 9/30/2004 Posts: 9,187
|
You can't plot OBV as a Custom Indicator unless you use the OBV function.
But you could use the Custom Cumulative Indicator to create OBV or any other cumulative indicator.
OBV using the Custom Cumulative indicator:
Up Condition: C > C1
Down Condition: C < C1
Value to Add/Subtract: V
When price is up from the previous day, it will add the volume to the running total. When price is down from the previous day, it will subtract that day's volume from the running total.
|
|
Registered User Joined: 3/24/2005 Posts: 72
|
Thank you.
That is a very surprising answer. But, it leads me to ask you - where can I find the Custom Cumulative Indicator.?.
Is OBV calculated using the Custom Cumulative Indicator - or some other code ? My initial impression was that OBV was coded using PCF code.
Thanks again.
|
|
 Administration
Joined: 9/30/2004 Posts: 9,187
|
QUOTE (georgecdemas)
Thank you.
That is a very surprising answer. But, it leads me to ask you - where can I find the Custom Cumulative Indicator.?.
Is OBV calculated using the Custom Cumulative Indicator - or some other code ? My initial impression was that OBV was coded using PCF code.
Thanks again.
Right click on the chart and select Add Indicator > Custom > Cumulative
|
|
Registered User Joined: 3/24/2005 Posts: 72
|
Please tell me if OBV is coded using PCF code, cumulative indicator or another type of code. If another type of code please tell me what kind of code.
|
|
 Administration
Joined: 9/30/2004 Posts: 9,187
|
The On Balance Volume indicator, like all indicators in TC2000 (and the program itself), is coded in Visual Basic.
There is an OBV function in the PCF language that you can use in a custom formula like OBV1 > OBV1.1 (for increasing OBV).
The Custom Cumulative indicator let's you plot cumulative indicators (like OBV). The Up Condition, Down Condition and Value to Add/Subtract are written using the PCF language.
There is no way to code OBV as a standalone formula using the PCF language since it essentially requires an If/Then loop. The Custom Cumulative handles that using the Up and Down conditions.
|
|
Registered User Joined: 3/24/2005 Posts: 72
|
Thank you for that information
|
|
Guest-1 |