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 |

Condition - Current Value is Not the Monthly Low Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Andeso55
Posted : Friday, August 2, 2013 3:03:51 PM
Registered User
Joined: 6/5/2013
Posts: 15

Hello.  How do I create the following condtion for an indicator, such as ADX or MACD.

I want to a condition that shows that  yesterday's MACD is not the lowest MACD value over the past month.  I wrote the following, but it contained a Syntax ErrorL

XAVGC12.1-XAVGC26.1 > MIN((XAVG12.1-XAVGC26.1), 20)

How do I write a condition that an Indicator is not a New 20-day Low?

Thank you.

 

Bruce_L
Posted : Monday, August 5, 2013 11:31:21 AM


Worden Trainer

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

The reason for the error message is that the MIN() function cannot accept multi-part formulas as arguments. The techniques in the Min Max PCFs topic can get around this to some extent, but are probably not necessary in this case as we can make a much shorter formula by using individual comparisons.

XAVGC12.1 - XAVGC26.1 > XAVG12.2 - XAVGC26.2 OR XAVGC12.1 - XAVGC26.1 > XAVG12.3 - XAVGC26.3 OR XAVGC12.1 - XAVGC26.1 > XAVG12.4 - XAVGC26.4 OR XAVGC12.1 - XAVGC26.1 > XAVG12.5 - XAVGC26.5 OR XAVGC12.1 - XAVGC26.1 > XAVG12.6 - XAVGC26.6 OR XAVGC12.1 - XAVGC26.1 > XAVG12.7 - XAVGC26.7 OR XAVGC12.1 - XAVGC26.1 > XAVG12.8 - XAVGC26.8 OR XAVGC12.1 - XAVGC26.1 > XAVG12.9 - XAVGC26.9 OR XAVGC12.1 - XAVGC26.1 > XAVG12.10 - XAVGC26.10 OR XAVGC12.1 - XAVGC26.1 > XAVG12.11 - XAVGC26.11 OR XAVGC12.1 - XAVGC26.1 > XAVG12.12 - XAVGC26.12 OR XAVGC12.1 - XAVGC26.1 > XAVG12.13 - XAVGC26.13 OR XAVGC12.1 - XAVGC26.1 > XAVG12.14 - XAVGC26.14 OR XAVGC12.1 - XAVGC26.1 > XAVG12.15 - XAVGC26.15 OR XAVGC12.1 - XAVGC26.1 > XAVG12.16 - XAVGC26.16 OR XAVGC12.1 - XAVGC26.1 > XAVG12.17 - XAVGC26.17 OR XAVGC12.1 - XAVGC26.1 > XAVG12.18 - XAVGC26.18 OR XAVGC12.1 - XAVGC26.1 > XAVG12.19 - XAVGC26.19 OR XAVGC12.1 - XAVGC26.1 > XAVG12.20 - XAVGC26.20

Note that you would not be able to do the same thing for ADX because it is not possible to create a formula short and fast enough to be practical or post in the forums for ADX. That said, you can still create a Condition for this by using Donchian Channels. This technique is probably better than trying to create a Condition Formula for MACD as well.

Since you are interested in yesterday and not today, add a 1-Period Simple Moving Average to the ADX and set the Offset of that moving average to 1 (this Offset is what gets us yesterday).

Then add Donchian Channels to the moving average (if you were interested in today, you would add them to the ADX directly). Set the period of the Donchian Channels to the number of bars of interest (in this case 20) and the Offset of the Donchian Channels to 0.

Adding and Moving Indicators

Now click on the Moving Average and select Create Scan Condition. You will want to create a Condition for the Moving Average being Above Chan Bottom in the Moving Average vs Donchian Channels section.

Create Conditions from Your Chart



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Andeso55
Posted : Monday, August 5, 2013 8:47:47 PM
Registered User
Joined: 6/5/2013
Posts: 15

Thank you.

Bruce_L
Posted : Tuesday, August 6, 2013 9:12:30 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.