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 |

How would I created an inside bar indicator Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
conceicaod
Posted : Sunday, September 20, 2009 11:14:43 PM
Registered User
Joined: 8/6/2009
Posts: 2

I would like to scan for inside bar. A inside bar is a forms when a market has a small range day as compared to the range of the previous day. This simply means that it is a bar with a lower high and a higher low than the previous bar. There an example at http://www.traderslog.com/macdinsidebar.htm .

Is there a way you can show me how I can do this?

Julia_O
Posted : Monday, September 21, 2009 1:39:13 PM


Worden Trainer

Joined: 4/26/2007
Posts: 508
conceicaod,

I've shared a Layout that includes an Inside Bar rule.  To retrieve the Layout, select the Share Library from the main menu (envelope with @ symbol).  Select Browse Other Users Shared Items.  Within the Layout tab, search for Inside Bar.  You'll be able to save the rule for re-use once the Layout's open.

Hope that helps.

Julia
Trader905
Posted : Friday, November 16, 2012 1:48:40 PM
Registered User
Joined: 11/16/2012
Posts: 6

Julia,

To add to this discussion. I'm scanning for inside bars using this code: If Price.Low < Price.Low(1) And Price.Low(2) < Price.Low(1) And Price.High(1) < Price.High(2) Then pass

 

I would like to add a condition that stock must be positive (or negative) on all time frames (daily,weekly,monthly) in order to be included in the backtest. Ideally I can run this scan on daily or intraday timeframes. 

How could this be done?

Thanks,

Josh

Bruce_L
Posted : Friday, November 16, 2012 2:26:03 PM


Worden Trainer

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

In TC2000 version 12.2, you would create a Condition for the stock being positive or negative. Depending on your definition, this could be:

C > C1

Or:

C > O

For positive and:

C < C1

Or:

C < O

For negative (it could actually be something else entirely, but those would be the most common definitions).

Personal Criteria Formula Conditions
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!

You would then add the Conditions to the same EasyScan as your Inside Bar Conditions. You would need to add the positive or negative Condition to the EasyScan three times. You would set the Time Frame of one of the Conditions to Daily, another to Weekly and the other to Monthly. The EasyScan would only return symbols where all of the EasyScan Conditions are true.

EasyScan Basics
EasyScan Expanded

You will need TC2000 Platinum to create intraday Conditions or EasyScans in TC2000 version 12.2.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Trader905
Posted : Friday, November 16, 2012 4:30:04 PM
Registered User
Joined: 11/16/2012
Posts: 6

Hi Bruce, thanks for the reply.

I have the scan in place on TC2000 - I do have platnium. I'm looking to input it into stockfinder so I can back test the theory. I'm unfamaliar with the stockfinder coding so any help would be appreciated.

Josh

Bruce_L
Posted : Friday, November 16, 2012 4:55:05 PM


Worden Trainer

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

How do you see a stock being positive? Is the close above the open, the previous close, both or something else?



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Trader905
Posted : Friday, November 16, 2012 5:05:28 PM
Registered User
Joined: 11/16/2012
Posts: 6

The previous close. If 11/16/12 was an inside day to 11/9/12 (weekly chart) I would want the 11/16/12 bar to be above last weeks close. 

Bruce_L
Posted : Monday, November 19, 2012 10:19:25 AM


Worden Trainer

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

Take your existing RealCode Condition:

If Price.Low < Price.Low(1) And Price.Low(2) < Price.Low(1) And Price.High(1) < Price.High(2) Then pass

And add AndAlso Price.Last > Price.Price.Last(1) to it if you want the current close to be above the previous close:

If Price.Low < Price.Low(1) AndAlso Price.Low(2) < Price.Low(1) AndAlso Price.High(1) < Price.High(2) AndAlso Price.Last > Price.Last(1) Then Pass

Or AndAlso Price.Low > Price.Last(1) if you need the entire bar to above the previous close:

If Price.Low < Price.Low(1) AndAlso Price.Low(2) < Price.Low(1) AndAlso Price.High(1) < Price.High(2) AndAlso Price.Low > Price.Last(1) Then Pass

If you use the RealCode Condition on a Weekly Chart, it will use a Weekly Time Frame.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
JA5
Posted : Monday, May 20, 2013 10:54:31 PM
Registered User
Joined: 7/25/2011
Posts: 17

I have TC2000 Gold, can you tell me how to create a scanning condition for daily, weekly, monthly that identifies inside bar where inside bar can have the low greater than or equal to the prior low and the high is less than or equal to prior high. I want to be able to identify if either a)  the current bar is an inside bar or the b) the prior bar is inside.  I would like to add a condition that stock must be positive (or negative) on all time frames (daily,weekly) in order to be included where positive is defined as positive vs the open.

In a separate scan I want the same thing but if the current price is greater than the inside bar.

I am a total beginner on this so if you can give me the baby steps that would be great. thank you.

Bruce_L
Posted : Tuesday, May 21, 2013 10:02:26 AM


Worden Trainer

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

It is not possible to create a single Condition Formula which can check for Daily, Weekly and Monthly requirements in TC2000 version 12.3.

The following Condition Formula checks for an inside bar during the current or previous bar with the current bar having a close above the open (if you meant something else, we will need additional clarification as to your intent). You will select Library | Conditions | New Condition Formula to create the Condition Formula.

((L1 <= L AND H <= H1) OR (L2 <= L1 AND H1 <= H2)) AND C > O

You will then add it this same Condition Formula to a single EasyScan three times. Once the Conditions are added to the EasyScan, you can click on them to change the Time Frame of that Condition. You will want one of the EasyScan Conditions set to Daily, one of the EasyScan Conditions set to Weekly, and one EasyScan Condition set to Monthly.

Building a Scan with Multiple Conditions

The other EasyScan would be created the same way, except with a slightly different formula. Note that this only checks for an inside bar on the previous bar as the current price cannot be above the entire inside bar if the current bar is the inside bar.

L2 <= L1 AND H1 <= H2 AND C > H1



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