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

[EquisMetaStock Group] Re: Time Feature



PureBytes Links

Trading Reference Links


Just a small suggestion.  We've used similar code somewhere else, but
it lead to confusion, as it allows for times below the end time.  If
you specify the end time as say 12:00, then this code will also show
ticks recorded at say 12:00:15, 12:00:20 etc.  (I do not have a real
time MS, so not sure if MS records tics like this?).

Anyhow, maybe change

> end:=Hour()<EnHour
>  OR Hour()=EnHour AND Minute()<=EnMin;

into

end:=Hour()<EnHour
 OR Hour()=EnHour AND Minute()<EnMin;

which means an end time of 12:00 actually means 11:59:59 or before.

Regards
MG Ferreira
TsaTsa EOD Programmer and trading model builder
http://www.ferra4models.com
http://fun.ferra4models.com 



--- In equismetastock@xxxxxxxxxxxxxxx, "Jose Silva" <josesilva22@xxxx>
wrote:
> 
> Andrew, try this MS indicator code:
> 
> ================================
> Signal with Intraday time filter
> ================================
> ---8<---------------------------
> 
> { Signal with Intraday time filter }
> { Plots +1 signal within user-input time period}
> { http://www.metastocktools.com }
> 
> { User Inputs }
> StHour:=Input("start Hour",0,23,8);
> StMin:=Input("start Minute",0,59,30);
> EnHour:=Input("end Hour",0,23,13);
> EnMin:=Input("end Minute",0,59,30);
> 
> { Time filter }
> start:=Hour()>StHour
>  OR Hour()=StHour AND Minute()>=StMin;
> end:=Hour()<EnHour
>  OR Hour()=EnHour AND Minute()<=EnMin;
> filter:=
> start AND (end OR (start AND Alert(start=0,2)));
> 
> { Signal }
> p1:=Fml("your formula");
> signal:=cross(p1,X) and filter;
> 
> { Plot in own window}
> signal
> 
> ---8<---------------------------
> 
> 
> jose '-)
> http://www.metastocktools.com
> 
> 
> 
> --- In equismetastock@xxxxxxxxxxxxxxx, "andrew_slemko" 
> <andrew_slemko@xxxx> wrote:
> > 
> > Can you add a time feature to the following alert? 
> > 
> > p1:= Fml("Name");
> > cross(p1,X)
> > 
> > Reason: So that you will be alerted to the first bar where the 
> > indicator crosses but also say you wanted the alert to only occur at 
> > certian time or after that time? Say set it between 8:30am and
> > 1:30pm. 
> > Thus we would be alerted to the first bar to cross on the 8:30am bar 
> > or between the 8:30am and 1:30pm bar, and not before 8:30am or after 
> > 1:30pm. Does that make sense?





------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/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/