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 |

Pivot Points Moving Average Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
walabi-1
Posted : Tuesday, August 4, 2009 12:49:03 AM
Registered User
Joined: 10/9/2006
Posts: 35
How do I covert a custom indicator I created in telechart to stockfinder. If it can't be converted I need help to create a moving average for 3 consecutive days pivot points and for 5 consecutive days pivot points in stockfinder. Thnaks.

3ma = (p1+p2+p3)/3    and 5ma = (p1+p2+p3+p4+p5)/5.
Bruce_L
Posted : Tuesday, August 4, 2009 12:38:38 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
The easiest way would probably be to create a Pivot Point Indicator and then add Moving Averages as Child Indicators. The following RealCode Indicator should produce a Moving Pivot Point Indicator:

Plot = (Price.High(1) + Price.Low(1) + Price.Last(1)) / 3

That would be similar to what would be created by Plotting the following formula as a Custom Indicator in TeleChart:

(H1 + L1 + C1) / 3

You could build the Simple Moving Average into the RealCode Indicator using something similar to the following instead:

'# Period = UserInput.Integer = 3
Static SMA As Single
Static Old As Integer
If CurrentIndex > Period Then
    SMA += (Price.High(1) + Price.Low(1) + Price.Last(1)) / 3 - _
        (Price.High(Old) + Price.Low(Old) + Price.Last(Old)) / 3
Else If isFirstBar Then
    SMA = 0
    Old = Period + 1
Else
    SMA += (Price.High(1) + Price.Low(1) + Price.Last(1)) / 3
End If
If CurrentIndex >= Period Then
    Plot = SMA
Else
    Plot = Single.NaN
End If

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