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

Re: [EquisMetaStock Group] basic expert advisor signals for 30 minutes to be displayed in 5 min. charts



PureBytes Links

Trading Reference Links

Hi Dhruvesh

Here's an indicator that plots the 30 minute EMA on 1-30 minute charts. I wouldn't recommend
using it on 1 minute charts though - the PREV can make it very slow to plot if there is a month or
so of data. A simple moving average would be preferable because it doesn't require the use of PREV.

After the indicator there are bullish and bearish trend formulas based on the indicator.

  {30 Minute Rising EMA-50}
  {2005 Roy Larsen, rlarsen@xxxxxxxxxxxxxx}
  {for use on 5-30 minute charts}
N:=Input("30 Minute EMA - Periods",1,99,50);
Q:=Input("Display Mode,  0=Static  1=Dynamic  2=Test",0,2,1);
  {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(Minute()=0 OR Minute()=30,5))=5);
A:=Minute(); B:=ValueWhen(2,1,A);
X:=Hour(); Y:=ValueWhen(2,1,X);
F:=G OR A=0 OR A=30;
M:=G OR X<Y OR (X=Y AND B=0) OR (X=Y AND B=30) OR
  (X>Y AND A<>0) OR (A>30 AND B<=30) OR (A<=30 AND
  A<>0 AND B>30) OR ValueWhen(2,1,F);
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));
K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2-G,1,C)));
N:=2/(1+N);
If(Cum(J>0)=1,K,ValueWhen(1,J,PREV)*(1-N)+K*N);


  {Bullish trend}
  {based on 30 Minute Rising EMA-50}
  {2005 Roy Larsen, rlarsen@xxxxxxxxxxxxxx}
  {for use on 5-30 minute charts}
N:=50;
Q:=1;
  {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(Minute()=0 OR Minute()=30,5))=5);
A:=Minute(); B:=ValueWhen(2,1,A);
X:=Hour(); Y:=ValueWhen(2,1,X);
F:=G OR A=0 OR A=30;
M:=G OR X<Y OR (X=Y AND B=0) OR (X=Y AND B=30) OR
  (X>Y AND A<>0) OR (A>30 AND B<=30) OR (A<=30 AND
  A<>0 AND B>30) OR ValueWhen(2,1,F);
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));
K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2-G,1,C)));
N:=2/(1+N);
M:=If(Cum(J>0)=1,K,ValueWhen(1,J,PREV)*(1-N)+K*N);
K>M;


  {Bearish trend}
  {based on 30 Minute Rising EMA-50}
  {2005 Roy Larsen, rlarsen@xxxxxxxxxxxxxx}
  {for use on 5-30 minute charts}
N:=50;
Q:=1;
  {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(Minute()=0 OR Minute()=30,5))=5);
A:=Minute(); B:=ValueWhen(2,1,A);
X:=Hour(); Y:=ValueWhen(2,1,X);
F:=G OR A=0 OR A=30;
M:=G OR X<Y OR (X=Y AND B=0) OR (X=Y AND B=30) OR
  (X>Y AND A<>0) OR (A>30 AND B<=30) OR (A<=30 AND
  A<>0 AND B>30) OR ValueWhen(2,1,F);
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));
K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2-G,1,C)));
N:=2/(1+N);
M:=If(Cum(J>0)=1,K,ValueWhen(1,J,PREV)*(1-N)+K*N);
K<M;

Kind regards

Roy Larsen
www.metastocktips.co.nz
Free formulas and MS links





----- Original Message ----- 
From: "dhruvesh bhatt" <dhruveshbhatt@xxxxxxxxx>
To: <equismetastock@xxxxxxxxxxxxxxx>
Sent: Tuesday, March 22, 2005 7:01 PM
Subject: Re: [EquisMetaStock Group] basic expert advisor signals for 30 minutes to be displayed in 5 
min. charts


>
> HELLO ROY
>
> Thanks for replying my query.
>
> TRENDS:-
>
> BULLISH
> CLOSE >Mov(CLOSE, 50, E)
> RIBBON  :- BLUE
>
> BEARISH
>
> CLOSE > MOV(CLOSE, 50,E)
> RIBBON :- RED
>
> I AM USING THIS CODE FOR 30 MINUTES AND ONCE THE BUY
> IS TRIGGERED I TRADE ON 5 MINUTES DATA ON BASIS OF
> THIS TREND.
>
> I WANT TO VISUALISE THE BASIC TREND ON MY 5 MIN CHART
>
>
>
> THANKS AGAIN
> DHRUVESH
>
> --- Roy Larsen <rlarsen@xxxxxxxxxxxxxx> wrote:
>> Hi dhruvesh
>>
>>
>> Post the code for the expert so we can see what
>> needs to be changed.
>>
>>
>> Kind regards
>>
>> Roy Larsen
>> www.metastocktips.co.nz
>> Free formulas and MS links
>>
>>
>>
>>
>>
>> ----- Original Message ----- 
>> From: "dhruveshbhatt" <dhruveshbhatt@xxxxxxxxx>
>> To: <equismetastock@xxxxxxxxxxxxxxx>
>> Sent: Monday, March 21, 2005 9:01 PM
>> Subject: [EquisMetaStock Group] basic expert advisor
>> signals for 30 minutes to be displayed in 5
>> min. charts
>>
>>
>> >
>> >
>> > HELLO FOLKS
>> >
>> > I HAVE BEEN USING ONE OF THE EXPERT ADVISORS IN 30
>> MIN CHARTS AND USED
>> > TO CONSIDER THE BUY, SELL SIGNALS AS BASIC TREND
>> AND WOULD TRADE ON 5
>> > MIN CHARTS
>> >
>> > NOW I AM INTERESTED TO PLOT THE 30 MIN BUY SELL
>> SIGNALS ON 5 MIN CHARTS
>> >
>> > CAN SOMEONE PLEASE HELP ME IN SOLVING THIS PROBLEM
>> >
>> >
>> > DHRUVESH
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >      Yahoo! Groups Sponsor
>> >            ADVERTISEMENT
>> >
>> >
>> >
>> >
>> >
>> >
>>
> --------------------------------------------------------------------------------
>> > Yahoo! Groups Links
>> >
>> >  a.. To visit your group on the web, go to:
>> >  http://groups.yahoo.com/group/equismetastock/
>> >
>> >  b.. To unsubscribe from this group, send an email
>> to:
>> >  equismetastock-unsubscribe@xxxxxxxxxxxxxxx
>> >
>> >  c.. Your use of Yahoo! Groups is subject to the
>> Yahoo! Terms of Service.
>> >
>> >
>>
>>
>>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/
>
>
>
>
>      Yahoo! Groups Sponsor
>            ADVERTISEMENT
>
>
>
>
>
> --------------------------------------------------------------------------------
> Yahoo! Groups Links
>
>  a.. To visit your group on the web, go to:
>  http://groups.yahoo.com/group/equismetastock/
>
>  b.. To unsubscribe from this group, send an email to:
>  equismetastock-unsubscribe@xxxxxxxxxxxxxxx
>
>  c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
> 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/