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 |

about obv Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
georgecdemas
Posted : Monday, October 22, 2012 11:34:20 AM
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

StockGuy
Posted : Monday, October 22, 2012 11:49:17 AM

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.

georgecdemas
Posted : Thursday, October 25, 2012 6:14:50 PM
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

StockGuy
Posted : Thursday, October 25, 2012 6:24:46 PM

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.

georgecdemas
Posted : Thursday, October 25, 2012 6:50:18 PM
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.

StockGuy
Posted : Thursday, October 25, 2012 7:32:12 PM

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

 

georgecdemas
Posted : Thursday, October 25, 2012 7:52:26 PM
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.

StockGuy
Posted : Thursday, October 25, 2012 9:56:21 PM

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.

georgecdemas
Posted : Friday, October 26, 2012 4:49:22 PM
Registered User
Joined: 3/24/2005
Posts: 72

Thank you for that information

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.