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 |

MACD Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
IK
Posted : Wednesday, February 2, 2011 1:50:09 AM
Registered User
Joined: 7/15/2009
Posts: 34
Hi and thanks for your help 
Can you please help me in writing a formula to find tme Macd BOTTOM in general and can I limit a second macd formula to a certain range of values (the bottom at a certain range probably close to 0)?
Thanks in advance
IK
Bruce_L
Posted : Wednesday, February 2, 2011 9:16:37 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
By bottom do you mean the MACD is below zero and was moving down during the previous Bar but is moving up during the current Bar or something else?

What are your MACD settings?

- Short: ?
- Long: ?
- Period: ?
- Average Type: Simple or Exponential?
- Plot MACD as Histogram: Checked or Unchecked?

Are you interesting the raw MACD, its Moving Average Signal Line or the MACD Histogram?

What "range of values" is of interest?

Understanding MACD

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
IK
Posted : Wednesday, February 2, 2011 10:57:32 AM
Registered User
Joined: 7/15/2009
Posts: 34

Hi and thanks
short 12
long 26
period 9
simple
unchecked
I prefer to use the signal line 9 period
thanks in advance

IK
Posted : Wednesday, February 2, 2011 11:00:01 AM
Registered User
Joined: 7/15/2009
Posts: 34
sorry
the bottom means when for 2-3 consecutive days it goes down (or up) and then change direction
the range of values is not important but I meant close to the crossover point
thanks again
Bruce_L
Posted : Wednesday, February 2, 2011 11:32:49 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
A Personal Criteria Formula for a Simple MACD 12,26,9 Signal Line bottom could be written as:

AVG(AVGC12,9) - AVG(AVGC26,9) > AVG(AVGC12.1,9) - AVG(AVGC26.1,9) AND AVG(AVGC12.1,9) - AVG(AVGC26.1,9) < AVG(AVGC12.2,9) - AVG(AVGC26.2,9) AND AVG(AVGC12.2,9) - AVG(AVGC26.2,9) < AVG(AVGC12.3,9) - AVG(AVGC26.3,9)

A PCF for a Simple MACD 12,26,9 Signal Line top could be written as:

AVG(AVGC12,9) - AVG(AVGC26,9) < AVG(AVGC12.1,9) - AVG(AVGC26.1,9) AND AVG(AVGC12.1,9) - AVG(AVGC26.1,9) > AVG(AVGC12.2,9) - AVG(AVGC26.2,9) AND AVG(AVGC12.2,9) - AVG(AVGC26.2,9) > AVG(AVGC12.3,9) - AVG(AVGC26.3,9)

A PCF for a Simple MACD 12,26,9 Signal Line bottom or top could be written as:

(AVG(AVGC12,9) - AVG(AVGC26,9) > AVG(AVGC12.1,9) - AVG(AVGC26.1,9) AND AVG(AVGC12.1,9) - AVG(AVGC26.1,9) < AVG(AVGC12.2,9) - AVG(AVGC26.2,9) AND AVG(AVGC12.2,9) - AVG(AVGC26.2,9) < AVG(AVGC12.3,9) - AVG(AVGC26.3,9)) OR (AVG(AVGC12,9) - AVG(AVGC26,9) < AVG(AVGC12.1,9) - AVG(AVGC26.1,9) AND AVG(AVGC12.1,9) - AVG(AVGC26.1,9) > AVG(AVGC12.2,9) - AVG(AVGC26.2,9) AND AVG(AVGC12.2,9) - AVG(AVGC26.2,9) > AVG(AVGC12.3,9) - AVG(AVGC26.3,9))

Does the change in direction need to happen at the same Bar as the crossover? If not, how many Bars away can it be?

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

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
IK
Posted : Wednesday, February 2, 2011 11:52:27 AM
Registered User
Joined: 7/15/2009
Posts: 34
Hi
no, It can be up to 10 bars
Thanks
Bruce_L
Posted : Wednesday, February 2, 2011 11:58:03 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
OK then, I didn't expect a number so large, so I may be misunderstanding. Do you mean within 10-Bars of the last time MACD crossed through the Signal Line or within 10-Bars of the last time the Signal Line crossed through zero?

If you mean within 10-Bars of the last time the Signal Line crossed through zero, does a bottom need to be below zero and a top need to be above zero?

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
IK
Posted : Wednesday, February 2, 2011 12:38:07 PM
Registered User
Joined: 7/15/2009
Posts: 34
Hi
it doesn't need to be above or under the zero. the change in direction needn't to happen at the same Bar as the crossover.you can reduce the number of bars and I'll see if I need to increase it.
thanks
Bruce_L
Posted : Wednesday, February 2, 2011 12:44:54 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
A Personal Criteria Formula for a Simple MACD 12,26,9 Signal Line bottom with MACD crossing through its Signal line within the last 10-Bars could be written as:

AVG(AVGC12,9) - AVG(AVGC26,9) > AVG(AVGC12.1,9) - AVG(AVGC26.1,9) AND AVG(AVGC12.1,9) - AVG(AVGC26.1,9) < AVG(AVGC12.2,9) - AVG(AVGC26.2,9) AND AVG(AVGC12.2,9) - AVG(AVGC26.2,9) < AVG(AVGC12.3,9) - AVG(AVGC26.3,9) AND (SGN(AVGC12 - AVGC26 - AVG(AVGC12,9) + AVG(AVGC26,9)) <> SGN(AVGC12.1 - AVGC26.1 - AVG(AVGC12.1,9) + AVG(AVGC26.1,9)) OR SGN(AVGC12.1 - AVGC26.1 - AVG(AVGC12.1,9) + AVG(AVGC26.1,9)) <> SGN(AVGC12.2 - AVGC26.2 - AVG(AVGC12.2,9) + AVG(AVGC26.2,9)) OR SGN(AVGC12.2 - AVGC26.2 - AVG(AVGC12.2,9) + AVG(AVGC26.2,9)) <> SGN(AVGC12.3 - AVGC26.3 - AVG(AVGC12.3,9) + AVG(AVGC26.3,9)) OR SGN(AVGC12.3 - AVGC26.3 - AVG(AVGC12.3,9) + AVG(AVGC26.3,9)) <> SGN(AVGC12.4 - AVGC26.4 - AVG(AVGC12.4,9) + AVG(AVGC26.4,9)) OR SGN(AVGC12.4 - AVGC26.4 - AVG(AVGC12.4,9) + AVG(AVGC26.4,9)) <> SGN(AVGC12.5 - AVGC26.5 - AVG(AVGC12.5,9) + AVG(AVGC26.5,9)) OR SGN(AVGC12.5 - AVGC26.5 - AVG(AVGC12.5,9) + AVG(AVGC26.5,9)) <> SGN(AVGC12.6 - AVGC26.6 - AVG(AVGC12.6,9) + AVG(AVGC26.6,9)) OR SGN(AVGC12.6 - AVGC26.6 - AVG(AVGC12.6,9) + AVG(AVGC26.6,9)) <> SGN(AVGC12.7 - AVGC26.7 - AVG(AVGC12.7,9) + AVG(AVGC26.7,9)) OR SGN(AVGC12.7 - AVGC26.7 - AVG(AVGC12.7,9) + AVG(AVGC26.7,9)) <> SGN(AVGC12.8 - AVGC26.8 - AVG(AVGC12.8,9) + AVG(AVGC26.8,9)) OR SGN(AVGC12.8 - AVGC26.8 - AVG(AVGC12.8,9) + AVG(AVGC26.8,9)) <> SGN(AVGC12.9 - AVGC26.9 - AVG(AVGC12.9,9) + AVG(AVGC26.9,9)) OR SGN(AVGC12.9 - AVGC26.9 - AVG(AVGC12.9,9) + AVG(AVGC26.9,9)) <> SGN(AVGC12.10 - AVGC26.10 - AVG(AVGC12.10,9) + AVG(AVGC26.10,9)))

A PCF for a Simple MACD 12,26,9 Signal Line top with MACD crossing through its Signal line within the last 10-Bars could be written as:

AVG(AVGC12,9) - AVG(AVGC26,9) < AVG(AVGC12.1,9) - AVG(AVGC26.1,9) AND AVG(AVGC12.1,9) - AVG(AVGC26.1,9) > AVG(AVGC12.2,9) - AVG(AVGC26.2,9) AND AVG(AVGC12.2,9) - AVG(AVGC26.2,9) > AVG(AVGC12.3,9) - AVG(AVGC26.3,9) AND (SGN(AVGC12 - AVGC26 - AVG(AVGC12,9) + AVG(AVGC26,9)) <> SGN(AVGC12.1 - AVGC26.1 - AVG(AVGC12.1,9) + AVG(AVGC26.1,9)) OR SGN(AVGC12.1 - AVGC26.1 - AVG(AVGC12.1,9) + AVG(AVGC26.1,9)) <> SGN(AVGC12.2 - AVGC26.2 - AVG(AVGC12.2,9) + AVG(AVGC26.2,9)) OR SGN(AVGC12.2 - AVGC26.2 - AVG(AVGC12.2,9) + AVG(AVGC26.2,9)) <> SGN(AVGC12.3 - AVGC26.3 - AVG(AVGC12.3,9) + AVG(AVGC26.3,9)) OR SGN(AVGC12.3 - AVGC26.3 - AVG(AVGC12.3,9) + AVG(AVGC26.3,9)) <> SGN(AVGC12.4 - AVGC26.4 - AVG(AVGC12.4,9) + AVG(AVGC26.4,9)) OR SGN(AVGC12.4 - AVGC26.4 - AVG(AVGC12.4,9) + AVG(AVGC26.4,9)) <> SGN(AVGC12.5 - AVGC26.5 - AVG(AVGC12.5,9) + AVG(AVGC26.5,9)) OR SGN(AVGC12.5 - AVGC26.5 - AVG(AVGC12.5,9) + AVG(AVGC26.5,9)) <> SGN(AVGC12.6 - AVGC26.6 - AVG(AVGC12.6,9) + AVG(AVGC26.6,9)) OR SGN(AVGC12.6 - AVGC26.6 - AVG(AVGC12.6,9) + AVG(AVGC26.6,9)) <> SGN(AVGC12.7 - AVGC26.7 - AVG(AVGC12.7,9) + AVG(AVGC26.7,9)) OR SGN(AVGC12.7 - AVGC26.7 - AVG(AVGC12.7,9) + AVG(AVGC26.7,9)) <> SGN(AVGC12.8 - AVGC26.8 - AVG(AVGC12.8,9) + AVG(AVGC26.8,9)) OR SGN(AVGC12.8 - AVGC26.8 - AVG(AVGC12.8,9) + AVG(AVGC26.8,9)) <> SGN(AVGC12.9 - AVGC26.9 - AVG(AVGC12.9,9) + AVG(AVGC26.9,9)) OR SGN(AVGC12.9 - AVGC26.9 - AVG(AVGC12.9,9) + AVG(AVGC26.9,9)) <> SGN(AVGC12.10 - AVGC26.10 - AVG(AVGC12.10,9) + AVG(AVGC26.10,9)))

A PCF for a Simple MACD 12,26,9 Signal Line bottom or top with MACD crossing through its Signal line within the last 10-Bars could be written as:

((AVG(AVGC12,9) - AVG(AVGC26,9) > AVG(AVGC12.1,9) - AVG(AVGC26.1,9) AND AVG(AVGC12.1,9) - AVG(AVGC26.1,9) < AVG(AVGC12.2,9) - AVG(AVGC26.2,9) AND AVG(AVGC12.2,9) - AVG(AVGC26.2,9) < AVG(AVGC12.3,9) - AVG(AVGC26.3,9)) OR (AVG(AVGC12,9) - AVG(AVGC26,9) < AVG(AVGC12.1,9) - AVG(AVGC26.1,9) AND AVG(AVGC12.1,9) - AVG(AVGC26.1,9) > AVG(AVGC12.2,9) - AVG(AVGC26.2,9) AND AVG(AVGC12.2,9) - AVG(AVGC26.2,9) > AVG(AVGC12.3,9) - AVG(AVGC26.3,9))) AND (SGN(AVGC12 - AVGC26 - AVG(AVGC12,9) + AVG(AVGC26,9)) <> SGN(AVGC12.1 - AVGC26.1 - AVG(AVGC12.1,9) + AVG(AVGC26.1,9)) OR SGN(AVGC12.1 - AVGC26.1 - AVG(AVGC12.1,9) + AVG(AVGC26.1,9)) <> SGN(AVGC12.2 - AVGC26.2 - AVG(AVGC12.2,9) + AVG(AVGC26.2,9)) OR SGN(AVGC12.2 - AVGC26.2 - AVG(AVGC12.2,9) + AVG(AVGC26.2,9)) <> SGN(AVGC12.3 - AVGC26.3 - AVG(AVGC12.3,9) + AVG(AVGC26.3,9)) OR SGN(AVGC12.3 - AVGC26.3 - AVG(AVGC12.3,9) + AVG(AVGC26.3,9)) <> SGN(AVGC12.4 - AVGC26.4 - AVG(AVGC12.4,9) + AVG(AVGC26.4,9)) OR SGN(AVGC12.4 - AVGC26.4 - AVG(AVGC12.4,9) + AVG(AVGC26.4,9)) <> SGN(AVGC12.5 - AVGC26.5 - AVG(AVGC12.5,9) + AVG(AVGC26.5,9)) OR SGN(AVGC12.5 - AVGC26.5 - AVG(AVGC12.5,9) + AVG(AVGC26.5,9)) <> SGN(AVGC12.6 - AVGC26.6 - AVG(AVGC12.6,9) + AVG(AVGC26.6,9)) OR SGN(AVGC12.6 - AVGC26.6 - AVG(AVGC12.6,9) + AVG(AVGC26.6,9)) <> SGN(AVGC12.7 - AVGC26.7 - AVG(AVGC12.7,9) + AVG(AVGC26.7,9)) OR SGN(AVGC12.7 - AVGC26.7 - AVG(AVGC12.7,9) + AVG(AVGC26.7,9)) <> SGN(AVGC12.8 - AVGC26.8 - AVG(AVGC12.8,9) + AVG(AVGC26.8,9)) OR SGN(AVGC12.8 - AVGC26.8 - AVG(AVGC12.8,9) + AVG(AVGC26.8,9)) <> SGN(AVGC12.9 - AVGC26.9 - AVG(AVGC12.9,9) + AVG(AVGC26.9,9)) OR SGN(AVGC12.9 - AVGC26.9 - AVG(AVGC12.9,9) + AVG(AVGC26.9,9)) <> SGN(AVGC12.10 - AVGC26.10 - AVG(AVGC12.10,9) + AVG(AVGC26.10,9)))

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
IK
Posted : Wednesday, February 2, 2011 1:17:18 PM
Registered User
Joined: 7/15/2009
Posts: 34

THANKS A LOT 
THERE IS AN ERROR IN THE COMBO (3RD FORMULA ) THAT I COULDN'T TRACE IF YOU CAN FIND IT IT WILL BE GREAT IF NOT I'M GREATFUL ANYWAY ALL THE BEST TO YOU

Bruce_L
Posted : Wednesday, February 2, 2011 1:25:21 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
What error are you seeing in the formula? It does not produce any error messages on when used as a Personal Criteria Formula on my computer.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
harryrp
Posted : Wednesday, February 2, 2011 3:26:46 PM
Gold Customer Gold Customer

Joined: 11/25/2004
Posts: 10
Dear Bruce:

What would that PCF look like for a 2 day look back period?
A Personal Criteria Formula for a Simple MACD 12,26,9 Signal Line bottom with MACD crossing through its Signal line within the last 10-Bars could be written as:  2 days instead of 10

Thanks
Harryrp
Bruce_L
Posted : Wednesday, February 2, 2011 3:36:13 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
A Personal Criteria Formula for a Simple MACD 12,26,9 Signal Line bottom with MACD crossing through its Signal line within the last 2-Bars could be written as:

AVG(AVGC12,9) - AVG(AVGC26,9) > AVG(AVGC12.1,9) - AVG(AVGC26.1,9) AND AVG(AVGC12.1,9) - AVG(AVGC26.1,9) < AVG(AVGC12.2,9) - AVG(AVGC26.2,9) AND AVG(AVGC12.2,9) - AVG(AVGC26.2,9) < AVG(AVGC12.3,9) - AVG(AVGC26.3,9) AND (SGN(AVGC12 - AVGC26 - AVG(AVGC12,9) + AVG(AVGC26,9)) <> SGN(AVGC12.1 - AVGC26.1 - AVG(AVGC12.1,9) + AVG(AVGC26.1,9)) OR SGN(AVGC12.1 - AVGC26.1 - AVG(AVGC12.1,9) + AVG(AVGC26.1,9)) <> SGN(AVGC12.2 - AVGC26.2 - AVG(AVGC12.2,9) + AVG(AVGC26.2,9)))

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
IK
Posted : Thursday, February 3, 2011 1:40:09 AM
Registered User
Joined: 7/15/2009
Posts: 34

Hi
I couldn't find it as well as you but it doesn't allows me to update it claiming there is a synthex error
thanks and all the best

Bruce_L
Posted : Thursday, February 3, 2011 9:12:55 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
The Personal Criteria Formulas do not appear to have any syntax errors and update on my computer without producing any error messages. Please try copying and pasting the PCFs again, making sure to include all of the formula (including all opening and closing parentheses), but nothing beyond the formulas (no titles or extra spaces).

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
IK
Posted : Thursday, February 3, 2011 10:03:04 AM
Registered User
Joined: 7/15/2009
Posts: 34
You were correct thanks a lot for all you efforts and patience
Bruce_L
Posted : Thursday, February 3, 2011 10:04:29 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome.

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