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 |

TD scans in SF Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
veeravallileelajaxxxxxxxxxxxxx
Posted : Thursday, January 28, 2010 2:55:00 PM
Registered User
Joined: 10/6/2009
Posts: 54

Hi Bruce,

           I have been studying Tobydad way of scanning the stocks, but when i try to implement them in SF,
I an unable to write them.Can i get them converted into real code ?

1.) C20 < C30 AND C15 < C20 AND C10 < C15 AND C5 < C10 AND L >= L1 * .95 AND L1 >= L2 * .95 AND L2 >= L3 * .95 AND C >= O AND TSV26 > TSV26.2

2.)TSV26 >= AVG(TSV26,13) + SQR(ABS(TSV26 ^ 2 + TSV26.1 ^ 2 + TSV26.2 ^ 2 + TSV26.3 ^ 2 + TSV26.4 ^ 2 + TSV26.5 ^ 2 + TSV26.6 ^ 2 + TSV26.7 ^ 2 + TSV26.8 ^ 2 + TSV26.9 ^ 2 + TSV26.10 ^ 2 + TSV26.11 ^ 2 + TSV26.12 ^ 2 - 13 * AVG(TSV26,13) ^ 2) / 12) AND TSV26 > TSV26.1

3.)V > AVGV120

then Open > Linear Regression 30

O > (AVGC30 + 14.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5)

then Price per share > $1

then Close > Open 2 days in a row

then Close near top candlestick 10% ( I am becoming a believer in Candlesticks)

C > O AND C >= H * .99

I have several variations of the above scan but basically the same.  Another variation weeds out stocks with a positive Linear Regression 32 slope

(15.5 * C + 14.5 * C1 + 13.5 * C2 + 12.5 * C3 + 11.5 * C4 + 10.5 * C5 + 9.5 * C6 + 8.5 * C7 + 7.5 * C8 + 6.5 * C9 + 5.5 * C10 + 4.5 * C11 + 3.5 * C12 + 2.5 * C13 + 1.5 * C14 + .5 * C15 - .5 * C16 - 1.5 * C17 - 2.5 * C18 - 3.5 * C19 - 4.5 * C20 - 5.5 * C21 - 6.5 * C22 - 7.5 * C23 - 8.5 * C24 - 9.5 * C25 - 10.5 * C26 - 11.5 * C27 - 12.5 * C28 - 13.5 * C29 - 14.5 * C30 - 15.5 * C31) / 2728

http://forums.worden.com/Default.aspx?g=posts&t=44037  from this link i got the above pcfs

4.) 

(ABS(OBV > AVG(OBV,30)) + ABS(STOC39.1 > 50) = 2) AND (ABS(OBV.1 > AVG(OBV.1,30)) + ABS(STOC39.1.1 > 50) < 2) 


Thankyou
leelaja

tobydad
Posted : Friday, January 29, 2010 11:25:26 PM

Registered User
Joined: 10/7/2004
Posts: 2,181
Let's hope Bruce can give us some help with this.
sanjayakdash
Posted : Tuesday, February 2, 2010 7:13:07 PM
Registered User
Joined: 11/24/2007
Posts: 10
Hi,

This is how I implemented in Stockfinder.

Step1. Create a LR30 indicator using the formula:
(AVGC30 + 14.5 * (14.5 * C + 13.5 * C1 + 12.5 * C2 + 11.5 * C3 + 10.5 * C4 + 9.5 * C5 + 8.5 * C6 + 7.5 * C7 + 6.5 * C8 + 5.5 * C9 + 4.5 * C10 + 3.5 * C11 + 2.5 * C12 + 1.5 * C13 + .5 * C14 - .5 * C15 - 1.5 * C16 - 2.5 * C17 - 3.5 * C18 - 4.5 * C19 - 5.5 * C20 - 6.5 * C21 - 7.5 * C22 - 8.5 * C23 - 9.5 * C24 - 10.5 * C25 - 11.5 * C26 - 12.5 * C27 - 13.5 * C28 - 14.5 * C29) / 2247.5)

'# MA = indicator.MovingAverage.2------> This is Price Simple Moving Average 30 day.
Dim LRCond As Single
Dim MPfactor As Single


MPfactor = 14.5
LRCond = 0
For index1 As Integer = 0 To 29
    LRCond += (MPfactor) * price.close(index1)
    MPfactor = MPfactor - 1
Next index1

LRCond = MA.value + ( (14.5 * LRCond ) / 2247.5)
Plot = LRCond


Step2: Add TSV 26day indicator to your chart.

Step3:Use "Add a Rule" button and select "create in real code" option and create Rule "TBD Scan"
C20 < C30 AND C15 < C20 AND C10 < C15 AND C5 < C10 AND L >= L1 * .95 AND L1 >= L2 * .95 AND L2 >= L3 * .95 AND C >= O AND TSV26 > TSV26.2


Code:
'# LRC = indicator.LRC-------> LR30 created in STep1
'# MA1 = indicator.MovingAverage------>13 Day moving average TSV26
'# VB = indicator.VolumeBars----> Volume
'# MA = indicator.MovingAverage.5-------> 120 day volume MA
'# TSV( = indicator.TimeSegmentedVolume(TSV).2
'*********************************************
'* if Price.Close > Price.Close(1) then Pass *
'*********************************************
'C20 < C30 AND C15 < C20 AND C10 < C15 AND C5 < C10 AND L >= L1 * .95 AND L1 >= L2 * .95 AND L2 >= L3 * .95 AND C >= O AND TSV26 > TSV26.2

Dim Criteria1 As Single
Dim TSVScan1 As Single
Dim TSVScan2 As Single

   
If  Price.Close(20) < Price.Close(30) AndAlso _
    Price.Close(10) < Price.Close(20) AndAlso _
    Price.Close(5) < Price.Close(10) AndAlso _
    LRC.value > 0.95 * LRC.value(1) AndAlso _
    LRC.value(1) >= 0.95 * LRC.value(2) AndAlso _
    LRC.value(2) >= 0.95 * LRC.value(3) AndAlso _
    Price.Close >= Price.Open AndAlso _
    TSV.value > TSV.value(2) AndAlso _
    VB.value > MA.value Then Criteria1 = 1


'TSV26 >= AVG(TSV26,13) + SQR(ABS(TSV26 ^ 2 + TSV26.1 ^ 2 + TSV26.2 ^ 2 + TSV26.3 ^ 2 + TSV26.4 ^ 2 + TSV26.5 ^ 2 + TSV26.6 ^ 2 + TSV26.7 ^ 2 + TSV26.8 ^ 2 + TSV26.9 ^ 2 + TSV26.10 ^ 2 + TSV26.11 ^ 2 + TSV26.12 ^ 2 - 13 * AVG(TSV26,13) ^ 2) / 12) AND TSV26 > TSV26.1

TSVScan1 = MA1.value + (((TSV.value) ^ 2 + (TSV.value(1)) ^ 2 + (TSV.value(2)) ^ 2 + (TSV.value(3)) ^ 2 + (TSV.value(4)) ^ 2 + (TSV.value(5)) ^ 2 + (TSV.value(6)) ^ 2 + (TSV.value(7)) ^ 2 + (TSV.value(8)) ^ 2 + (TSV.value(9)) ^ 2 + (TSV.value(10)) ^ 2 + (TSV.value(11)) ^ 2 + (TSV.value(12)) ^ 2 - 13 * (MA1.value) ^ 2) / 12) ^ 0.5

If TSV.value >= TSVScan1 AndAlso _
    TSV.value > TSV.value(1) Then TSVScan1 = 1

If Criteria1 AndAlso TSVScan1 then pass


Now you can add "TBD Scan" to the watch list with #Bar since true option and scan it.

Tobydad: Please let me know if you see any error so that I can correct it.



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