PureBytes Links
Trading Reference Links
|
Amit
You could try this:
aa:= lastvalue(cum(1));
dd:= valuewhen(1,cum(1)=aa,dayofmonth());
mm:= valuewhen(1,cum(1)=aa,month());
yy:= valuewhen(1,cum(1)=aa,year());
if(
dd=dayofmonth()
and
mm=month();
and
yy=year(), {then} your conditions,
{else} your conditions
)
Dusant
----- Original Message -----
From: Athena Research
To: equismetastock@xxxxxxxxxxxxxxxx
Sent: Monday, June 12, 2006 7:35 PM
Subject: [EquisMetaStock Group] How to Test and validate Current Date
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."
[Non-text portions of this message have been removed]
#ygrp-mlmsg { FONT: small arial,helvetica,clean,sans-serif}#ygrp-mlmsg TABLE { }#ygrp-mlmsg SELECT { FONT: 99% arial,helvetica,clean,sans-serif}INPUT { FONT: 99% arial,helvetica,clean,sans-serif}TEXTAREA { FONT: 99% arial,helvetica,clean,sans-serif}#ygrp-mlmsg PRE { FONT: 100% monospace}CODE { FONT: 100% monospace}#ygrp-mlmsg { LINE-HEIGHT: 1.22em}#ygrp-text { FONT-FAMILY: Georgia}#ygrp-text P { MARGIN: 0px 0px 1em}#ygrp-tpmsgs { CLEAR: both; FONT-FAMILY: Arial}#ygrp-vitnav { FONT-SIZE: 77%; MARGIN: 0px; PADDING-TOP: 10px; FONT-FAMILY: Verdana}#ygrp-vitnav A { PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px}#ygrp-actbar { CLEAR: both; MARGIN: 25px 0px; COLOR: #666; WHITE-SPACE: nowrap; TEXT-ALIGN: right}#ygrp-actbar .left { FLOAT: left; WHITE-SPACE: nowrap}..bld { FONT-WEIGHT: bold}#ygrp-grft { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 77%; PADDING-BOTTOM: 15px; PADDING-TOP: 15px; FONT-FAMILY: Verdana}#ygrp-ft {
PADDING-RIGHT: 0px; BORDER-TOP: #666 1px solid; PADDING-LEFT: 0px; FONT-SIZE: 77%; PADDING-BOTTOM: 5px; PADDING-TOP: 5px; FONT-FAMILY: verdana}#ygrp-mlmsg #logo { PADDING-BOTTOM: 10px}#ygrp-vital { PADDING-RIGHT: 0px; PADDING-LEFT: 8px; MARGIN-BOTTOM: 20px; PADDING-BOTTOM: 8px; PADDING-TOP: 2px; BACKGROUND-COLOR: #e0ecee}#ygrp-vital #vithd { FONT-WEIGHT: bold; FONT-SIZE: 77%; TEXT-TRANSFORM: uppercase; COLOR: #333; FONT-FAMILY: Verdana}#ygrp-vital UL { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 2px 0px; PADDING-TOP: 0px}#ygrp-vital UL LI { CLEAR: both; BORDER-RIGHT: #e0ecee 1px solid; BORDER-TOP: #e0ecee 1px solid; BORDER-LEFT: #e0ecee 1px solid; BORDER-BOTTOM: #e0ecee 1px solid; LIST-STYLE-TYPE: none}#ygrp-vital UL LI .ct { PADDING-RIGHT: 0.5em; FONT-WEIGHT: bold; FLOAT: right; WIDTH: 2em; COLOR: #ff7900; TEXT-ALIGN: right}#ygrp-vital UL LI .cat { FONT-WEIGHT: bold}#ygrp-vital A { TEXT-DECORATION: none}#ygrp-vital A:hover { TEXT-DECORATION:
underline}#ygrp-sponsor #hd { FONT-SIZE: 77%; COLOR: #999}#ygrp-sponsor #ov { PADDING-RIGHT: 13px; PADDING-LEFT: 13px; MARGIN-BOTTOM: 20px; PADDING-BOTTOM: 6px; PADDING-TOP: 6px; BACKGROUND-COLOR: #e0ecee}#ygrp-sponsor #ov UL { PADDING-RIGHT: 0px; PADDING-LEFT: 8px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px}#ygrp-sponsor #ov LI { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 77%; PADDING-BOTTOM: 6px; PADDING-TOP: 6px; LIST-STYLE-TYPE: square}#ygrp-sponsor #ov LI A { FONT-SIZE: 130%; TEXT-DECORATION: none}#ygrp-sponsor #nc { PADDING-RIGHT: 8px; PADDING-LEFT: 8px; MARGIN-BOTTOM: 20px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; BACKGROUND-COLOR: #eee}#ygrp-sponsor .ad { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 8px; PADDING-TOP: 8px}#ygrp-sponsor .ad #hd1 { FONT-WEIGHT: bold; FONT-SIZE: 100%; COLOR: #628c2a; LINE-HEIGHT: 122%; FONT-FAMILY: Arial}#ygrp-sponsor .ad A { TEXT-DECORATION: none}#ygrp-sponsor .ad A:hover { TEXT-DECORATION:
underline}#ygrp-sponsor .ad P { MARGIN: 0px}o { FONT-SIZE: 0px}..MsoNormal { MARGIN: 0px}#ygrp-text TT { FONT-SIZE: 120%}BLOCKQUOTE { MARGIN: 0px 0px 0px 4px}..replbq { }
Send instant messages to your online friends http://in.messenger.yahoo.com
Stay connected with your friends even when away from PC. Link: http://in.mobile.yahoo.com/new/messenger/
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Protect your PC from spy ware with award winning anti spy technology. It's free.
http://us.click.yahoo.com/97bhrC/LGxNAA/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/
|