The Vulture
20th May 2004, 06:01 PM
Currently, I use MetaStock 8.0. My end of day trading methodology works on their software. In the Explorer, I run monthly criteria first and if securities meet all of them, the weekly criteria calculates those results and subsequently the securities remaining that have met both the monthly and weekly criteria are run through the daily set.
As you know, the Enhanced System Tester only allows testing for one time frame and I'm unable to test my system.
Does TradeSim have the capability to meet my requirements?
David Samborsky
3rd June 2004, 12:51 AM
This reply courtesy Jose Silva
josesilva22@yahoo.com
With some effort, any weekly or monthly indicator can be coded in
MetaStock for daily charts. It's possible to have a true monthly,
weekly and daily indicator all coexisting on the same daily chart
without needing to switch time frames.
Here's an example of a true weekly EMA for daily charts:
==================
EMA Close - weekly
==================
---8<------------------
{True weekly Close Exponential Mov Avg v4.0}
{Plot on Daily or Weekly charts}
{References indicator "Calendar Week counter"}
{Plot is independent of any missing chart data}
{©Copyright 2003-2004 Jose Silva}
{josesilva22@yahoo.com}
pds:=Input("Weekly EMA periods",1,520,4);
shift:=1+Input("EMA vertical shift %",
-100,100,0)/100;
plot:=Input("plot: [1] EMA, [2] Crossover signals",1,2,1);
y:=Fml("Calendar Week counter");
Wkchart:=LastValue(Cum(y=ValueWhen(2,1,y)))=0;
NuWk:=y>ValueWhen(2,1,y);
pds:=If(pds>Cum(NuWk),Cum(NuWk),pds);
WkCl:=ValueWhen(1,NuWk,ValueWhen(2-Wkchart,1,C));
WkEma:=ValueWhen(1,NuWk,PREV)
*(1-2/(pds+1))+WkCl*2/(pds+1);
WkEma:=WkEma*shift;
signals:=Cross(C,WkEma)+-Cross(WkEma,C);
If(plot=2,signals,WkEma)
---8<------------------
The weekly EMA indicator above needs to reference this code as well:
=====================
Calendar Week counter
=====================
---8<------------------
{Week counter v2.0, Gregorian calendar}
{Count is independent of any missing chart data}
{©Copyright 2003-2004 Jose Silva}
{josesilva22@yahoo.com}
limit:=2000; {do not change limit year}
LimLeap:=Frac(limit/4)=0 AND Frac(limit/100)<>0
OR Frac(limit/400)=0;
NoCount:=limit*365+Int(limit/4)-Int(limit/100)+Int(limit/400)-LimLeap;
leap:=Frac(Year()/4)=0 AND Frac(Year()/100)<>0
OR Frac(Year()/400)=0;
y:=Year()*365+Int(Year()/4)
-Int(Year()/100)+Int(Year()/400)-NoCount;
m:=
If(Month()=2,31-leap,
If(Month()=3,59,
If(Month()=4,90,
If(Month()=5,120,
If(Month()=6,151,
If(Month()=7,181,
If(Month()=8,212,
If(Month()=9,243,
If(Month()=10,273,
If(Month()=11,304,
If(Month()=12,334,
-leap)))))))))));
DayNr:=y+m+DayOfMonth();
WkCount:=Int((DayNr-1)/7)+(Year()>=limit);
WkCount
---8<------------------
Regards,
jose
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.