[amibroker] Re: Rounding the value from a formula, for a futures contract, to its Tick value

2010-06-15 Thread dbwyatt_1999
I've been using the function below for years. It uses round() rather than modulus and an if statement. function Round2TickSize(aValue) { TickInv = 1 / TickSize; return (round(aValue * TickInv) / TickInv); } Regards, David --- In amibroker@yahoogroups.com, David Weir wrote: >

[amibroker] Re: AmiBroker as an intraday trading platform

2010-03-10 Thread dbwyatt_1999
This depends on what is meant by "viable" and "intraday trading platform". AmiBroker is an excellent charting, quote, back-testing, and scanning platform and a usable automation platform for Interactive Brokers with a good bit of programming. It works well with a real-time datafeed. However m

[amibroker] Re: Charting Return Distributions

2010-02-05 Thread dbwyatt_1999
For custom analysis charts, I copy and paste the back-tester trades into Excel. It only takes a minute to create a scatter plot using the chart wizard. You can use Data Analysis->Histogram in Excel to automatically bucket and count the returns for a distribution histogram which you can then

[amibroker] Re: Duplicating Symbols

2010-01-16 Thread dbwyatt_1999
- "Apply to" set as "Use Filter" and choose desired watchlist > - "Range" set as "n last days" with n = 1 > - Scan > > All duplicate symbols were generated, all with seemingly identical data. > > Mike > > --- In amibroker@yahoogro

[amibroker] Re: Duplicating Symbols

2010-01-15 Thread dbwyatt_1999
javascript code. Regards, David --- In amibroker@yahoogroups.com, "dbwyatt_1999" wrote: > > I've been unsuccessful in filling a duplicate symbol with quotes from a > source symbol. I could not make it work in AFL, so I reluctantly > switched to javascript and I still

[amibroker] Re: Duplicating Symbols

2010-01-15 Thread dbwyatt_1999
oStocks.Add( TickerNew ); for ( i = 0; i < jsDay.length; i++ ) {oDate = new Date( jsYear[i] + "-" + jsMonth[i] + "-" + jsDay[i] );oQuote = oSymbolNew.Quotations.Add( oDate.getVarDate() ); oQuote.Close = jsClose[i];} } AB.RefreshAll(); AB.S

[amibroker] Re: Duplicating Symbols

2010-01-15 Thread dbwyatt_1999
tations = oSymbolNew.Quotations; > oQuote = oQuotations.Add( NumToStr( dates[i], formatDateTime > ) ); > oQuote.Open = O[i]; > oQuote.High = H[i]; > oQuote.Low = L[i]; > oQuote.Close = C[i]; > oQuote.Volu

[amibroker] Re: Duplicating Symbols

2010-01-14 Thread dbwyatt_1999
sure whether AB would allow it. > > So, the tradeoff as I understand it is: > > 1. Write code once and forget about it > 2. Single point of failure (custom code) > 3. Scales without code change to unlimited symbols over unlimited models > > vs. > > 1. AB handles the ba

[amibroker] Re: Duplicating Symbols

2010-01-14 Thread dbwyatt_1999
a uniquely named watchlist. This would be slower. But, the maintenance > nightmare that you are describing would disappear. And, it would be easier to > extend the system (i.e. adding new symbols to a given watchlist without any > change of code). > > Mike > > --- In amibr

[amibroker] Re: Duplicating Symbols

2010-01-14 Thread dbwyatt_1999
oQuote.Open = O[i]; > oQuote.High = H[i]; > oQuote.Low = L[i]; > oQuote.Close = C[i]; > oQuote.Volume = V[i]; > oQuote.OpenInterest = OI[i];

[amibroker] Re: Duplicating Symbols

2010-01-14 Thread dbwyatt_1999
I've attempted to code functionality to duplicate symbols using the AmiBroker OLE interface. In my test code below, 2 symbols ($A0 and $CA) are attempted to be duplicated into symbols $A0_2, $A0_3, $CA_2, and $CA_3. The duplication process entails: 1. adding a new symbol 2. setting

[amibroker] Duplicating Symbols

2010-01-13 Thread dbwyatt_1999
I've got a system that consists of 12 models. For each model, I've defined a watchlist that has unique symbol names that are only used by a single model. The unique symbol names are duplicates of a source symbol with incremental numbers attached (e.g. ES, ES_2, ES_3, ..., ES_12). I create the

[amibroker] Re: Help with filling array

2009-12-24 Thread dbwyatt_1999
I think what you are after is a 2-dimensional array where each array contains a slope of a specific look-back period (i.e. 40,41,42,etc.) for each bar in your dataset. Unfortunately, AFL does not support multi-dimensional arrays (at least as far as I know...). Maybe using a function would be

[amibroker] Re: How to use custom indicator

2009-12-20 Thread dbwyatt_1999
Rolf, You have to include your custom indicator code in your strategy code. This can be done a number of ways: - copy the custom indicator code into your strategy code. - #include your custom indicator AFL at the top of your strategy code. If you have a need to call your indicator over and o

[amibroker] Re: How to make Range Bars

2009-12-20 Thread dbwyatt_1999
For range charts, make sure you have "Tick size" set properly for your symbol. Display the Symbol information window (Symbol->Information...), scroll down to Contract Specification and make sure "Tick Size" is set to 0.5 for the FTSE. The time displayed for a bar can be configured in Tools->Pre

[amibroker] Re: Multiple Strategies in one backtest - help needed

2009-11-15 Thread dbwyatt_1999
There was a long discussion on this back in July. Search "Multiple Strategy System" in this yahoo group. The solution entails: 1. Duplicating the instrument data for each strategy with different names (e.g. ZZZ_1, ZZZ_2, ZZZ_3 where ZZZ is the instrument ticker symbol). I do this by renami

[amibroker] Re: No performance increase with RAM Disk and CDI data???

2009-11-14 Thread dbwyatt_1999
Have you used the AFL Code Profiler (AFL Editor: Tools->Code Check & Profile)? You can determine which functions are consuming the most time and sometimes find faster ways of implementing them. For example, I found WMA (weighted moving average) to be much slower than EMA (exponential moving av

[amibroker] Re: Trying to plot historical volatility with AFL

2009-11-14 Thread dbwyatt_1999
I'm not familiar with ivolatility.com, but I would guess they are calculating an implied volatility based on closing SP option prices using an option pricing model like Black-Scholes. Regards, David --- In amibroker@yahoogroups.com, Potato Soup wrote: > > I'm trying to plot the 30 day hist

[amibroker] Re: REQ Please help code fibonacci bands in these lines as given-thanks

2009-11-12 Thread dbwyatt_1999
The fib lines look to me like Donchian Channels with fib lines dividing the upper and lower channel: _SECTION_BEGIN("DonchianFibs"); pds=Param("DFibLookback",55,1,200,1); DonchianUpper =HHV(H,pds); DonchianLower = LLV(L,pds); DonchianRange = DonchianUpper-DonchianLower; Donchian236 = 0.236 * Do

[amibroker] Re: IB Expanded Historical Data

2009-11-03 Thread dbwyatt_1999
v1.7.1 IB plugin the "one-year backfill has been removed because of instability". I think the website plugin revision history tells me what I wanted to know... Thanks, David --- In amibroker@yahoogroups.com, "mark.a.brand" wrote: > > Unfortunately is was Octob

[amibroker] IB Expanded Historical Data

2009-11-03 Thread dbwyatt_1999
I see in IB's Oct. 20 newsletter that they have expanded their historical data: http://www.interactivebrokers.com/en/general/communiques/2008/10-17-08.php?ib_entity=llc "Charts and ChartTrader have seen many enhancements including ... more historical data to allow time periods of 2 and 3 years..

[amibroker] Re: Automated Internet Based Stock Scanners

2009-10-14 Thread dbwyatt_1999
lows more than 1000. > > Regards > Robert > > --- In amibroker@yahoogroups.com, "dbwyatt_1999" dbw451@ wrote: > > > > > > Herman, > > > > The best stock scanning service I've used is Trade Ideas > > (www.trade-ideas.com <http://w

[amibroker] Re: Automated Internet Based Stock Scanners

2009-10-14 Thread dbwyatt_1999
Herman, The best stock scanning service I've used is Trade Ideas (www.trade-ideas.com ). All of their scans are pre-defined, so they are not nearly as flexible as AmiBroker. However they recognize some difficult to program chart patterns like consolidation areas, we

[amibroker] Re: Indicators from multiple time frames, Daily and Intraday 1 min chart.

2009-07-16 Thread dbwyatt_1999
ogle Chrome. Works from IE and Firefox > (I believe). > > Mike > > --- In amibroker@yahoogroups.com, "dbwyatt_1999" wrote: > > > > Hmmm, I tried Yahoo's beta Rich-Text Editor... > > > > Assuming your default timeframe is 1 minute bars, somethi

[amibroker] Re: Indicators from multiple time frames, Daily and Intraday 1 min chart.

2009-07-15 Thread dbwyatt_1999
; > > > --- In amibroker@yahoogroups.com, "dbwyatt_1999" wrote: > > > > > > --- In amibroker@yahoogroups.com, "markedme9" wrote: > > > > > > > > > Hello, > > > > > > What would be the right approach to get i

[amibroker] Re: Indicators from multiple time frames, Daily and Intraday 1 min chart.

2009-07-15 Thread dbwyatt_1999
--- In amibroker@yahoogroups.com, "markedme9" wrote: > > > Hello, > > What would be the right approach to get indiactor from multiple time > frames? > > Example – > > Condition of > > Condition1 = Cross( EMA( Close, 5 ), EMA( Close, 12 ) ); > > should meet on daily chart. This is the first condit

[amibroker] Re: Multiple Strategy System

2009-07-10 Thread dbwyatt_1999
tems times # symbols). Duh..., I've wasted more hours than I care to admit trying to figure out why my combined systems produced output significantly different than what I would expect based on the individual systems. Regards, David --- In amibroker@yahoogroups.com, "dbwyatt_199

[amibroker] Re: Multiple Strategy System

2009-07-09 Thread dbwyatt_1999
lso run an ATC and just add OHLCVOI, to each psuedo > ticker, for one symbol only. > > --- In amibroker@yahoogroups.com, "ang_60" wrote: > > > > --- In amibroker@yahoogroups.com, "dbwyatt_1999" wrote: > > > > > > ang_60, > >

[amibroker] Re: Multiple Strategy System

2009-07-07 Thread dbwyatt_1999
ang_60, Duplicating the symbol data for each model is actually a very interesting idea. In my case that would be 12 x 27 = 324 symbols and 12 watchlists. Is there an easy way to duplicate a symbol? If I export, copy file, rename file, import, manually type in the symbol information (tick si

[amibroker] Re: Multiple Strategy System

2009-07-07 Thread dbwyatt_1999
ies% to evaluate comparitive MM results. > > You said you can do 90% of what you want in AB. > What do you need for the last 10% ... the short list :-) > Do you want to do it here or are you just as happy to go to MSA? > > Thanks once again. > > > Ang - what I am tryin

[amibroker] Re: Multiple Strategy System

2009-07-07 Thread dbwyatt_1999
tratrade equity is a hypothetical > figure ... the outcome of the trade isn't known until it is closed. > > > > > Here is the link to Howard's post that I referred to prev. > He says that he is including Portfolio Construction in his next book > (Advanced AB)

[amibroker] Re: Multiple Strategy System

2009-07-06 Thread dbwyatt_1999
Soham, I faced the same issue except I have 12 models that use a portfolio of 27 futures instruments. The issues involved with running multiple systems simultaneously are much more difficult than dividing the system logic by symbols or watchlists. For example because you are considering trend

[amibroker] Re: ~~~EQUITY fields values

2009-06-24 Thread dbwyatt_1999
OPEN: Long-only Equity > HIGH: Short-only Equity > > All values refer to the CLOSING value of equity (at the end of the bar). > > Brenton > > > dbwyatt_1999 wrote: > > > > > > I'm also looking for the definitions of the ~~~EQUITY field values. I >

[amibroker] Re: Position sizing in backtest

2009-06-23 Thread dbwyatt_1999
If the concern over the large trades is liquidity (i.e. there's not enough volume to accomodate without large slippage), you can accomplish a similar position size restriction by setting the "Limit trade size as % of entry bar volume" under the "Portfolio" tab of "Settings...". Set it to a smal

[amibroker] Re: ~~~EQUITY fields values

2009-06-23 Thread dbwyatt_1999
I'm also looking for the definitions of the ~~~EQUITY field values. I think Brenton has the Close and Low fields correct. It's easy to see that the Volume field is 1 for a trade on that bar and 0 for no trade. I have not been able to figure out the Open and High field values. My guess is tha

[amibroker] Equity withdraws

2009-06-18 Thread dbwyatt_1999
I would like to evaluate the performance effect of various hedge fund fees in portfolio system back-tests. There are usually two fees involved; a management fee and a performance fee. The management fee is a percentage of current equity (e.g. 2%) charged annually. The performance fee is a per

[amibroker] Re: PositionSize based on Equity and Trade Risk

2009-05-31 Thread dbwyatt_1999
is in the SetPostionSize call. ie > > SetPositionSize(RiskPct/StopSize,spsPercentOfEquity); > > Personally I don't believe in compounding profits in backtesting, so > don't test this way myself, but that's another arguement. > > Brenton > * > > * > >

[amibroker] Re: PositionSize based on Equity and Trade Risk

2009-05-30 Thread dbwyatt_1999
this case I am going long at PhighPrice with an initial  stop a PLowPrice > and not taking the trade if the MaxLoss exceeds a certain level. From this > point you could calculate the MaxLoss as a % of equity. Does this help? > > James > > > > > _

[amibroker] PositionSize based on Equity and Trade Risk

2009-05-30 Thread dbwyatt_1999
I know setting PositionSize based on Equity and Trade Risk has been the topic of numerous threads and writeups, but I'm missing some understanding. I'm backtesting a portfolio of futures contracts and would like to set the Position size of each trade based on each trade's risk (i.e. abs(entryPr

[amibroker] Re: Is it possible to chart this in Amibroker ?

2009-05-21 Thread dbwyatt_1999
It's not perfect, but maybe a starting point. You could use TimeFrame functions with the PlotOHLC function using styleCloud: tfSec = in5Minute; TimeFrameSet(tfSec); dopen = O; dhigh = H; dlow = L; dclose = C; TimeFrameRestore(); dopen2 = TimeFrameExpand(dopen,tfSec, expandFirst); dhigh2 = TimeF

[amibroker] Re: AB tick bar analysis

2007-12-26 Thread dbwyatt_1999
t > > refresh interval of 0 be different than a 10t chart with a refresh > > interval of 3 seconds? > > > > No, ticks are collected one by one independently without any reference to chart refresh interval. > Making chart refresh interval longer will simply update

[amibroker] Re: AB tick bar analysis

2007-12-26 Thread dbwyatt_1999
or true tick charts you need to use tick-by-tick feed which is eSignal or IQFeed. > > Best regards, > Tomasz Janeczko > amibroker.com > - Original Message - > From: "dbwyatt_1999" <[EMAIL PROTECTED]> > To: > Sent: Wednesday, December 26, 2007 4:23 A

[amibroker] Re: AB tick bar analysis

2007-12-25 Thread dbwyatt_1999
> > Note that I only have the standard version of AB so I am unsure if it > is different for the professional version. > > > > --- In amibroker@yahoogroups.com, "dbwyatt_1999" wrote: > > > > Thanks Tomasz. I am not using the

[amibroker] Re: AB tick bar analysis

2007-12-25 Thread dbwyatt_1999
; to specify > > $TICKMODE 1 > > in the ASCII importer definition. > > See the documentation of ASCII importer - it has very detailed docs > in the User's Guide. > > > Best regards, > Tomasz Janeczko > amibroker.com > - Original Message - &

[amibroker] Re: AB tick bar analysis

2007-12-24 Thread dbwyatt_1999
Thanks Barry, you do have a point that IB data does not have a timestamp which would make comparing different captures difficult. The Scottrade DJI tick data looks like it's 2 second snapshots. I'm not so much concerned about having exact timestamps, but the number of tick bars for a time peri

[amibroker] Re: Passing a variable into the Ref() function

2007-11-10 Thread dbwyatt_1999
Variables are arrays in AB, so Ref(Close,-x) probably would not work. If you have a predefined set of values for x, you could use iif statements: myValue = iif(x==5, Ref(C,-5), iif(x==10, Ref(C,-10), iif(x==15, Ref (C,-15),Null))); However the best way to access variable array index offsets is

[amibroker] Re: Does anyone care to port this indicator?

2007-11-08 Thread dbwyatt_1999
If this code is Avery Horton's (a.k.a The Rumpled One) Dynamic Support and Resistance lines, I already wrote an AmiBroker version last summer and posted it to the Kreslik forum where Avery posts all his code. I did not port his code but rather just wrote the same or similar functionality. You

[amibroker] Re: IB TWS 875

2007-08-02 Thread dbwyatt_1999
t; <[EMAIL PROTECTED]> wrote: > > My TWS is working as usual as well. > > > > Clement > > > > > > From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf > Of dbwyatt_1999 > Sent: Thursday, August 02, 2007 10:44 AM > To: am

[amibroker] Re: IB TWS 875

2007-08-01 Thread dbwyatt_1999
Thanks Bryan, I guess I'll have to try again. Regards, David --- In amibroker@yahoogroups.com, "Bryan" <[EMAIL PROTECTED]> wrote: > > All is well over here with AB and TWS 875.1 > > > --- In amibroker@yahoogroups.com, "dbwyatt_1999" wrote: > &

[amibroker] IB TWS 875

2007-08-01 Thread dbwyatt_1999
I upgraded TWS to the version 875 (July 26) last night and this morning I could not get any of my AB charts to work. I get the error message "no chart to display". I then reinstalled the previous TWS version 873 and AB charting works great again. Anyone else having problems with the latest TWS

[amibroker] Re: Historical IB Data

2007-05-21 Thread dbwyatt_1999
Fred, IB is not really in the historical quote business and only keeps about 30 days of historical data online, so the data for older contracts disappear. For older contracts, you'll need to import data from another source like SCMagic (http://www.scmagic.org/English/Index.htm). Regards, Da