MetaStockTools.com

MetaStock® coding competition!



Can you write MetaStock code that will signal the High & Low of each month?

We have our three final winners! - this competition is now closed.



Click on chart to enlarge

click on chart to enlarge



Three winners!

Choice of 5 quality prizes to be won!




MetaStockTools.com, in partnership with Equis International and PremiumData, is proud to announce the first MetaStock programming competition of its kind.

The first three MetaStock users to e-mail Jose with a complete indicator based on native MetaStock code which correctly signals the High & Low of each month (only one of each signal per month) on any daily chart, will receive his/her choice of one of five great MetaStock-related prizes:


[1] MACDH Divergence kit
or
[2] URSC kit
or
[3] 1 year's MSTT (MetaStock Tips & Tricks) subscription
or
[4] MetaStock Developer's Kit v9.1 *
or
[5] PremiumData package valued at between US$290 & $440 **



A new line of the solution indicator code will be revealed every Thursday & Sunday, until three people successfully code the signals shown in the sample Dow chart above.

The winners' name, their MetaStock code and choice of prize will be posted here, as well as in the Equis MetaStock Forum.

Please note: no external formulae/data allowed at all, and no PREV functions allowed for the 2nd/3rd solutions.


Lateral thinking required.

Three will win - will you be one of the winners?






We have our three winners!



Congratulations to Rodney Platt for his less-than-elegant but workable solution!
Rodney has chosen the MACDH Divergence kit for his prize.

Congratulations to Wabbit for his solutions.
Wabbit has chosen the PremiumData package (valued at between US$290 & $440) for his prize.

Congratulations to Shane Baker for being our third and final winner with his solution.
Shane has chosen a one year's subscription to the MSTT monthly newsletter.


Stay tuned for a possible future MetaStock/trading competition!





Month's Hi/Lo indicator code




This competition is now closed.
Below is the original indicator code solution.



MetaStock -> Tools -> Indicator Builder -> New
-> Copy & Paste complete MS indicator code below.

====================
Month's High & Low signals
====================
---8<---------------------------------------------------

{ Month's High & Low signals}
{Signals are dynamic in last incomplete month. }

{ Copyright © 2005-2007 Jose Silva }
{ For personal use only }
{ http://www.metastocktools.com }

{ line 1: Start of month }
nuMonth:=Month()<>Ref(Month(),-1) OR Cum(1)=2;

{ line 2: Alternative month binary }
altMth:=Cum(nuMonth)/2=Int(Cum(nuMonth)/2);

{ line 3: Dynamic Month's High }
Hi:=HighestSince(1,nuMonth,H);

{ line 4: Dynamic Month's Low }
Lo:=LowestSince(1,nuMonth,L);

{ line 5: Hindsight Month's Peak }
pk:=Zig(If(altMth,Hi=H,-(Hi=H)),1.5,$);

{ line 6: Hindsight Month's Trough }
tr:=Zig(If(altMth,Lo=L,-(Lo=L)),1.5,$);

{ line 7: Plot hindsight High signals }
Abs(pk)=1 AND Cum(1)>2;

{ line 8: Plot hindsight Low signals }
-(Abs(tr)=1 AND Cum(1)>2)

---8<---------------------------------------------------






Alternative solution, using minimal code



MetaStock -> Tools -> Indicator Builder -> New
-> Copy & Paste complete MS indicator code below.

===========================
Month's Hi/Lo Signals - minimal code
===========================
---8<---------------------------------------------------

{ Monthly High/Low signals in retrospect - v1.7 }
{ Complete signals in 162 code characters }
{ With thanks to Wabbit for the 3rd line of code }

{ Copyright © 2005-2007 Jose Silva }
{ For personal use only }
{ http://www.metastocktools.com }

{11} m:=Month();
{27} a:=m<>Ref(m,-1)+(Cum(1)=2);
{21} b:=Mod(Cum(a),2)*2-1;
{12} x:=Cum(1)>2;
{45} x*Abs(Zig(b*(H>=HighestSince(1,a,H)),2,$))=1;
{46} -(x*Abs(Zig(b*(L<=LowestSince(1,a,L)),2,$))=1)

---8<---------------------------------------------------








Please visit these useful sites:



*MDK v9.1 (read-only version) is kindly provided by Equis International
(with special thanks to Marilyn & Patrick).

**PremiumData subscription plus data history to any one of ASX, SGX, US Stocks, Futures or Forex markets, valued at between US$290 and US$440, courtesy of Norgate Investor Services.


MetaStock® is a registered trademark of Equis International.


The following people have prior knowledge of this competition's details, and thus they (and their associates) are not eligible to enter it: Patrick Nouvion, Preston Umrysh, Roy Larsen, Jim C. Triplett.