[amibroker] Re: calculating the mean of only some of the observations in an array ?

2008-04-28 Thread cdepuy
oops and you know when your signal was generated, use that > bar number as the starting poing point for your loop. Pick an end point as > you edesire. > > a = SignalBarNumber; > b = Bars required in your calculation; > > for (i=a; i< a+b; i++) > ... > >

[amibroker] calculating the mean of only some of the observations in an array ?

2008-04-28 Thread cdepuy
Without requiring loops that work through the whole barcount, can someone point out to me how to exclude certain values in an array when calculating a statistic across an array? I must be missing something. I am trying to calculate the mean of some values that occur only occassionally (after m

[amibroker] CBT / maintain net exposure close to zero

2008-04-03 Thread cdepuy
I am trying to figure out how to get the custom backtester to take only buy signals when greater than 5% net short and take only short signals when I'm greater than 5% long. I recognize that is not the best feedback loop required to maintain a "hedge" but for learning purposes, I'm OK with an

[amibroker] ATC question

2008-03-31 Thread cdepuy
I would like to write values that change each bar to a "dummy ticker" using ATC. Here in my example, I am retrieving real-time data from eSignal and trying to write it to various fields in a dummy ticker called ~BA (where is ticker). The problem I'm having is that the current values

[amibroker] Saving bid/ask information from eSignal to Ami database

2008-02-19 Thread cdepuy
I am trying to get Amibroker Professional 5.0 while running eSignal to save bid/ask information on 5-second bars to a "dummy" ticker using ATC. What I have written below seems to write (and plot) a cumulative number to a dummy ticker called ~Bid that relates to each sequential bid and ask

[amibroker] Buyprice question

2008-02-19 Thread cdepuy
I am trying to have Amibroker backtest "execute" on prices that are something other than Open, Low, High, Close or Average (as specified in Backtester settings under Trade tab). I expected the code below, using BuyPrice variable to force backtesting to operate on my fixed values of x and y bel

[amibroker] Re: Yahoo Data Very Spotty Last Two Days

2007-11-13 Thread cdepuy
--- In amibroker@yahoogroups.com, "garrybartsch" <[EMAIL PROTECTED]> wrote: > > > Having the same problem. > > Thanks for confirming Dave > I can confirm that amiquote 1.94 is not receiving "Current" quotes for >90% of the tickers for US exchanges. AAPL, RIMM are working, for instance. PEP an

[amibroker] Re: Yahoo Fundamental retrieval

2006-09-07 Thread cdepuy
lps. --- In amibroker@yahoogroups.com, malc fiveeightninenine <[EMAIL PROTECTED]> wrote: > > How did you get fundamental data from yahoo into an amibroker database in the first place? > > cdepuy <[EMAIL PROTECTED]> wrote: I am trying to save fundamental information t

[amibroker] Yahoo Fundamental retrieval

2006-09-07 Thread cdepuy
I am trying to save fundamental information to non-traded tickers to create a database for later analysis. The approach I have outlined below is to use AddToComposite to "store" various fundamentals each day. This code, instead of storing today's data for today's date only, is storing today's

[amibroker] copying categories from one database to another

2006-07-31 Thread cdepuy
I am stumped. Maybe there's a way to do this using menus but i can't find it. I spent time creating custom groups and watchlists and now i want to move a copy of this grouping information to a new database. Does anyone know an easy way to do this? I've started down the path of writing code and

[amibroker] stock price at time of buy signal

2006-06-23 Thread cdepuy
Can anyone tell me what is the difference between these two? I'm tracing and i'm getting different results for different stocks. Thank you! PriceAtBuySignal = ValueWhen (Buy==1,Close); _TRACE("PriceAtBuySignal "+PriceAtBuySignal); PriceAtBuySignal = LastValue (BuyPrice); _TRACE("PriceAtBuySigna

[amibroker] rounding

2006-06-22 Thread cdepuy
what is the easiest way to round a value that i calculate from many decimal places to only 2? i believe the round function in AFL brings it to an integer, as does the integer function. thanks Yahoo! Groups Sponsor ~--> Great things are happening