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 |

Help with Custom indicator Crossing Moving average Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
ronbary
Posted : Saturday, November 18, 2006 4:14:46 PM
Registered User
Joined: 5/27/2005
Posts: 35
Hi Support ,
My name is Ron and i want you to help me to do the following :


I Have "Custom Cumulative Indicator" that plot a line on the middle window . ( Blue line )

I have also another line on the middle window that plot the "Mov Avg 10"
( yellow line )


I want to write PCF to detect when Crossover occured between My
"Custom Cumulative Indicator" line and the "Mov Avg 10" line ,
when Crossing of the "Custom Cumulative Indicator" ( Blue line) cross to the upside the "Mov Avg 10" ( yellow line )


Here is How i build the "Custom Cumulative Indicator"

Up Condition:
c-avgc10>0 and avgc20>(avgc20+avgc20.1+avgc20.2)/3

Down Condition:
c-avgc10<0 and avgc20<(avgc20+avgc20.1+avgc20.2)/3


Value to Add/Substruct :
1+1


So What i want is to detect when my "Custom Cumulative Indicator" crossing to the upside the Moving Average 10 .
and put this in PCF .


thanks

Ron





Craig_S
Posted : Wednesday, November 22, 2006 9:00:14 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Is it a simple or exponential moving average?

- Craig
Here to Help!
ronbary
Posted : Wednesday, November 22, 2006 5:49:17 PM
Registered User
Joined: 5/27/2005
Posts: 35
Hi Craig ,

It is a Simple moving average ,

i just want to detect when my indicator crossing up the 10 Simple Moving
average .

thanks

Ron
Bruce_L
Posted : Friday, November 24, 2006 11:42:41 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
ronbary,
Please try the following:

0 > 9 * ((C > AVGC10 AND AVGC20 > AVG(AVGC20,3)) - (C < AVGC10 AND AVGC20 < AVG(AVGC20,3))) + 8 * ((C1 > AVGC10.1 AND AVGC20.1 > AVG(AVGC20.1,3)) - (C1 < AVGC10.1 AND AVGC20.1 < AVG(AVGC20.1,3))) + 7 * ((C2 > AVGC10.2 AND AVGC20.2 > AVG(AVGC20.2,3)) - (C2 < AVGC10.2 AND AVGC20.2 < AVG(AVGC20.2,3))) + 6 * ((C3 > AVGC10.3 AND AVGC20.3 > AVG(AVGC20.3,3)) - (C3 < AVGC10.3 AND AVGC20.3 < AVG(AVGC20.3,3))) + 5 * ((C4 > AVGC10.4 AND AVGC20.4 > AVG(AVGC20.4,3)) - (C4 < AVGC10.4 AND AVGC20.4 < AVG(AVGC20.4,3))) + 4 * ((C5 > AVGC10.5 AND AVGC20.5 > AVG(AVGC20.5,3)) - (C5 < AVGC10.5 AND AVGC20.5 < AVG(AVGC20.5,3))) + 3 * ((C6 > AVGC10.6 AND AVGC20.6 > AVG(AVGC20.6,3)) - (C6 < AVGC10.6 AND AVGC20.6 < AVG(AVGC20.6,3))) + 2 * ((C7 > AVGC10.7 AND AVGC20.7 > AVG(AVGC20.7,3)) - (C7 < AVGC10.7 AND AVGC20.7 < AVG(AVGC20.7,3))) + (C8 > AVGC10.8 AND AVGC20.8 > AVG(AVGC20.8,3)) - (C8 < AVGC10.8 AND AVGC20.8 < AVG(AVGC20.8,3)) AND 0 <= 9 * ((C1 > AVGC10.1 AND AVGC20.1 > AVG(AVGC20.1,3)) - (C1 < AVGC10.1 AND AVGC20.1 < AVG(AVGC20.1,3))) + 8 * ((C2 > AVGC10.2 AND AVGC20.2 > AVG(AVGC20.2,3)) - (C2 < AVGC10.2 AND AVGC20.2 < AVG(AVGC20.2,3))) + 7 * ((C3 > AVGC10.3 AND AVGC20.3 > AVG(AVGC20.3,3)) - (C3 < AVGC10.3 AND AVGC20.3 < AVG(AVGC20.3,3))) + 6 * ((C4 > AVGC10.4 AND AVGC20.4 > AVG(AVGC20.4,3)) - (C4 < AVGC10.4 AND AVGC20.4 < AVG(AVGC20.4,3))) + 5 * ((C5 > AVGC10.5 AND AVGC20.5 > AVG(AVGC20.5,3)) - (C5 < AVGC10.5 AND AVGC20.5 < AVG(AVGC20.5,3))) + 4 * ((C6 > AVGC10.6 AND AVGC20.6 > AVG(AVGC20.6,3)) - (C6 < AVGC10.6 AND AVGC20.6 < AVG(AVGC20.6,3))) + 3 * ((C7 > AVGC10.7 AND AVGC20.7 > AVG(AVGC20.7,3)) - (C7 < AVGC10.7 AND AVGC20.7 < AVG(AVGC20.7,3))) + 2 * ((C8 > AVGC10.8 AND AVGC20.8 > AVG(AVGC20.8,3)) - (C8 < AVGC10.8 AND AVGC20.8 < AVG(AVGC20.8,3))) + (C9 > AVGC10.9 AND AVGC20.9 > AVG(AVGC20.9,3)) - (C9 < AVGC10.9 AND AVGC20.9 < AVG(AVGC20.9,3))

You may wish to review the following:

How to create a Personal Criteria Forumula (PCF)
Handy PCF example formulas to help you learn the syntax of PCFs!

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
ronbary
Posted : Tuesday, November 28, 2006 5:37:08 AM
Registered User
Joined: 5/27/2005
Posts: 35
Bruce

Thanks , It works fine.

Now how can i do just the opposite , detect when the Indicator Crossing down the 10 SMA .

thanks

Ron
Bruce_L
Posted : Wednesday, November 29, 2006 1:43:52 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Please try the following:

0 < 9 * ((C > AVGC10 AND AVGC20 > AVG(AVGC20,3)) - (C < AVGC10 AND AVGC20 < AVG(AVGC20,3))) + 8 * ((C1 > AVGC10.1 AND AVGC20.1 > AVG(AVGC20.1,3)) - (C1 < AVGC10.1 AND AVGC20.1 < AVG(AVGC20.1,3))) + 7 * ((C2 > AVGC10.2 AND AVGC20.2 > AVG(AVGC20.2,3)) - (C2 < AVGC10.2 AND AVGC20.2 < AVG(AVGC20.2,3))) + 6 * ((C3 > AVGC10.3 AND AVGC20.3 > AVG(AVGC20.3,3)) - (C3 < AVGC10.3 AND AVGC20.3 < AVG(AVGC20.3,3))) + 5 * ((C4 > AVGC10.4 AND AVGC20.4 > AVG(AVGC20.4,3)) - (C4 < AVGC10.4 AND AVGC20.4 < AVG(AVGC20.4,3))) + 4 * ((C5 > AVGC10.5 AND AVGC20.5 > AVG(AVGC20.5,3)) - (C5 < AVGC10.5 AND AVGC20.5 < AVG(AVGC20.5,3))) + 3 * ((C6 > AVGC10.6 AND AVGC20.6 > AVG(AVGC20.6,3)) - (C6 < AVGC10.6 AND AVGC20.6 < AVG(AVGC20.6,3))) + 2 * ((C7 > AVGC10.7 AND AVGC20.7 > AVG(AVGC20.7,3)) - (C7 < AVGC10.7 AND AVGC20.7 < AVG(AVGC20.7,3))) + (C8 > AVGC10.8 AND AVGC20.8 > AVG(AVGC20.8,3)) - (C8 < AVGC10.8 AND AVGC20.8 < AVG(AVGC20.8,3)) AND 0 >= 9 * ((C1 > AVGC10.1 AND AVGC20.1 > AVG(AVGC20.1,3)) - (C1 < AVGC10.1 AND AVGC20.1 < AVG(AVGC20.1,3))) + 8 * ((C2 > AVGC10.2 AND AVGC20.2 > AVG(AVGC20.2,3)) - (C2 < AVGC10.2 AND AVGC20.2 < AVG(AVGC20.2,3))) + 7 * ((C3 > AVGC10.3 AND AVGC20.3 > AVG(AVGC20.3,3)) - (C3 < AVGC10.3 AND AVGC20.3 < AVG(AVGC20.3,3))) + 6 * ((C4 > AVGC10.4 AND AVGC20.4 > AVG(AVGC20.4,3)) - (C4 < AVGC10.4 AND AVGC20.4 < AVG(AVGC20.4,3))) + 5 * ((C5 > AVGC10.5 AND AVGC20.5 > AVG(AVGC20.5,3)) - (C5 < AVGC10.5 AND AVGC20.5 < AVG(AVGC20.5,3))) + 4 * ((C6 > AVGC10.6 AND AVGC20.6 > AVG(AVGC20.6,3)) - (C6 < AVGC10.6 AND AVGC20.6 < AVG(AVGC20.6,3))) + 3 * ((C7 > AVGC10.7 AND AVGC20.7 > AVG(AVGC20.7,3)) - (C7 < AVGC10.7 AND AVGC20.7 < AVG(AVGC20.7,3))) + 2 * ((C8 > AVGC10.8 AND AVGC20.8 > AVG(AVGC20.8,3)) - (C8 < AVGC10.8 AND AVGC20.8 < AVG(AVGC20.8,3))) + (C9 > AVGC10.9 AND AVGC20.9 > AVG(AVGC20.9,3)) - (C9 < AVGC10.9 AND AVGC20.9 < AVG(AVGC20.9,3))

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