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 |

PCF MA cross over Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
sejong
Posted : Monday, February 29, 2016 10:07:57 PM
Registered User
Joined: 12/11/2008
Posts: 39
Hi Bruce.
I would like to create two separate moving average cross over PCF for the following condition.
 
1. 3 days time frame.
2. crossing over within the last 4 bars (include 4, 3, 2, & 1 days ago).
3. 10EMA Close vs 10EMA Open on Candlesticks 
 
1. 3 days time frame.
2. crossing over within the last 4 bars (include 4, 3, 2, & 1 days ago).
3. 10EMA Close vs 10EMA Open on Heiken-Ashi bars
 

 

Bruce_L
Posted : Wednesday, March 2, 2016 11:41:36 AM


Worden Trainer

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

Does the direction of the cross matter?

Do the moving averages still need to be on the correct side of the cross or can the moving averages have switched back?



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
sejong
Posted : Wednesday, March 2, 2016 4:23:44 PM
Registered User
Joined: 12/11/2008
Posts: 39

I'd like to get PCF on both direction UP or Down, and I prefer it still need to be on the correct side.

Bruce_L
Posted : Wednesday, March 2, 2016 4:41:32 PM


Worden Trainer

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

Using normal bars can be written as follows.

Crossing Up:

XAVGC10 > XAVGO10 AND (XAVGC10.1 < XAVGO10.1 OR XAVGC10.2 < XAVGO10.2 OR XAVGC10.3 < XAVGO10.3 OR XAVGC10.4 < XAVGO10.4)

Crossing Down:

XAVGC10 < XAVGO10 AND (XAVGC10.1 > XAVGO10.1 OR XAVGC10.2 > XAVGO10.2 OR XAVGC10.3 > XAVGO10.3 OR XAVGC10.4 > XAVGO10.4)

Crossing Either Direction:

SGN(XAVGC10 - XAVGO10) <> SGN(XAVGC10.1 - XAVGO10.1) OR SGN(XAVGC10 - XAVGO10) <> SGN(XAVGC10.2 - XAVGO10.2) OR SGN(XAVGC10 - XAVGO10) <> SGN(XAVGC10.3 - XAVGO10.3) OR SGN(XAVGC10 - XAVGO10) <> SGN(XAVGC10.4 - XAVGO10.4)

Using Heiken-Ashi bars is a bit more complicated.

Crossing Up:

XAVGO10 + XAVGH10 + XAVGL10 + XAVGC10 > XAVG(XAVGO3.1,10) + XAVG(XAVGH3.1,10) + XAVG(XAVGL3.1,10) + XAVG(XAVGC3.1,10) AND (XAVGO10.1 + XAVGH10.1 + XAVGL10.1 + XAVGC10.1 < XAVG(XAVGO3.2,10) + XAVG(XAVGH3.2,10) + XAVG(XAVGL3.2,10) + XAVG(XAVGC3.2,10) OR XAVGO10.2 + XAVGH10.2 + XAVGL10.2 + XAVGC10.2 < XAVG(XAVGO3.3,10) + XAVG(XAVGH3.3,10) + XAVG(XAVGL3.3,10) + XAVG(XAVGC3.3,10) OR XAVGO10.3 + XAVGH10.3 + XAVGL10.3 + XAVGC10.3 < XAVG(XAVGO3.4,10) + XAVG(XAVGH3.4,10) + XAVG(XAVGL3.4,10) + XAVG(XAVGC3.4,10) OR XAVGO10.4 + XAVGH10.4 + XAVGL10.4 + XAVGC10.4 < XAVG(XAVGO3.5,10) + XAVG(XAVGH3.5,10) + XAVG(XAVGL3.5,10) + XAVG(XAVGC5.4,10))

Crossing Down:

XAVGO10 + XAVGH10 + XAVGL10 + XAVGC10 < XAVG(XAVGO3.1,10) + XAVG(XAVGH3.1,10) + XAVG(XAVGL3.1,10) + XAVG(XAVGC3.1,10) AND (XAVGO10.1 + XAVGH10.1 + XAVGL10.1 + XAVGC10.1 > XAVG(XAVGO3.2,10) + XAVG(XAVGH3.2,10) + XAVG(XAVGL3.2,10) + XAVG(XAVGC3.2,10) OR XAVGO10.2 + XAVGH10.2 + XAVGL10.2 + XAVGC10.2 > XAVG(XAVGO3.3,10) + XAVG(XAVGH3.3,10) + XAVG(XAVGL3.3,10) + XAVG(XAVGC3.3,10) OR XAVGO10.3 + XAVGH10.3 + XAVGL10.3 + XAVGC10.3 > XAVG(XAVGO3.4,10) + XAVG(XAVGH3.4,10) + XAVG(XAVGL3.4,10) + XAVG(XAVGC3.4,10) OR XAVGO10.4 + XAVGH10.4 + XAVGL10.4 + XAVGC10.4 > XAVG(XAVGO3.5,10) + XAVG(XAVGH3.5,10) + XAVG(XAVGL3.5,10) + XAVG(XAVGC5.4,10))

Crossing Either Direction:

SGN(XAVGO10 + XAVGH10 + XAVGL10 + XAVGC10 - XAVG(XAVGO3.1,10) - XAVG(XAVGH3.1,10) - XAVG(XAVGL3.1,10) - XAVG(XAVGC3.1,10)) <> SGN(XAVGO10.1 + XAVGH10.1 + XAVGL10.1 + XAVGC10.1 - XAVG(XAVGO3.2,10) - XAVG(XAVGH3.2,10) - XAVG(XAVGL3.2,10) - XAVG(XAVGC3.2,10)) OR SGN(XAVGO10 + XAVGH10 + XAVGL10 + XAVGC10 - XAVG(XAVGO3.1,10) - XAVG(XAVGH3.1,10) - XAVG(XAVGL3.1,10) - XAVG(XAVGC3.1,10)) <> SGN(XAVGO10.2 + XAVGH10.2 + XAVGL10.2 + XAVGC10.2 - XAVG(XAVGO3.3,10) - XAVG(XAVGH3.3,10) - XAVG(XAVGL3.3,10) - XAVG(XAVGC3.3,10)) OR SGN(XAVGO10 + XAVGH10 + XAVGL10 + XAVGC10 - XAVG(XAVGO3.1,10) - XAVG(XAVGH3.1,10) - XAVG(XAVGL3.1,10) - XAVG(XAVGC3.1,10)) <> SGN(XAVGO10.3 + XAVGH10.3 + XAVGL10.3 + XAVGC10.3 - XAVG(XAVGO3.4,10) - XAVG(XAVGH3.4,10) - XAVG(XAVGL3.4,10) - XAVG(XAVGC3.4,10)) OR SGN(XAVGO10 + XAVGH10 + XAVGL10 + XAVGC10 - XAVG(XAVGO3.1,10) - XAVG(XAVGH3.1,10) - XAVG(XAVGL3.1,10) - XAVG(XAVGC3.1,10)) <> SGN(XAVGO10.4 + XAVGH10.4 + XAVGL10.4 + XAVGC10.4 - XAVG(XAVGO3.5,10) - XAVG(XAVGH3.5,10) - XAVG(XAVGL3.5,10) - XAVG(XAVGC3.5,10))

How to implement Heiken-Ashi substitutions for any Open, High, Low, and Close



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