Hindsight |
Gold User, Member, TeleChart
|
Registered User |
|
|
|
|
Unsure |
|
Thursday, October 7, 2004 |
Tuesday, June 5, 2012 12:30:40 AM |
5 [0.00% of all post / 0.00 posts per day] |
|
Hey, Bruce. I just noticed we have the same "Joined" date: 10/07/2004 . . .
:o)
|
Bruce -- This is very helpful. Thank you!
I'm now thinking that, instead of writing this as a PCF that I could call in an EasyScan, that I'll instead use it as a custom indicator in a chart along with a 5 period simple moving average. Doing this, I can sort based on above/below 5SMA and easily accomplish my objective.
So, again, thanks for your help.
-Mike.
|
Hey, Bruce. I'd like to create a custom 13-day Linear Regression PCF for use in an EasyScan. I've taken a look at the code you've created for the other users, above, but am at a loss on how to convert it to a 13-day timeframe. Could you coach me on how to modify the above to meet my needs?
Ideally, I'd like the measure of the slope to be my output for use in EasyScan. Given that the above code, when used in a chart, outputs a line that vissually reflects the price trend over that period, would I have to use two 13-day linear regression calculations offset by say, 13 days, and subtract the end-of-period calculation from the beginning of period calculation to get the slope? For instance, > 0 would suggest a positve slope and < 0 would suggest negative slope.
Thanks,
-Mike.
|
Bruce. Thank you for your help on this formula. It does yeild the output I'm after. I will seek to understand the logic involved. Thanks again.
|
I've toyed for a while trying to create a custom indicator to graphically illustrate consecutive days Up/Down. Ideally, I want an indicator that rises above zero when counting consecutive days up and falls below zero when counting consecutive days down. I can do it in Excel, but I am not yet versed enough in TC to translate my Excel formulas into PCF coding. Although I can determine Up/Down days [abs(C>C1)+abs(C<C1)*-1], I can’t figure the logic to add consecutive days and have the count remain anchored to zero (I’ve come up w/all sorts of convoluted, nonsensical formulas as I’ve tried to make this work!).
I can use a modification of the above formula in the additive custom indicator tool; however, that is truly additive. If the price closes up 3 consecutive days, the result is 3. Next, if it closes down 2 consecutive days, the result is 1 (3-2=1), instead of the -2 that I want it to return. I'm sure I'm simply missing some finer point of logic/understanding to make this thing work. Can any of you seasoned TC vets help me figure this out?
I hope I’ve explained what I’m after well enough for someone to catch my vision and provide some guidance. If not, please ask clarifying questions. Any help would be greatly appreciated.
Thanks, -Mike.
|
|