log in     sign up for free
 
I had to learn discipline and money management. I decided that I was going to become very disciplined and businesslike about my trading.
Paul Tudor Jones
 
 
Home
systems (284)
 
Special offer: buy MetaStock (try for free)   |   Reuters QuoteCenter Real-Time Data (get a free month)   |   EOD Data
 

Buy

MetaStock

     (special offer)
 
 
 

Buy

EOD data for MetaStock

     (special offer)
 
 
 

Buy

Realtime data for MetaStock

     (special offer)
 
 
 
Formula Library
 
AmiBroker
MetaTrader
MetaStock
TradeStation
Wealth-Lab
NinjaTrader
 
add your formula
System Library
 
 
Account login
Your email:
Password:
 
Log in
New to s4t? Sign up.
If you forgot your password click here.
Search the Web
 
Custom Search

Weekly Timing Code

Formula for: MetaStock

indicator


 

 

Views:  1255

Added: May 25, 2008
 
Rate this code:  Rate: 1 Rate: 2 Rate: 3 Rate: 4 Rate: 5
This formula has not been rated yet
 

email this link

 
 
Tags: MetaStock, indicator
 
Your Ad Here
From: ruagoodp
To: Metastockusers[at]yahoogroups.com
Date: Sunday, May 22, 2005, 12:31:37 PM
Subject: [Metastockusers] Weekly Indicator needed

Hi Roy,

Could this daily formula be converted into a weekly formula?
Hope you can help...

Bsetup:=Sum(C Ref(C,-9) >= Ref(C,-13);
BCD:=HighestSince(1,Peak(1,Bsetup,.001),(C<=Ref(L,-2)) + PREV);
BUY:=BCD-ValueWhen(1,Bsetup,BCD)=13 AND
Ref(BCD-ValueWhen(1,Bsetup,BCD)=13,-1)<>1;
buy

Norman

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

From: Roy Larsen
To: Metastockusers[at]yahoogroups.com
Date: Monday, May 23, 2005, 12:44:08 AM
Subject: [Metastockusers] Weekly Indicator needed

Hi Norman


Try this. I'm not sure that I've treated the Peak() function correctly, bit it appears to just be operating as an Init or IsDefined() function. I've only tested it on one chart and the 6 hits all tally. Hope this is of some help. The weekly timing code could be made much simpler using Peak() with DayofWeek() but the timing could be less accurate in the event of missing data bars.

This formula needs "Calendar Week Counter" indicator (search s4t)

 

 



Code:

Weekly Timing Code

{2005 Roy Larsen, www.metastocktips.co.nz}
{for use on daily charts with Jose Silva's "Calendar Week counter"}

F:=Input("End of Week, 5=Friday 6=Saturday 7=Sunday",5,7,5);
Q:=Input("Display Mode, 0=Static 1=Dynamic 2=Test",0,2,0);

{0=Display, update on Friday when possible}
{1=Display, update on each new bar}
{2=Backtest, update on first bar of new week}

G:=LastValue(Highest(Sum(DayOfWeek()=F,5))=5);
I:=Fml("Calendar Week counter");
I:={Abs}(I-ValueWhen(2-G,1,I)); M:=G OR I>0;
F:=G OR (DayOfWeek()=F AND I=0);
A:=LastValue(Cum(1)-1)=Cum(1);
B:=ValueWhen(2,1,A);
J:=If(F,1,If(Alert(F,2)=0 AND M,2,0));
J:=If(A+LastValue(J)>2 OR B+(Q=1)=2,1,J);
J:=If(G,1,If(Q=2 OR Cum(J)<=1,M*2,J));
Lw:=LowestSince(1,M,L);
Lw:=ValueWhen(1,J,If(J=1,Lw,ValueWhen(2-G,1,Lw)));
K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2-G,1,C)));
Bsetup:=Cum((J>0)*(K Bsetup:=(Bsetup-ValueWhen(10,J>0,Bsetup))=9 AND
ValueWhen(10,J,K)>=ValueWhen(14,J>0,K);
BCD:=HighestSince(1,Peak(1,Bsetup,.001),
(K<=ValueWhen(3,J,Lw))+ValueWhen(1,J,PREV));
Buy:=BCD-ValueWhen(1,ValueWhen(1,J,Bsetup),BCD)=13;
Buy AND ValueWhen(2,J,Buy)=0;

 






Author: Roy Larsen
Source: www.metastocktips.co.nz

 

View similar (indicator for MetaStock):

HHRWI
Volume By Price 25
Siroc III
Rapid RSI
Same Direction
ZigZig Fixed
MACD Custom
Diffusion Index
Inertia
Buff Averages
...
 
 
all formulas for MetaStock
all formulas

 

 

Email to friend

Top

 

     
However we try to maintain hiqhest possible level of service - most formulas, oscillators, indicators
and systems are submitted by anonymous users.
Therefore S4T™ does not take any responsibility for it's quality.
If you use any of this information, use it at your own risk. You are responsible for your own trading decisions.
Be sure to verify that any information you see on these pages is correct, and is applicable to your particular trade.
In no case will S4T™ be responsible for your trading gains or losses.
 
Privacy note | (c) copyrights systems4trading.com 2006-2012