[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

[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 many

[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
last days with n = 1 - Scan All duplicate symbols were generated, all with seemingly identical data. Mike --- In amibroker@yahoogroups.com, dbwyatt_1999 dbw451@ wrote: Excellent Mike! Great suggestions. However the results of your modifications is similar to the results I

[amibroker] Re: Duplicating Symbols

2010-01-15 Thread dbwyatt_1999
]; oQuote.Close = C[i]; oQuote.Volume = V[i]; oQuote.OpenInt = OI[i]; } } AB.RefreshAll(); AB.SaveDatabase(); } --- In amibroker@yahoogroups.com, dbwyatt_1999 dbw451@ wrote: Using OLE objects in AFL, what is the Date parameter

[amibroker] Re: Duplicating Symbols

2010-01-15 Thread dbwyatt_1999
( oDate.getVarDate() ); oQuote.Close = jsClose[i];} } AB.RefreshAll(); AB.SaveDatabase(); }% --- In amibroker@yahoogroups.com, dbwyatt_1999 dbw...@... wrote: Excellent Mike! Great suggestions. However the results of your modifications is similar to the results I

[amibroker] Re: Duplicating Symbols

2010-01-15 Thread dbwyatt_1999
the javascript code. Regards, David --- In amibroker@yahoogroups.com, dbwyatt_1999 dbw...@... 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 cannot get quote data

[amibroker] Re: Duplicating Symbols

2010-01-14 Thread dbwyatt_1999
]; } AB.RefreshAll(); AB.SaveDatabase(); RestorePriceArrays(); } } } Thanks, David --- In amibroker@yahoogroups.com, dbwyatt_1999 dbw...@... wrote: I've got a system that consists of 12 models

[amibroker] Re: Duplicating Symbols

2010-01-14 Thread dbwyatt_1999
] + - + qDay[i]; oQuote = oQuotations.Add( qDate ); oQuote.Close = C[i]; } Thanks, David --- In amibroker@yahoogroups.com, dbwyatt_1999 dbw...@... wrote: I've attempted to code functionality to duplicate symbols using the AmiBroker OLE interface. In my test code below, 2

[amibroker] Re: Duplicating Symbols

2010-01-14 Thread dbwyatt_1999
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 amibroker@yahoogroups.com, dbwyatt_1999 dbw451@ wrote: I've attempted to code functionality to duplicate

[amibroker] Re: Duplicating Symbols

2010-01-14 Thread dbwyatt_1999
. Multiple points of failure (x symbols times y models) 3. Constantly update duplicate symbol histories (error prone) Mike --- In amibroker@yahoogroups.com, dbwyatt_1999 dbw451@ wrote: I'm already using a uniquely named watchlist for each model (in fact, I think I got

[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

[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

[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

[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

[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 potatoso...@... wrote: I'm trying to plot

[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

[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 *

[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

[amibroker] Re: IB Expanded Historical Data

2009-11-03 Thread dbwyatt_1999
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 mark.a.br...@... wrote: Unfortunately is was October 2008. 2009/11/4 dbwyatt_1999

[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 http://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,

[amibroker] Re: Automated Internet Based Stock Scanners

2009-10-14 Thread dbwyatt_1999
--- 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://www.trade-ideas.com ). All of their scans are pre-defined, so they are not nearly as flexible as AmiBroker. However they recognize some

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

2009-07-16 Thread dbwyatt_1999
from IE and Firefox (I believe). Mike --- In amibroker@yahoogroups.com, dbwyatt_1999 dbw451@ wrote: Hmmm, I tried Yahoo's beta Rich-Text Editor... Assuming your default timeframe is 1 minute bars, something like this should work: Condition1 = Cross( EMA( Close, 5 ), EMA

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

2009-07-15 Thread dbwyatt_1999
--- In amibroker@yahoogroups.com, markedme9 marked...@... 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

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

2009-07-15 Thread dbwyatt_1999
@yahoogroups.com, dbwyatt_1999 dbw451@ wrote: --- In amibroker@yahoogroups.com, markedme9 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

[amibroker] Re: Multiple Strategy System

2009-07-10 Thread dbwyatt_1999
# 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_1999 dbw...@... wrote: Brian

[amibroker] Re: Multiple Strategy System

2009-07-09 Thread dbwyatt_1999
symbol only. --- In amibroker@yahoogroups.com, ang_60 ima_cons@ wrote: --- In amibroker@yahoogroups.com, dbwyatt_1999 dbw451@ wrote: 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

[amibroker] Re: Multiple Strategy System

2009-07-07 Thread dbwyatt_1999
://finance.groups.yahoo.com/group/amibroker/message/138075 KEYWORDS OPTIMAL PORTFOLIO CONSTRUCTION MODELING --- In amibroker@yahoogroups.com, dbwyatt_1999 dbw451@ wrote: Soham, I faced the same issue except I have 12 models that use a portfolio of 27 futures instruments. The issues involved

[amibroker] Re: Multiple Strategy System

2009-07-07 Thread dbwyatt_1999
and Tomasz .. thanks. I will study your suggestions. --- In amibroker@yahoogroups.com, dbwyatt_1999 dbw451@ wrote: Hi Brian, Below are responses to your post: I assume you mean 12 systems? Yes, 12 systems; I use the terms system and model interchangeably. So you are running

[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

[amibroker] Re: ~~~EQUITY fields values

2009-06-24 Thread dbwyatt_1999
: 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 think Brenton has the Close and Low fields correct. It's easy to see that the Volume

[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

[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 small

[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

[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.

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

2009-05-30 Thread dbwyatt_1999
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 From: dbwyatt_1999 dbw...@... To: amibroker@yahoogroups.com Sent: Saturday, May 30

[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 =

[amibroker] Re: AB tick bar analysis

2007-12-26 Thread dbwyatt_1999
because it counts duplicate events as separate ticks. Timestamps would NOT change that. For 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

[amibroker] Re: AB tick bar analysis

2007-12-26 Thread dbwyatt_1999
regards, Tomasz Janeczko amibroker.com - Original Message - From: dbwyatt_1999 [EMAIL PROTECTED] To: amibroker@yahoogroups.com Sent: Wednesday, December 26, 2007 4:34 PM Subject: [amibroker] Re: AB tick bar analysis I do not know whether IRT's chart is wrong is a fact

[amibroker] Re: AB tick bar analysis

2007-12-25 Thread dbwyatt_1999
. See the documentation of ASCII importer - it has very detailed docs in the User's Guide. Best regards, Tomasz Janeczko amibroker.com - Original Message - From: dbwyatt_1999 [EMAIL PROTECTED] To: amibroker@yahoogroups.com Sent: Monday, December 24, 2007 10:44 PM Subject

[amibroker] Re: AB tick bar analysis

2007-12-25 Thread dbwyatt_1999
. --- In amibroker@yahoogroups.com, dbwyatt_1999 dbw451@ wrote: Thanks Tomasz. I am not using the ASCII importer. I'm using the IB plugin to receive data from IB TWS in realtime. For my analysis, I'm running three programs on the same computer: IB TWS, AmiBroker Pro

[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

[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

[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.

[amibroker] Re: IB TWS 875

2007-08-02 Thread dbwyatt_1999
] 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: amibroker@yahoogroups.com Subject: [amibroker] Re: IB TWS 875 Thanks Bryan, I

[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: 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 dbw451@ wrote: I upgraded TWS to the version 875 (July 26) last

[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,