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

Re: [EquisMetaStock Group] Re: Multiple time frame



PureBytes Links

Trading Reference Links

Martin

Might I suggest you look at changing Pring's 'Ema' variable from

Ema:=If(H1,If(PREV=0,CLOSE,(C1*Pct)+(PREV*(1-Pct))),PREV);

to

Ema:=If(Cum(H1>0)=1,C1,ValueWhen(1,H1,PREV)*(1-Pct)+(C1*Pct));

The seeding does not use PREV, and the use of ValueWhen() allows the removal
of a second PREV.  The result is a one PREV variable rather than a three
PREV variable, and therefore the the indicator is less resource hungry.

Another adaptation that might be useful for some is a "dynamic last period",
where an incomplete frame uses the current close. One has to remember that
this value will change up until the last bar of data for the frame is added.

The feature is added by using a "last bar" piece of code to also trigger the
"end of frame" signal. Once again using Pring's code as a starting point,

H1:=Minute()=30 OR (Hour()*100+Minute())=1600;

becomes,

Lb:=LastValue(Cum(1)-0)=Cum(1);
H1:=Lb OR Minute()=30 OR (Hour()*100+Minute())=1600;

Roy

----- Original Message ----- 
From: "MartinSinclair" <no_reply@xxxxxxxxxxxxxxx>
To: <equismetastock@xxxxxxxxxxxxxxx>
Sent: Friday, May 02, 2003 7:51 AM
Subject: [EquisMetaStock Group] Re: Multiple time frame


> Thanks !!! I had to adapt it for 24h data (spot forex) but works
> perfectly. Simple and elegant solution. Opens many new possibilities
> and no need to run two softwares simultanenously.
>
> Martin
>
>
>
>
>
>
> 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/
>
>
>
>



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/KXUxcA/fNtFAA/uetFAA/BefplB/TM
---------------------------------------------------------------------~->

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/