Registered User Joined: 3/8/2009 Posts: 6
|
I am working on a multiple condition scan using LR13, lin regression of the trend on my Weekly.
Have created "LR13 moving up" with your standard preformatted categories from the chart > create a scan etc. Works fine because regression line already covers multiple bar trend, in this case 13 weeks.
Created "LR13 crossing down EMA20" and the system chooses W1 added to the title of the condition.
But I want to find the crossing down between the LR13 and EMA20 (exp mov avr) on ANY of the last 3 weeks on the weekly. Then compare it scanning with ANY of the last 5 weeks a crossing down. So: "whenever there has been, or is, a crossing down in the last 3 weeks, show me the results"
This includes the present week, I take that.
Can you help me making this condition
1. how to do this with preformatted catagories in the system working from charts?
2. I am happy to learn syntax and write a condition if necessary, but can you then suggest me how? Is there a syntax manual or video (I have seen the interesting Writing Cust Cond The Basics). Is that possible with indicators?
REgards.
Willem
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I have read through the request numerous times. While I am probably to the point where I am overthinking it now, I am pretty sure I have never had a clear understanding of what is being asked.
It seems from your description of LR13 moving up that you are probably using a Linear Regression Line indicator and not a Moving Linear Regression indicator (but I could be wrong about this).
The current Linear Regression Line indicator has pretty much nothing to do with the Linear Regression Line indicator as it was plotted yesterday. The Moving Linear Regression indicator plots the right-end points of the individual Linear Regression Line indicators over time.
So when you are asking about a LR13 crossing down through an EMA20 during the last 3 weeks, it is not clear if you are interested in the values of the Linear Regression Line as it would have been plotted at the time crossing through EMA20, if you are interested in the Moving Linear Regression Line crossing through EMA20 or if you are interested in how the current Linear Regression Line appears to be crossing through previous values of EMA20.
I am also not sure what is meant by the 5 weeks crossing reference which is sandwiched in between two 3 week references. How exactly is the 3 week crossing down being compared to the 5 week crossing down conditions?
What specifically you are attempting to identify will determine if it is possible at all to create the desired conditions by clicking on the chart and selecting Create Scan Condition. It will also change how it would be done.
The same would be true with creating Condition Formulas for linear regression and exponential moving average crosses.
The PCF Formula Descriptions topic lists all of the syntax which is valid in the Personal Criteria Formula Language while the Handy PCF example formulas to help you learn the syntax of PCFs! topic has basic examples of this syntax in use. The Using Linear Regression vs Classical Peaks/Valleys for Divergence Analysis topic explores the creation of fomulas related to linear regression specifically.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 3/8/2009 Posts: 6
|
LR13 question march 7
Bruce, I am sorry that my idea was not clear enough. Not very concvenient but you picked the error out of my thinking, thanks.
I am making a multiple condition scan with the idea of "strong trend exhausting" on the weekly, for which I took a regression line (best average line) for 13 weeks as an indicator.
But you are totally right: the LR Line of today has nothing to do with that of yesterdays. I forgot that the line is creates backwardly of course, so the whole idea is false. Moving LR is not the subject indeed.
After making this condition, I wanted to cross this line with EMA20 the last three weeks.
So: with LR13 makes no sense, I have to replace LR13 by something else.
My problem stays the same: measuring if and when every period the indicator has the same behavior.
"strong trend" definition: the EMA20 (weeks) is moving up for EVERY one of the last 8 weeks, no period excluded (flat or down). How to get that.
I shall make a new posted question and this one included a mistaken view of LR13.
Willem
|
Registered User Joined: 3/8/2009 Posts: 6
|
Exhaustion measure of strong weekly trend.
I want to assess/ scan within market groups or in a larger market: if and when a strong uptrend on the weekly might get "exhausted" or "may turn around".
So make 2 separate conditions to be combined, and later analogy: for downtrend.
Definition1:
"strong trend" exists if and when the EMA20 (weeks) is moving up for EVERY one of the last 8 weeks, no period excluded (flat or down).
Definition 2:
Crossing down. = EMA3 (3 periods/weeks) is crossing DOWN the ema20 on ANY OF THE LAST 3 weeks. So not just now, as soon as in 1 period it was-is crossing.
So:
Where did the ema3 cross down recently with a fairly strong trend as defined?Again this needs a condition for scanning.
Then combine both.
Hope this is clear enough to see my problem: not just a "move up" category now or a "crossing now", but defining "recently" in a rigorous manner for my purpose.
How to make this scan?
Willem
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
A Condition Formula for the 20-period exponential moving average moving up for each of the last eight weeks can be written as:
C > XAVGC20.1 AND C1 > XAVGC20.2 AND C2 > XAVGC20.3 AND C3 > XAVGC20.4 AND C4 > XAVGC20.5 AND C5 > XAVGC20.6 AND C6 > XAVGC20.7 AND C7 > XAVGC20.8
And a Condition Formula for the 3-period exponential moving average crossing down through the 20-period exponential moving average during any of the most recent three weeks can be written as:
SGN(XAVGC3 - XAVGC20) < SGN(XAVGC3.1 - XAVGC20.1) OR SGN(XAVGC3.1 - XAVGC20.1) < SGN(XAVGC3.2 - XAVGC20.2) OR SGN(XAVGC3.2 - XAVGC20.2) < SGN(XAVGC3.3 - XAVGC20.3)
Combining these condition formulas results in:
C > XAVGC20.1 AND C1 > XAVGC20.2 AND C2 > XAVGC20.3 AND C3 > XAVGC20.4 AND C4 > XAVGC20.5 AND C5 > XAVGC20.6 AND C6 > XAVGC20.7 AND C7 > XAVGC20.8 AND (SGN(XAVGC3 - XAVGC20) < SGN(XAVGC3.1 - XAVGC20.1) OR SGN(XAVGC3.1 - XAVGC20.1) < SGN(XAVGC3.2 - XAVGC20.2) OR SGN(XAVGC3.2 - XAVGC20.2) < SGN(XAVGC3.3 - XAVGC20.3))
Make sure you set the time frame of these Condition Formulas to weekly when you create them.
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|