Registered User Joined: 9/11/2014 Posts: 14
|
Cannot find anything in the stockfinder simular to the custom PCF cumulative indicator in TC2000? How can I create it?
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The following RealCode Indicator is designed to replicate the default Custom PCF Cumulative Indicator from TC2000 with the following settings. Note this this is essentially On Balance Volume (OBV).
- Up Condition: C > C1
- Down Condition: C < C1
- Value to Add/Subtract: V
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:Custom PCF Cumulative Example
'|******************************************************************
'#Cumulative
Static Sum As Single
If isFirstBar Then
Sum = 0
End If
Dim UpCondition As Boolean = False
If Price.Last > Price.Last(1) Then
UpCondition = True
End If
Dim DownCondition As Boolean = False
If Price.Last < Price.Last(1) Then
DownCondition = True
End If
Dim ValueToAddSubtract As Single
ValueToAddSubtract = Volume.Value
Sum += (DownCondition - UpCondition) * ValueToAddSubtract
Plot = Sum
You can use anything for the conditions. I just use If Price.Last > Price.Last(1) because that matches C > C1.
RealCode for Real People: Indicators (6:05)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|