PureBytes Links
Trading Reference Links
|
Vinay,
1) Yes.
2) I don't have AmiBroker in front of me right now, so you'll have to
test this out for yourself. But, try using the same ValueWhen
technique for the other values.
e.g.
SecondLastSpikeBars = BarIndex() - ValueWhen(VolumeSpike, BarIndex(),
2);
SecondLastSpikeVal = ValueWhen(VolumeSpike, Volume, 2);
SecondSpikeBars = ValueWhen(VolumeSpike, BarIndex(), -1) - BarIndex();
SecondSpikeVal = ValueWhen(VolumeSpike, Volume, -1);
Mike
--- In amibroker@xxxxxxxxxxxxxxx, "Vinay Gakkhar." <vgakkhar@xxx>
wrote:
>
> Dear Mike,
>
> 1) Should I count number of days in LastSpikeBars and in
NextSpikeBars from Dec 11, 2007 ?
>
> 2) If I want to know when the spike previous to LastSpikeBars took
place, or when the subsequent spike took place after NextSpikeBars,
what should be my codes for that?
>
> Thanks for your help.
>
> Vinay
>
>
> > --- In amibroker@xxxxxxxxxxxxxxx, "Mike" <sfclimbers@> wrote:
> >
> > Specifically; I believe that the following code will do what you
are
> > looking for. For a good test, set from:/to: dates as Dec 11, 2007
and
> > run your exploration across all stocks of NYSE, NASDAQ, AMEX.
Using
> > my data provider, I get 4129 rows. If you just want to try with a
> > single symbol, use "A".
> >
> > Mike
> >
> > BackRef = 150;
> > VolumeSpike = (V>(MA(V,BackRef)+StDev(V,BackRef)));
> >
> > LastSpikeBars = BarsSince(VolumeSpike);
> > LastSpikeVal = ValueWhen(VolumeSpike, Volume);
> >
> > NextSpikeBars = ValueWhen(VolumeSpike, BarIndex(), 0) - BarIndex
();
> > NextSpikeVal = ValueWhen(VolumeSpike, Volume, 0);
> >
> > Filter = LastSpikeBars >= 0;
> > AddColumn(LastSpikeVal, "Last Spike");
> > AddColumn(LastSpikeBars, "Bars Ago", 4.0);
> > AddColumn(NextSpikeVal, "Next Spike");
> > AddColumn(NextSpikeBars, "Bars Later", 4.0);
> >
> > _SECTION_BEGIN("Volume1");
> > Plot( Volume, _DEFAULT_NAME(), ParamColor("Color",
colorBlueGrey ),
> > ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick,
> > maskHistogram ), 2 );
> > _SECTION_END();
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@> wrote:
> >>
> >> In ordert o see into future you will need to use Valuewhen
function
> >>
> >> --
> >> Cheers
> >> Graham Kav
> >> AFL Writing Service
> >> http://www.aflwriting.com
> >>
> >>
> >>
> >> 2008/6/1 Vinay Gakkhar. <vgakkhar@>:
> >> > Dear Grahan,
> >> >
> >> > Thanks for your help.
> >> >
> >> > At present I calculate the number of days in the past period
> > since the last volume spike using the following formula:
> >> > BackRef = 150; // Number of days to look back
> >> > DaysSinceLastVolumeSpike = BarsSince(V>(MA(V,BackRef)+StDev
> > (V,BackRef)));
> >> >
> >> > Now I want to find the number of days in the future period till
> > the next volume spike.
> >> > For example, if today I select a past date (suppose 22nd Jan
> > 2008) both in the 'from' and in the 'to' boxes of 'Range'
> > in 'Automatic Analyssis' and press the 'Explore', maybe it will
show
> > to me that the next volume spike took place 9 days after 22nd Jan
> > 2008.
> >> >
> >> > I hope I have explained in an understandable manner.
> >> >
> >> > Can you please guide me now?
> >> >
> >> > Best regards,
> >> >
> >> > Vinay
> >> >
> >> > On Sun, 01 Jun 2008 07:04:28 +0530, Graham <kavemanperth@>
> > wrote:
> >> >
> >> >> Not sure what you are asking
> >> >> What is the future that you want?
> >> >>
> >> >
> >> > ------------------------------------
> >> >
> >> > 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 NEW RELEASE ANNOUNCEMENTS and other news always check
DEVLOG:
> >> > http://www.amibroker.com/devlog/
> >> >
> >> > For other support material please check also:
> >> > http://www.amibroker.com/support.html
> >> > Yahoo! Groups Links
> >> >
> >> >
> >> >
> >> >
> >>
> >
> > --- End forwarded message ---
> >
> >
> >
>
>
>
>
> ------------------------------------
>
> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|