MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

A B C D E F G H I J K L M N O P R S T U V W Y Z #

Daily CCI-7 Standard w/Crossovers by Roy Larsen

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
From:gadee333 <gadee333 [at] hotmail [dot] com>
To:equismetastock [at] yahoogroups [dot] com <equismetastock [at] yahoogroups [dot] com>
Sent: Monday, May 15, 2006 3:36 AM
Subject: [EquisMetaStock Group] Querry help...
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

I am using real time data. I want to plot an indicator fulfilling
folloing conditions on 5 min chart.

1. CCI last 7 days ( not 7 periods )
2. Buy signal should be when CCI(7days) crosses above - 100
3. Sell signal should be when CCI(7days) crosses below - 110

will any one please help.

Anil Desai

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
From:Roy Larsen <rlarsen [at] man.quik.co.nz>
To:equismetastock [at] yahoogroups [dot] com <equismetastock [at] yahoogroups [dot] com>
Date:Monday, May 15, 2006, 3:44:22 AM
Subject: [EquisMetaStock Group] Querry help...
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Hi Anil

Is this something like what you had in mind? "Z" is the 7-period daily CCI-Standard (no bells or whistles).

Regards
Roy


{Daily CCI-7 Standard w/Crossovers}

{C 2006 Roy Larsen}
{www.metastocktips.co.nz}
{For use on intraday charts}
G:=LastValue(Highest(Sum(DayOfWeek()<>
ValueWhen(2,1,DayOfWeek()),5))=5);
J:=DayOfMonth()<>ValueWhen(2-G,1,DayOfMonth()) OR G
{OR Cum(1)=LastValue(Cum(1))} {for dynamic last bar};
Hd:=ValueWhen(1,J,ValueWhen(2-G,1,HighestSince(1,J,H)));
Hd:=ValueWhen(1,Hd>0,Hd);
Ld:=ValueWhen(1,J,ValueWhen(2-G,1,LowestSince(1,J,L)));
Ld:=ValueWhen(1,Ld>0,Ld);
Cd:=ValueWhen(1,J,ValueWhen(2-G,1,C));
{CCI calculation}
X:=(Cd+Hd+Ld)/3;
Y:=(X+ValueWhen(2,J,X)+ValueWhen(3,J,X)+
ValueWhen(4,J,X)+ValueWhen(5,J,X)+
ValueWhen(6,J,X)+ValueWhen(7,J,X))/7;
Z:=(Abs(Y-X)+Abs(y-ValueWhen(2,J,X))+
Abs(Y-ValueWhen(3,J,X))+Abs(Y-ValueWhen(4,J,X))+
Abs(Y-ValueWhen(5,J,X))+Abs(Y-ValueWhen(6,J,X))+
Abs(Y-ValueWhen(7,J,X)))/7;
Z:=(X-Y)/(Z*0.015);
Buy:=Cross(Z,-100);
Sell:=Cross(-110,Z); Buy; Sell;

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
From:gadee333 <gadee333 [at] hotmail [dot] com>
To:equismetastock [at] yahoogroups [dot] com <equismetastock [at] yahoogroups [dot] com>
Date:Tuesday, May 16, 2006, 2:11:32 AM
Subject: [EquisMetaStock Group] Querry help...
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Thanks Roy

you certainly gave me the direction. Let me test wether this can give the result the way i wanted. I will post the result.

Anil

Source / From: TOP
Metastockusers [at] yahoogroups [dot] com  

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!