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

Pull Back Scan Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Reynolds05
Posted : Monday, April 16, 2012 2:21:01 PM
Registered User
Joined: 3/6/2005
Posts: 16

I need help writing Real Code for the following:

PULLBACK

The stock shows 3 consecutive  lower highs, and

The stock has three consecutive days of lower volume than the previous day, and

The highest high of the last two weeks is higher that the highest high of the previous two weeks and the lowest low of the last two weeks is higher that the lowest low of the previous two weeks.

PRICE TRIGGER

The price trigger occurs when today's high is greater than yesterday's high  and the 21 day simple moving average is greater than 200,000.

 

ENTRY

If the pullback happened yesterday and a trigger occurs today, then enter the market.

 

 

Bruce_L
Posted : Monday, April 16, 2012 2:51:54 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

I suspect you really only need RealCode for the Entry, but a RealCode Condition for the Pullback could be created as:

'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com 
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Pullback
'|******************************************************************
Static Count As Integer
If Price.High < Price.High(1) AndAlso _
	Volume.Value < Volume.Value(1) Then
	Count += 1
Else
	Count = 0
End If
If CurrentIndex >= 20 Then
	If Count >= 3 AndAlso _
		Price.MaxHigh(10) > Price.MaxHigh(10, 10) AndAlso _
		Price.MinLow(10) > Price.MinLow(10, 10) Then
		Pass
	End If
Else
	SetIndexInvalid
End If

A RealCode Condition for the Price Trigger could be created as:

'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com 
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Price Trigger
'|******************************************************************
If Volume.AVG(21) > 2000 AndAlso _
	Price.High > Price.High(1) Then Pass

And a RealCode Condition for the Entry could be created as:

'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com 
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Entry
'|******************************************************************
Static Count As Integer
If Price.High(1) < Price.High(2) AndAlso _
	Volume.Value(1) < Volume.Value(2) Then
	Count += 1
Else
	Count = 0
End If
If CurrentIndex >= 21 Then
	If Count >= 3 AndAlso _
		Price.High > Price.High(1) AndAlso _
		Volume.AVG(21) > 2000 AndAlso _
		Price.MaxHigh(10, 1) > Price.MaxHigh(10, 11) AndAlso _
		Price.MinLow(10, 1) > Price.MinLow(10, 11) Then
		Pass
	End If
Else
	SetIndexInvalid
End If


-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Trendo
Posted : Friday, March 20, 2015 1:50:05 PM
Registered User
Joined: 3/6/2011
Posts: 4

Hi Bruce,

can you please write me a PCF for that formula as I do not have Stock finder. Thanks

 

PULLBACK

The stock shows 3 consecutive  lower highs, and

The stock has three consecutive days of lower volume than the previous day, and

The highest high of the last two weeks is higher that the highest high of the previous two weeks and the lowest low of the last two weeks is higher that the lowest low of the previous two weeks.

PRICE TRIGGER

The price trigger occurs when today's high is greater than yesterday's high  and the 21 day simple moving average is greater than 200,000.

 

ENTRY

If the pullback happened yesterday and a trigger occurs today, then enter the market.

Bruce_L
Posted : Monday, March 23, 2015 2:53:19 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

A Condition Formula for the Pullback can be written as follows.

H < H1 AND H1 < H2 AND H2 < H3 AND MAXH10 > MAXH10.10 AND MINL10 > MINL10.10

A Condition Formula for the Price Trigger can be written as follows.

AVGV21 > 200000 AND H > H1

A Condition Formula for the Entry can be written as follows.

H > H1 AND H1 < H2 AND H2 < H3 AND H3 < H4 AND AVGV21 > 200000 AND MAXH10.1 > MAXH10.11 AND MINL10.1 > MINL10.11

PCF Formula Descriptions



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