| Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 1/6/2005 Posts: 4
|
I'd like to create a condition for price- 30 bar new high. When I right clicked the price on the graph
and put in price history new high. I tried all different combinations for high period___ and for passing
___ of last ___ bars. Nothing seems to work. What would be the proper entries to get this to work?
Or should I just use real code in which case what would it be? Thank you.
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
If you want to completely control the details, I would just create a RealCode Condition:
Writing Conditions in RealCode
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:New High
'|******************************************************************
'# Period = UserInput.Integer = 30
If Price.High > Price.MaxHigh(Period - 1, 1) Then Pass
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/6/2005 Posts: 4
|
When I tried it, 2 errors came up.
1) If, else, elself, end if, or const expected.
2) Name Period is not declared.
Any suggestions.
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
If copying and pasting the RealCode Condition into the Code tab of the RealCode Editor of a RealCode Condition isn't working, try copyng the RealCode Condition from the forums and just pasting it directly into the chart of StockFinder.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/6/2005 Posts: 4
|
Thank you. I was able to copy and paste it without a problem. I have been trying to figure out a way how to write a code for an intra-day consolidation breakout. I am looking for a scan so I can find stocks that are basically flat the entire day and then have an usual volume spike that is accompanied by a significant increase in price. I am not sure if you are able to look at a chart so you can better understand what I am looking for but some examples from yesterday would include YPF at 1:09, RIMM at 10:00, and MBI at 10:09. If you have any suggestions I would greatly appreciate it.
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You could add a Volume Surge indicator to the chart to check for increased volume. You could then right-click on it and select Create Condition | Greater Than to create a Condition. If you do not adjust the settings of the Volume Surge indicator, you could set Greater Than to 3.0000 to capture YPF at 1:12, RIMM at 10:04 and MBI at 10:12.
You could add a 1-Period Price Rate of Change (Percent) indicator to check for changes in price. You could then right-click on it and select Create Condition | Greate Than to create a Condition. You coul dthen set Greater Than to 1.000 to capture YPF at 1:12, RIMM at 10:04 and MBI at 10:12.
You could add an Average True Range indicator to the chart to check for the range. Since you would probably want to determine that this range has suddenly increased, you could then add a 1-Period Rate of Change (Percent) of Indicator to the Average True Range. You could then right-click on the ROC of ATR indicator and select Create Condition | Greater Than to create a Condition for increased ATR. If you do not adjust the settings of the ATR, you could set Greater Than to 25.0000 to capture YPF at 1:12, RIMM at 10:04 and MBI at 10:12.
You could then Drag and Drop these Conditions onto each other to create a Combo Condition.
Creating Conditions
You would probably want to fine tune the settings to check for your specific requirements, as the settings chosen were just fitted to the data of the three stocks mentioned on a 1-Minute Chart.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
|
Guest-1 |