Voyager,
Thanks for your efforts on this. I did get the correct answers using your code.
Steve
--- In amibroker@yahoogroups.com, Inquisitive Voyager wrote:
>
> OOPS!
>
> same variable name was used in 2 premises-
>
> use this code rest same-
>
>
> a=LastValue(Month())-1;
>
> z=LastValue(
e condition of the for loop (e.g. i <= 2) to track back
> as many months as you're interested in.
> Mike
> --- In amibroker@yahoogroups.com, "Steve_Almond" wrote:
> >
> > Mike,
> >
> > I'm looking for several individual values:
> >
> > 1. the highest for June
> >
> > 2. the highest for May
> >
> > 3. the highest for April
> >
> > That would be 3 values in all.
> >
> > Steve
> >
> >
> >
ther words, are you looking for the highest value for the month of April
> and the separate highest value for the month of May? Or, are you looking for
> the single highest value for the 2 month period spanning April through May?
>
> Mike
>
> --- In amibroker@yahoogroups.com,
gt; wrote:
>
> >
> > try this in commentary-
> >
> >
> > a=LastValue(Month())-2;
> >
> > b=Month()!=Ref(Month(),-1);
> >
> > bi=BarIndex();
> >
> > d=LastValue(ValueWhen(Month()==a *AND* b,bi,1));
> >
> > d=*BarCou
I want to find the highest closing price for a stock in the last month and the
one before that (say highest for May and for April).
I thought I could use something like:
HHV(C,Ref(Month(),-1))
but it seems only to return a recent high value.
Can someone point me in the right direction?
Thanks
e downloads.
> > 6. Not sure what you are doing with PositionScore as it appears to be kind
> > of a True or False condition with your AND. The less than sign is a
> > problem as well. Maybe you are looking for ...
> > PositionScore = IIf( j>MA(j,10), C/Ref(C,-6),
I'm able to use the backtester for Fund rotation (and I understand the use of
'Foreign' symbols.
I cannot seem to combine the two, though.
I want to invest in 3 funds from a group of 10 using the best 6 month return to
select the top 3. I use PositionScore = C/Ref(C,-6);
BUT, I only want to in
n, Jul 19, 2009 at 6:07 PM, steve_almond wrote:
>
> >
> >
> > Is there a way to calculate an equivalent to Excel's PERCENTRANK function
> > in Amibroker?
> > For example. I want to rank today's closing price compared to the previous
> > 100 day's
Is there a way to calculate an equivalent to Excel's PERCENTRANK function in
Amibroker?
For example. I want to rank today's closing price compared to the previous 100
day's closing prices. If today is the 15th highest price, then I want to return
85%.
Thanks,
Steve
Is it possible to adjust the size of the Amiquote window at start-up?
It opens to an unnecessarily large size which I always need to reduce.
Steve
I was trying to calculate the number of bars since the highest close of the
last 126 trading days.
This seems to work:
A1=(HHVBars(C,126));
But this doesn't (it always returns 0):
A1=BarsSince(HHV(C,126));
Why does that not work?
Steve
I was trying to calculate the number of bars since the HHV of price over the
past 6 months (126 trading days).
This seems to work:
A1= HHVBars(C,126);
This doesn't seem to work:
A2=BarsSince(HHV(C,126));
It always returns zero.
Why doesn't the second expression work?
Thanks,
Steve
e1 = ValueWhen( NewYear, Close, 1 );
>
> Filter = NewYear;
>
> AddColumn(Year(), "Year", 1.0 );
>
> AddColumn(100*( EndValue1 - StartValue )/StartValue, "Percentage
change" );
>
> - Original Message -
> From: steve_almond
> To: am
I have been looking at a backtest on an index going back to 1950.
Is there a way to calculate or display the return for each individual
calendar year?
Like so:
1950 2.5%
1951 -1.9%
1952 12.3%
etc.
Steve
f the following month rolls around, hopefully
good enough
> for a quick backtest though...
>
> Steve
>
> FirstDay = Day() < ref( Day(), -1 );
> SecondDay = ref( FirstDay, -1 );
> SixthLastDay = ref( FirstDay, 6 );
> Buy = SixthLastDay;
> Sell = SecondDay;
>
>
I would like to try a backtest which says:
Buy at the open on the 6th last trading day of the month;
Sell at the open on the 2nd trading day of the next month;
So, for the current month:
Buy on Jan 23, 2009
Sell on Feb 03,2009
Can anyone help me to translate that into AFL?
Steve
Mike,
That does the job perfectly, thanks.
Steve
--- In amibroker@yahoogroups.com, "Mike" <[EMAIL PROTECTED]> wrote:
>
> Steve,
>
> Give the following a try:
>
> HHVClose99 = HHV(Close, 99);
> PrevHHVClose99 = Ref(HHVClose99, -1);
> Rising = ValueWhen(HHVClose99 > PrevHHVClose99, BarIndex())
;= or >= instead
of just the < or >
>
> Rick
>
>
>
> - Original Message
> From: steve_almond <[EMAIL PROTECTED]>
> To: amibroker@yahoogroups.com
> Sent: Tuesday, September 30, 2008 5:58:21 PM
> Subject: [amibroker] Line color question
>
>
>
I have a chart with a plot like so:
Plot(HHV(C,99),"HHV/99",1,1);
It plots a "stairstep" up or down
I want the line to be green when it is rising or steady (after an
upmove), red when it is falling or steady (after a downmove).
I tried substituting 'col' in the above formula where:
Col=IIf(HH
I want to copy some stock data from one database to another.
Can anyone tell me if there is there an easy/obvious way to do this?
Steve
> SetOption("MaxOpenLong", 11 );
> SetOption("MaxOpenShort", 7 );
>
> --- In amibroker@yahoogroups.com, "steve_almond" wrote:
> >
> > Thanks for the clues.
> >
> > Using a simple PositionScore like:
> > C-MA(C,21)
> &
to the equities you wish
> to short.
>
> So, you might do it based on distance from the 10 week moving
average,
> with those stocks that are below a 10 week moving average having
> negative scores.
>
> --- In amibroker@yahoogroups.com, "steve_almond" wrote:
> >
Is it possible to combine long/short in rotational trading?
Assume a universe of just 10 stocks.
Case 1:
I want to buy stocks above their 10 week MA and sell short those below
their 10 week MA. This may not require rotational trading - just
buy/short?
Case 2:
I want to buy the 3 stocks most ab
Is there a way to get this file (results.rlst) into Excel, complete
with the column headings?
Steve
I have a universe of 10 stocks.
Each quarter I select the 4 with the highest 12 month return and buy
them.
Next quarter repeat the selection, buying the top 4 once more.
Can anyone put me on the road to backtesting this system?
Thanks,
Steve
> EndPrice = ValueWhen( DateNum() == 1030501, Close );
> PctRtn = ( EndPrice - StartPrice ) / StartPrice * 100
>
> Steve
>
> - Original Message -
> From: "steve_almond" <[EMAIL PROTECTED]>
> To:
> Sent: Thursday, July 10, 2008 8:22 AM
> Subject: [
I would like to do an exploration to calculate simple stock returns,
but at fixed dates. I don't want to use the Ref function which links
the return to today's date.
For example:
% return from May/1/2002 to May/1/2003
% return from Feb/1/2004 to Feb/28/2005
How can I specify those dates in an
I have a universe of just 5 stocks (AAA, BBB, CCC, DDD, EEE).
I want to do a portfolio backtest where each stock will be bought and
sold when it satisfies its own specific indicator.
For example:
Buy AAA when AAA closes above the 200 day MA. Sell AAA when it closes
below the 200 day MA.
Buy BB
Say I have a group of 20 stocks. I use an exploration to calculate
two different values for each stock, let's say:
1. C/ref(C,-55) and
2. C/ref(C,-200)
I want to rank the 20 stocks on each of the two measures and get a
composite score to select the stock which does best overall.
So in this ca
Thanks Tomasz. The registry delete did the job.
Steve
--- In amibroker@yahoogroups.com, "Tomasz Janeczko" <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> Probably it is minimized or moved somewhere to the edge of the screen.
> If you still can not find it, you can reset its position by deleting
thes
Since yesterday, my Formula Editor window has gone missing. When I hit
the icon, or select Formula Editor from the Analysis menu the 'header
bar' of the main window goes from dark blue to pale blue, but the
Formula Editor window doesn't appear. It appears the window is hidden,
but I cannot find
I should have said that I'm using version 4.67
Steve
--- In amibroker@yahoogroups.com, "steve_almond" <[EMAIL PROTECTED]> wrote:
>
> I'm using EOD data. The date (X) axis shows only the month value, no
> matter how much I zoom the scale in using 'dail
I'm using EOD data. The date (X) axis shows only the month value, no
matter how much I zoom the scale in using 'daily view'.
Can I make intermediate dates visible along the X axis?
Steve
33 matches
Mail list logo