Here is a snippet of code I use for my
Interpretation window. I think you should be able to modify this easy enough for
your Exploration Report. Substitute “V” for “C” and
change the look back from 65 to whatever is appropriate. Probably this can be coded
more ‘elegantly’ but it seems to work correctly as is anyway.
Regards,
Gordon Sutherland
// Commentary
for Interpretation Window (HHV Statistics)
HHV_Bars
= HHVBars(C,65);
HHV_Close
= HHV(C,65);
HHV_Off_C
= ((C-HHV_Close)/HHV_Close)*100;
HHBars = HighestSinceBars(BarIndex()==BarCount-1-65,C);
HHV65_date = ValueWhen(HHBars==0,DateTime(),1)+1;
"Bars since HHV65 Close " + WriteVal(HHV_Bars ,1.0); // Finds last not 1st high within
"Close on HHV65
" + WriteVal(HHV_Close,1.3);
"Close% Off HHV65_C " + WriteVal(HHV_Off_C,1.1) + "%";
"Date on HHV
" + WriteVal(HHV65_date,formatDateTime)
+ "\n";
-----Original
Message-----
From: amibroker@xxxxxxxxxxxxxxx
[mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of jnz88
Sent: Tuesday, 21 March 2006 1:46
a.m.
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: How to
caculate the date several bar before the filter is ture in Explore?
Let's define 'the date which
is automaticlly listed in the exploration
results' as date_auto
I would also like to list the date of
'date_auto - Bar_HHV_Vol'.
There is several date related functions, but they
seems not to be
directly applied.
--- In amibroker@xxxxxxxxxxxxxxx, Graham
<kavemanperth@xxx> wrote:
>
> the date is automaticaly listed in the
exploration results
>
> --
> Cheers
> Graham
> AB-Write >< Professional AFL Writing
Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm
>
>
> On 3/20/06, jnz88 <jnz88@xxx> wrote:
> > I have a simple formular for Explore.
> >
> >
----------------------------------------------
> > perd = 30;
> > Val_HHV_Vol = HHV(V, perd);
> > Bar_HHV_Vol = HHVBars(V, perd);
> >
> > filter = ref(V, -Bar_HHV_Vol) / ref(V,
-Bar_HHV_Vol-1) > 2;
> > AddColumn(ref(V, -Bar_HHV_Vol),
"prev vol");
> > ?? - AddTextColumn()
> >
-------------------------------------------------------
> >
> > I'd also like to print out the date when
the filter condition is true
> > ( not only the volume)
> >
> > thanks,
> >
> >
> >
> >
> >
> >
> >
> > Please note that this group is for
discussion between users only.
> >
> > To get support from AmiBroker please
send an e-mail directly to
> > SUPPORT {at} amibroker.com
> >
> > For other support material please check
also:
> > http://www.amibroker.com/support.html
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
>
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
SPONSORED LINKS
YAHOO! GROUPS LINKS