[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Off List Re: [EquisMetaStock Group] Hello



PureBytes Links

Trading Reference Links

Hi Hitendra
 
 
I series of formulas that I've recently constructed should help you do what you want. These are the Multi-Frame X series, which really means that they plot nominated hourly (1 - 24) indicator values on any lower or equal periodicity chart.
 
The SMA formula below can be easily adapted to return the logical state of CLOSE (5-minute) > Fml("Multi-Frame X SMA"). I'm not sure what you mean by "cross overal of 10 bar average on 5 minutes chart" so for now I won't attempt to tell you how to do that, other than to say that you shouldn't need any special indicator from the Multi-Frame series to do it.
 
I've also included the "Multi-Frame X EMA" formula but beware of trying to use this on 1 minute charts with large amounts of data loaded (say 5000 bars or more) as the PREV will slow loading dramatically
 
The Forum DLL is also attached in case you do not have it.
 
 
Kind regards
 
Roy
 
 
PS Please note that these formulas are not for general distribution or posting to any group at this stage.
 
 
 {Multi-Frame X SMA}
 {Simple Moving Average}
 {This formula uses the Equis Forum DLL}
 {Roy Larsen, 2008}
 
 {User settings}
N:=Input("Multi-Frame X SMA, Periods",1,99,10);
U:=Input("Price, 1=O 2=H 3=L 4=C 5=MP 6=WC 7=Typical",1,7,4);
J:=Input("Hours per Frame, (1-24)",1,24,24);
J:=If((J<5)+(J=8)+(Mod(J,6)=0 AND J<>18),Int(J)*60,1);
Q:=Input("Mode, 0=Static 1=Dynamic 2=Delayed",0,2,1);
 {0, update on last bar of current frame}
 {1, update on each new bar}
 {2, update on first bar of new frame}
 
 {Timing signals}
{Day counter courtesy metastock@xxxxxxxxxxxxx}
M:=Month();A:=Int((14-M)/12);D:=DayOfMonth();
Y:=Year();X:=Y+4800-A;B:=M+(12*A)-3;Z:=Cum(1);
D:=D+Int((2+153*B)/5)+(365*X)+Int(X/4)-
Int(X/100)+Int(X/400)-32045; {day counter}
D:=D-ValueWhen(1,Z=1,D); {start D from zero}
R:=D*1440+Minute()+Hour()*60; {minute counter}
I:=Int(If(J=1440,R,R-1)/J); I:=I>ValueWhen(2,1,I);
G:=LastValue(Lowest(Sum(I>0,9))>7);
I:=ExtFml("Forum.Sum",I,1);M:=G OR I;
F:=G OR (M=0)*ExtFml("Forum.Sum",Ref(I,1),1);
A:=LastValue(Z-1)=Z;B:=LastValue(Z)=Z;
F:=F+B*(Q=0)*(R/J=Int(R/J))*(Mod(R,1440)>0);
J:=If(F,1,(Alert(F,2)=0)*M*2*(Z>1));
J:=If(A+LastValue(J)>2 OR B+(Q=1)=2,1,J);
J:=If(G,1,If(Q=2,M*2,J));
 
 {Frame prices}
Om:=ValueWhen(1,M OR Z=1,O);
Om:=ValueWhen(1,J,If(J=1,Om,ValueWhen(2-G,1,Om)));
Hm:=HighestSince(1,M OR Z=1,H);
Hm:=ValueWhen(1,J,If(J=1,Hm,ValueWhen(2-G,1,Hm)));
Lm:=LowestSince(1,M OR Z=1,L);
Lm:=ValueWhen(1,J,If(J=1,Lm,ValueWhen(2-G,1,Lm)));
K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2-G,1,C)));
Om:=ValueWhen(1,Om>0,Om); Hm:=ValueWhen(1,Hm>0,Hm);
Lm:=ValueWhen(1,Lm>0,Lm); A:=(Hm+Lm)/2;
B:=(Om+Hm+Lm)/3; D:=(Hm+Lm+2*K)/4;
K:=If(U=1,Om,If(U=2,Hm,If(U=3,Lm,If(U=5,A,If(U=6,D,If(U=7,B,K))))));
 
 {Calculate/plot SMA}
J:=J>0; A:=Cum(J); Z:=Z-ValueWhen(N+1,J,Z);
Z:=ExtFml("Forum.Sum",J*K,Z);
ValueWhen(1,J,Z)/Min(N,A);
 
 
 {Multi-Frame X EMA}
 {Exponential Moving Average}
 {This formula uses the Equis Forum DLL}
 {Roy Larsen, 2008}
 
{User settings}
N:=Input("Multi-Frame X EMA, Periods",1,99,10);
J:=Input("Hours per Frame, (1-24)",1,24,1);
J:=If((J<5)+(J=8)+(Mod(J,6)=0 AND J<>18),Int(J)*60,1);
U:=Input("Price, 1=O 2=H 3=L 4=C 5=MP 6=WC 7=Typical",1,7,4);
Q:=Input("Mode, 0=Static 1=Dynamic 2=Delayed",0,2,1);
 {0, update on last bar of current frame}
 {1, update on each new bar}
 {2, update on first bar of new frame}
 
 {Timing signals}
{Day counter courtesy metastock@xxxxxxxxxxxxx}
M:=Month();A:=Int((14-M)/12);D:=DayOfMonth();
Y:=Year();X:=Y+4800-A;B:=M+(12*A)-3;Z:=Cum(1);
D:=D+Int((2+153*B)/5)+(365*X)+Int(X/4)-
Int(X/100)+Int(X/400)-32045; {day counter}
D:=D-ValueWhen(1,Z=1,D); {start D from zero}
R:=D*1440+Minute()+Hour()*60; {minute counter}
I:=Int(If(J=1440,R,R-1)/J); I:=I>ValueWhen(2,1,I);
G:=LastValue(Lowest(Sum(I>0,9))>7);
I:=ExtFml("Forum.Sum",I,1);M:=G OR I;
F:=G OR (M=0)*ExtFml("Forum.Sum",Ref(I,1),1);
A:=LastValue(Z-1)=Z;B:=LastValue(Z)=Z;
F:=F+B*(Q=0)*(R/J=Int(R/J))*(Mod(R,1440)>0);
J:=If(F,1,(Alert(F,2)=0)*M*2*(Z>1));
J:=If(A+LastValue(J)>2 OR B+(Q=1)=2,1,J);
J:=If(G,1,If(Q=2,M*2,J));
 
 {Frame prices}
Om:=ValueWhen(1,M OR Z=1,O);
Om:=ValueWhen(1,J,If(J=1,Om,ValueWhen(2-G,1,Om)));
Hm:=HighestSince(1,M OR Z=1,H);
Hm:=ValueWhen(1,J,If(J=1,Hm,ValueWhen(2-G,1,Hm)));
Lm:=LowestSince(1,M OR Z=1,L);
Lm:=ValueWhen(1,J,If(J=1,Lm,ValueWhen(2-G,1,Lm)));
K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2-G,1,C)));
Om:=ValueWhen(1,Om>0,Om);
Hm:=ValueWhen(1,Hm>0,Hm);
Lm:=ValueWhen(1,Lm>0,Lm);
A:=(Hm+Lm)/2; B:=(Om+Hm+Lm)/3; D:=(Hm+Lm+2*K)/4;
K:=If(U=1,Om,If(U=2,Hm,If(U=3,Lm,If(U=5,A,If(U=6,D,If(U=7,B,K))))));
 
 {Calculate/plot EMA}
X:=N; N:=2/(1+N);J:=J>0;
If(Cum(G+J>0)<3-G,K,PREV*If(J,1-N,1)+J*K*N);
 
 
----- Original Message -----
Sent: Monday, December 29, 2008 2:38 AM
Subject: [EquisMetaStock Group] Hello


On the intra-day chart, if i want a condition on daily chart to be
fullfilled first before check intra-day conditions how can i do it.

Like say

If we want, on daily chart condition, price should be above 10 day
moving average.

Second conditions would be

cross overal of 10 bar average on 5 minutes chart for a buy.

I want to how do i build Daily Chart conditions on intra-day chart.

thanks

__._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Attachment: Description: application/msdownload