PureBytes Links
Trading Reference Links
|
I was privately requested to provide detailed information on how one can
make a SR ZZT highlights expert. Although I have done this in the past too,
I think that this is a good opportunity to suggest a more versatile naming
method.
I assume you already have the code for SR ZigZag Trend v.4 (SR ZZT v.4). It
is the last version I posted.
The job is to be done in 3 phases:
A: make 5 copies of SR ZZT with fixed values (using the new naming method)
B: make the SR ZZTsum indicator, which is the sum of these copies
C: make the Expert Highlights that will use the SR ZZTsum indicator.
So let's begin.
A:
1. Make a copy of SR ZZT v.4 indicator: In the indicator builder select the
SR ZZT v.4 and click on the "Copy" button.
2. In the window that opens change the three "input lines" to read like
this:
vr:= 4; {Close prices}
amnt:= 3; {this is a fixed 3% indicator}
md:= 1; {use the percent method}
Leave the rest of the code as it is.
3. Name this copy "SR ZZT1" and then click OK to return to the indicator
builder.
4. Now copy the new SR ZZT1 and repeat step 2 but this time change the amnt
variable to 5:
amnt:= 5; {this is a fixed 5% indicator}
Leave the rest of the code as it is.
5. Name this copy "SR ZZT2" and then click OK to return to the indicator
builder.
Now repeat steps 4 and 5 to make three more indicators that will use 10%,
15% and 20% respectively. When you finish you should have 5 indicators named
SR ZZT1, SR ZZT2... SR ZZT5. If you wish you can use different percentages
than the ones I suggested. All you have to do is change the amnt variable to
whatever you like. For example you can use Fibonacci numbers (2,3,5,8,13
instead of 3,5,10,15,20). Lower values will also reduce the N/A cases.
B.
In the indicator builder click on the New button and enter the following
code:
Fml("SR ZZT1") + Fml("SR ZZT2") + Fml("SR ZZT3") + Fml("SR ZZT4") + Fml("SR
ZZT5")
Name this indicator "SR ZZTsum".
Click OK.
C:
1. Click on the Expert Advisor icon.
2. Click New
3. Name this Expert "SR ZZTsum expert" or something similar.
4. Click on the Highlights tab.
5. Click New
6. Name this highlight "Uptrend Very Strong"
7. Enter this line in the conditions area:
fml("SR ZZTsum")= 5
8. Change the color to Green and click OK.
9. Select your new highlight and right-click on it. Then choose Copy.
10. Right-click again and choose Paste. This makes a copy of the previous
highlight.
11. Double-click on the new highlight and change its name to "Uptrend
Strong"
12. Change the condition to read:
fml("SR ZZTsum")= 3
13. Change the color to Cyan and click OK.
Repeat steps 9 to 13 until you have made four more highlights with the
following names, conditions and colors:
Name: Uptrend Medium
Color: Blue
Condition: fml("SR ZZTsum")= 1
Name: Downtrend Medium
Color: Yellow
Condition: fml("SR ZZTsum")= -1
Name: Downtrend Strong
Color: Magenta
Condition: fml("SR ZZTsum")= -3
Name: Downtrend Very Strong
Color: Red
Condition: fml("SR ZZTsum")= -5
Now you have 6 highlights, which make a very useful tool for the visual
identification of the strength of the confirmed trends.
Click OK to return to the Expert Advisor.
Locate your new expert, click on the Attach button and click Close.
This brings you to your chart, which is now colorful. You will notice that
very strong uptrends are colored green, very strong downtrends are red etc.
I prefer using a dark gray background, so that the light colors are
contrasted properly.
To do that right-click on your chart's background.
Select Inner window - Properties.
Choose DkGray from the drop-down menu and then click OK.
There you are! Now take the time to study the SR ZZTsum behavior by
observing the color changes.
The above method provides a very easy way to experiment with various
combinations of percentages. For example, at a later time you might want to
use other percentages than the ones initially used. All you have to do is go
to the indicator builder, select one or more of your SR ZZT# indicators
(please DO NOT change the main SR ZZT v.4 indicator) and change the amnt
variable. As soon as you do that, everything is updated automatically (the
SR ZZTsum, your expert highlights, all SR ZZTsum systems or explorations you
may have)!
I hope this helps.
Good luck
Spyros
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 19/04/02
|