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

[EquisMetaStock Group] Re: How to Test and validate Current Date



PureBytes Links

Trading Reference Links

Amit, I don't get annoyed by people asking questions - after all, 
this is the fuel that drives this great usergroup.

What does annoy me, is supposedly professional operators trolling for 
freely-available MetaStock code here, and then possibly re-packaging 
it for sale.

I also get annoyed by commercial sites that copy & paste complete 
catch-phrases from other sites, and use them as their own.  For 
example, MetaStockTools.com 's "confidentiality and exclusivity 
guaranteed" phrase may not be a trademark, but I'm sure that one 
could find a different/better way to express this sentiment.
BTW, your site is not the only one guilty of this blatant copyright 
breach.


> I request you please suggest a solution for extracting and
> validating time for real time bars.

This has little to do with your "How to Test and validate Current 
Date" original question, no?

Ok, let's take it step by step.
Copy & paste this time-frame filter formula found at
http://www.metastocktools.com/#metastock :


===========
Time filter
===========
---8<----------------------------------

{Intraday time filter
 Plots +1 signal within user-input time period
 http://www.metastocktools.com }

StHour:=Input("start Hour",0,23,12);
StMin:=Input("start Minute",0,59,1);
EnHour:=Input("end Hour",0,23,14);
EnMin:=Input("end Minute",0,59,15);

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

start AND (end OR (start AND Alert(start=0,2)))

---8<----------------------------------

The above indicator plots a binary signal using the day's start/end 
times found in its user-inputs.  It can be referenced as an intraday 
filter to suppress signals that do not fall within the required time 
period.

For example:
---8<----------------------
signal:=Cross(C,Mov(C,10,S));
filter:=Fml("Time filter");
signal AND filter
---8<----------------------

Any signals that fall outside the time filter's default time period, 
will be suppressed.


Amit, if you need more help on this matter, I would suggest that you 
consider employing the services of a competent & professional 
MetaStock programmer.


jose '-)
http://www.metastocktools.com




--- In equismetastock@xxxxxxxxxxxxxxx, "Athena 
Research" <athena.investments@xxx> wrote:
>
> Dear Jose,
> 
> Its my fault that you got annoyed by asking so many questions in a 
relatively little time. But my issues are not that simple as you 
thought. 
> 
> My initial requirement was to validate current date but using some 
other conditions than date functions, anyways I am still using 
Month() and DayofMonth() functions as written below in my previous 
mail, though this solution was not I was looking for(I still have 
this issue open). Though Dusant gave a solution to my issue but that 
also did not solve my problem. My problem is not to display signal on 
last bar but to display all signals for current day and not to 
display for any previous day. 
> 
> Well, My other issue is to extract time from real time intraday 
bars and use entry and exit with in a specified time, I tried to use 
code suggested by you from your website, but my problem is still not 
solved. I have been trying to solve this for last one+ week, I hope I 
will find a solution soon.
> 
> For you, these could be basic issues, but believe me, for a normal 
Metastock programmer (or above average programmer) these are not 
simple issues. For extracting and validating time from real time 
bars, I have tried several different ways to find time using Hour() 
and Minute() but these simply did not work. 
> 
> Well, I can not write codes as clean as you but I try to. Some day 
soon, I may also achieve proficiency in logic and coding like 
you. :)  
> 
> I request you please suggest a solution for extracting and 
validating time for real time bars. If you wish, I will send you my 
complete strategy seperately, so that you can suggest a good solution 
for this.
> 
> 
> 
> Thanks and Regards,
> Amit Trivedi
> President & CEO
> Athenasolutionz.com - "We sell hope, in the stock market."
> 
> 
> 
> 
> ----- Original Message ----- 
> From: Jose Silva 
> To: equismetastock@xxxxxxxxxxxxxxx 
> Sent: Sunday, July 02, 2006 7:57 AM
> Subject: [EquisMetaStock Group] Re: How to Test and validate
> Current Date
> 
> 
> Amit, I am completely and utterly baffled as to how you can offer 
> "MetaStock Programming for only US$30/hr" and "MetaStock Language 
> Programming Course via Emails", if you can't deal with such a
> simple and basic MetaStock programming task.
> 
> Anyway, this is the easiest way to display signals (only) on the
> last bar:
> 
> YourCondition AND Cum(1)=LastValue(Cum(1))
> 
> jose '-)
> http://www.metastocktools.com
> 
>
>
>
> --- In equismetastock@xxxxxxxxxxxxxxx, "Athena 
> Research" <athena.investments@> wrote:
>
> Dear All,
> 
> I have an expert advisor for real time data. It takes values from
> an Indicator. I would like to show Buy/sell signal for today only
> and previous all days signals should not be displayed. How can I
> write the code that it should display signals Today only and all
> previous days should not be displayed. 
> 
> What I had written I am pasting below but sometimes it shows
> signals for previous days. A signal may appear for any previous day
> not necessarily yesterday only. 
> 
> If(DayOfMonth()<> Ref(DayOfMonth(), -1) AND Month() AND 
> ExtFml( "AthenaDLL.BuySignal") = 1 AND
> ExtFml( "AthenaDLL.BuySignal") <> 0 , {then} 1, {else} 0)
> OR
> If(Ref(DayOfMonth(), -1) AND Month() AND 
> ExtFml( "AthenaDLL.BuySignal") = 1 AND
> ExtFml( "AthenaDLL.BuySignal") <> 0 , {then} 0, {else} 0)
> 
> 
> Any suggestions for testing today's date only and not displaying
> any previous date?
> 
> 
> Thanks and Regards,
> Amit Trivedi
> President & CEO
> Athenasolutionz.com - "We sell hope, in the stock market."








------------------------ Yahoo! Groups Sponsor --------------------~--> 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/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/