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 |

Can we plot Horizontal lines Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
stanleyikem
Posted : Monday, October 1, 2018 8:49:16 AM
Registered User
Joined: 2/9/2011
Posts: 76

Hi, Is there a way to write a PCF or something that can plot horizontal lines on my charts? Almost like what is done with the pivot lines....

So that if condition A is true for instance, it draws a line on the price chart? Please advise.

 

Stan

Bruce_L
Posted : Monday, October 1, 2018 11:59:46 AM


Worden Trainer

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

There is a Last Horizontal Line Plot Style available for most indicators which will plot a horizontal line at the last value of the indicator instead of plotting the indicator values over time.

When you use the Horizontal Line Plot Style, you can adjust the line position (right, at bar, left) and the line length (using a slider).

That said, it is designed to plot a numeric value while a conditon returns true or false .There is a Custom PCF % True Indicator which will plot 100 when true and 0 when false (or a moving average of these values), but otherwise you would need to write some sort of formula as part of one of the different types of Custom PCF Indicators to convert the condition into a numeric value in order to plot a horizontal line at a value.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stanleyikem
Posted : Tuesday, October 2, 2018 10:18:48 AM
Registered User
Joined: 2/9/2011
Posts: 76

Hi Bruce,

I have a PCF I wrote, that I use - I added it to my Fundamentals and it works great - There is a feature called "Add condition Count" on the fundamentals that works beautifully for me using this PCF.  I wanted to know if there is a way to use that feature on an individual stock basis, unlike what I currently do with it in the Fundamentals window, where I can apply it to a list to count. 

I basically want to count how many times a condition (for instance C > L) is true on individual stocks/charts instead of on a list. Is this possible?

 

 

Bruce_L
Posted : Tuesday, October 2, 2018 10:35:16 AM


Worden Trainer

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

Something like the following?

CountTrue(C > L, 100)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stanleyikem
Posted : Tuesday, October 2, 2018 11:10:40 AM
Registered User
Joined: 2/9/2011
Posts: 76

Thanks Bruce - But I need a bit more help - 

So here is the PCF I wrote;

O >= L1 and C > AVGC9 and C1 > AVGH14 and O > AVGO9 and C >H14)

So how do I count True on this...

I wrote;

 

CountTrue (O >= L1 and C > AVGC9 and C1 > AVGH14 and O > AVGO9 and C >H14) - 

and got some Formular error message.

What I basically want to do is count how many times this is true and possibly be able to sort it out on my columns in my watchlist.

Bruce_L
Posted : Tuesday, October 2, 2018 11:16:37 AM


Worden Trainer

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

Did you have a chance to review the help topic referenced in my previous response?

You have a space between CountTrue() and its opening parenthesis. You didn't specify the number of bars over which to count how many times the formula was true (the following formula checks the most recent 100 bars).

CountTrue(O >= L1 AND C > AVGC9 AND C1 > AVGH14 AND O > AVGO9 AND C > H14, 100)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stanleyikem
Posted : Tuesday, October 2, 2018 11:39:54 AM
Registered User
Joined: 2/9/2011
Posts: 76

Thanks Bruce. My bad. I got it now. Is there any reason why "100" is the reference number here? I am trying to do some tweak and see if there is any impact though.

Secondly, what I was hoping to see as the outcome, was a number count as to when the condition is true or otherwise. If there was a way to attach an image here I would have sent you what I am looking at? can I send it to support?

Bruce_L
Posted : Tuesday, October 2, 2018 12:02:02 PM


Worden Trainer

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

100 was chosen mostly but not entirely arbitrarily. There has to be enough data available for whatever formula you are using to calculate period minus one bars ago. 100 is usually small enough. 100 is also the only value where the count and the percentage are the same.

Yes, you can send an image to support. You should reference the specific forum topic in your email.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Bruce_L
Posted : Tuesday, October 2, 2018 1:24:45 PM


Worden Trainer

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

I received your email and my guess is it just indicates you want the number to display in the report?

So within the Report window, choose Add Field (the green +) | Add Value | Write New Formula.

Put the formula in the box in the Formula tab and switch to the Properties tab.

Put some sort of name in the Description box.

Change Decimal Places from 2 to 0.

Set the Refresh Rate to the shortest available setting.

Adjust any other settings as desired.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stanleyikem
Posted : Tuesday, October 2, 2018 3:39:53 PM
Registered User
Joined: 2/9/2011
Posts: 76

Hi Bruce - thanks for the feedback. You are always so helpful.

Now, here is the challenge though; Within the cell properties of the Formular I am using is...

"List to Count" - from which a list to select is there; for instance -  MorningStar Industry Groups....

This invariably means the report is counting  based on the list....

What I was hoping this would do, is count based on the formular ON the Stock/chart in Question.

So as with the PCF example, if the condition is positive 10x, it tell me. If it is Negative 30x, it tells me - realtime as it would with a selected list on the List count....

Do you understand?

My concern is the stock in view not a List of stocks, or index or groups etc. 

So if I have this linked for my watchlist for instance, everytime I scroll through a stock/chart the numbers should change - based on the chart I am looking at... that's my focus.

Bruce_L
Posted : Tuesday, October 2, 2018 3:46:51 PM


Worden Trainer

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

If you followed my directions, there isn't anything at all about a List to Count. If you get a List to Count option, it reads like you are selecting Add Condition Count instead of Add Value.

Using Add Value | Write New Formula should bring up an Add condition cell window with a Formula tab and a Properties tab and List to Count should not appear in either tab.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stanleyikem
Posted : Monday, January 28, 2019 9:43:43 AM
Registered User
Joined: 2/9/2011
Posts: 76

Hi Bruce - 

I wanted to find out  - is it possible to build a PCF based on the moving averages on the daily or weekly (for instance) that can be reflected as a line on the intraday chart? So for example, if the moving 20MA on the daily is 15.50 on the daily of stock X, it can be referenced using a line on the intraday on a 5mins  intraday chart for instance (maybe using the horizontal line).... Do advise. 

Thanks - 

 

Bruce_L
Posted : Monday, January 28, 2019 10:29:28 AM


Worden Trainer

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

The simple answer is, "no" (and probably for a 5-minute time frame "no" even if you are just interested in an approximation).

You can try to approximate a moving average by multiplying the period of the longer time frame by how many bars of the shorter time frame would appear during one bar of the longer time frame.

For example, you could try multiplying the period of a daily moving average by 78 to get the period to use in a 5-minute time frame or multiplying the period of a weekly moving average by 390 to get the period to use in a 5-minute time frame.

That said, these periods are going to be quite high and the moving average needs to be constructed using the bars in the shorter time frame. This is only going to be 500 bars of data in the current production release or 1500 bars of data in the curernt beta release.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stanleyikem
Posted : Monday, January 28, 2019 12:47:29 PM
Registered User
Joined: 2/9/2011
Posts: 76

Hi Bruce, it seems even if I use the suggestion/examples you gave - there is no way to get that done. Right?

To other thing I wanted to know is when would the v19 of TC200 be released.

Bruce_L
Posted : Monday, January 28, 2019 12:53:33 PM


Worden Trainer

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

I have tried to be as clear as as I can in stating explicitly than you cannot mix time frames (and the limitations of any workarounds), but put as succinctly as possible:

No.

You should be able to download the beta on the page referenced in my Monday, January 28, 2019 10:29:28 AM ET response (or use TC2000 Anywhere)

I do not know when the next production release will happen. Currently if you want version 19, you would need to use the beta.

Note there is an setting under Tools | System Settings | General | Test Beta Releases to Always ask to run Beta, Always run Beta without asking, or Never ask to run a Beta version. You will need to have one of the first two options selected to run the beta (unless you are using TC2000 Anywhre).



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