Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Pocket Pivots in Stock Finder Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
hklala
Posted : Wednesday, September 22, 2010 11:58:39 AM
Registered User
Joined: 4/7/2010
Posts: 12

I am exploring how to make a condition in SF.Basics of Pocket Pivot Signature stamp1)Today's Close greater than yesterday's close2)Today's Close should be within 2% of 10d SMA3)Today's close above 50d SMA4)Today's volume > Highest of Last 15 negative Day's volumeI came up with the condition in Telechart..1) C > C1 2) H > AVGC10 and L < AvgC10 and (C < (AvgC10*1.02) and C >(AVGC10 * 0.98))3) C > AVGC503)V > ABS(C1 < C2) * V1 AND V > ABS(C2 < C3) * V2 AND V > ABS(C3 < C4) * V3 AND V > ABS(C4 < C5) * V4 AND V > ABS(C5 < C6) * V5 AND V > ABS(C6 < C7) * V6 AND V > ABS(C7 < C8) * V7 AND V > ABS(C8 < C9) * V8 AND V > ABS(C9 < C10) * V9 AND V > ABS(C10 < C11) * V10 AND V > ABS(C11 < C12) * V11 AND V > ABS(C12 < C13) * V12 AND V > ABS(C13 < C14) * V13 AND V > ABS(C14 < C15) * V14 AND V > ABS(C15 < C16) * V15 Need help to convert this to SF for backtesting..

Bruce_L
Posted : Wednesday, September 22, 2010 1:01:15 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:hklala pocket pivot
'|******************************************************************
If CurrentIndex >= 49 Then
    If Price.Last > Price.Last(1) AndAlso _
        Price.High > Price.AVGC(10) AndAlso _
        Price.Low < Price.AVGC(10) AndAlso _
        System.Math.Abs(Price.Last / Price.AVGC(10) - 1) < .02 AndAlso _
        Price.Last > Price.AVG(50) Then
        Dim Test As Boolean = True
        For i As Integer = 1 To 15
            If Price.Last(i) < Price.Last(i + 1) AndAlso _
                Volume.Value <= Volume.Value(i) Then
                Test = False
                Exit For
            End If
        Next
        If Test = True Then
            Pass
        End If
    End If
Else
    SetIndexInvalid
End If

Writing Conditions in RealCode

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
hklala
Posted : Wednesday, September 22, 2010 3:01:11 PM
Registered User
Joined: 4/7/2010
Posts: 12
Wow this is fantastic.... Super Thanks
hklala
Posted : Wednesday, September 22, 2010 3:04:24 PM
Registered User
Joined: 4/7/2010
Posts: 12
Another Question....How do I created following conditions for backtesting1) Buy conditions when this pivots are met2) Buy only when VIX is below 20 day MA..Sell at Initial stop loss of 1%Sell when VIX goes above 20 day MASell at Profit of 20%Sell if the trade length is more than 200 days.
Bruce_L
Posted : Wednesday, September 22, 2010 5:00:29 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
- Add a Price for Symbol Indicator to the Chart and change the symbol to VIX--X.
- Add a 20-Period Simple Moving Average to the Price for Symbol Indicator.

Working with Indicators

- Drag and Drop the Price for Symbol Indicator onto its Moving Average and select Create Condition | Below MovAvg 20.
- Drag and Drop the Pocket Pivot Condition onto this new Condition and select Create New Combo Condition.
- Give the Combo Condition a name and select OK.
- Drag and Drop the Price for Symbol Indicator onto its Moving Average and select Create Condition | Above MovAvg 20.

Creating Conditions

- Select Open New BackScan.
- Drag and Drop the Combo Condition into BackScanner and select Buy.
- Drag and Drop the Price for Symbol below MovAvg 20 Condition into BackScanner and select Sell.
- Select Add Trade-Based Rule | Stop Loss 1% | Sell | OK.
- Select Add Trade-Based Rule | Profit Target 20% | Sell | OK.
- Select Add Trade-Based Rule | Trade Length | Greater Than 200 Bars | Sell | OK.

You can right-click on a Rule and select Edit to adjust its settings.
You can Drag and Drop the Rules above or below the other Rules to adjust their Priority (Rules that are higher in the list have a higher priority).

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