[amibroker] How to use TimeFrameSet in plugin dll

2010-07-19 Thread tiedemj
Executing the following code on a 15 min bar chart returns the same value for gSite.getArraySize() arraySize = gSite.GetArraySize(); //returns bars in 15 min chart AmiVar args[ 1 ]; args[0] = makeAmiVarFloat(3600); //proper amibroker var gSite.CallFunction(TimeFrameSet,1,args); arraySize =

[amibroker] Static/persistent memory allocation in plugin DLL

2010-07-01 Thread tiedemj
Hello When allocating memory for objects and data in a C++ custom (plugin) DLL, I'm using AllocArrayResult and Alloc during individual runs, and malloc/free in the initialization of the plugin. However, is it possible to allocate additional static/persistent memory during runs – and what is

[amibroker] Re: IB Controller from C++ plugin

2010-04-28 Thread tiedemj
Still struggling with this! Is there an object overview (methods and properties) available on IB Controller - as with AmiBroker's OLE Automation Object Model overview? Best regards Jens --- In amibroker@yahoogroups.com, tiedemj h...@... wrote: Really excellent information Jules - thank you

[amibroker] Re: IB Controller from C++ plugin

2010-04-10 Thread tiedemj
://www.codeguru.com/cpp/cpp/string/conversions/article.php/c5639/ Most of what you'll need can be found at msdn by just following the links from one function to another. Hope that helps a bit. Jules. --- In amibroker@yahoogroups.com, tiedemj home@ wrote: Hello Tomasz I would be nowhere

[amibroker] Re: IB Controller from C++ plugin

2010-04-09 Thread tiedemj
@yahoogroups.com, reefbreak_sd reefbreak...@... wrote: There is a Yahoo! discussion group TWSAPI that talks about the IB TWS interface. --- In amibroker@yahoogroups.com, tiedemj home@ wrote: bump - anybody? I've seen this question asked before - but can't find any answers. Can

[amibroker] Re: IB Controller from C++ plugin

2010-04-09 Thread tiedemj
and foremost: why would you like to do that ?? (it is possible, but why make things harder when you can do this from AFL?) Best regards, Tomasz Janeczko amibroker.com On 2010-04-09 19:03, tiedemj wrote: Tx, but nothing in TWSAPI forum about how to call IB Broker interface directly from a C

[amibroker] Re: IB Controller from C++ plugin

2010-04-01 Thread tiedemj
bump - anybody? I've seen this question asked before - but can't find any answers. Can somebody just give a hint (if the explanation is not trivial...) best regards Jens Tiedemann --- In amibroker@yahoogroups.com, tiedemj h...@... wrote: Assume it's possible to call IB Controller directly

[amibroker] IB Controller from C++ plugin

2010-03-28 Thread tiedemj
Assume it's possible to call IB Controller directly from an AmiBroker c++ plugin. Can anybody show how to do it in native c++? Best regards

[amibroker] Is there a simple way to add a timespan to a datetime value?

2009-10-25 Thread tiedemj
bump - anyone? --- In amibroker@yahoogroups.com, tiedemj h...@... wrote: The new dateTimeDiff() function is great - saves a lot of date/time arithmetic. But is there a simple way to add a timespan (say number of seconds) to a dateTime value. For instance, I want to use the GTD (Good

[amibroker] Is there a simple way to add a timespan to a datetime value

2009-10-23 Thread tiedemj
The new dateTimeDiff() function is great - saves a lot of date/time arithmetic. But is there a simple way to add a timespan (say number of seconds) to a dateTime value. For instance, I want to use the GTD (Good To Date) TimeInForce value in IBController. So what I need is something like:

[amibroker] Is it possible to set the TWS Client Id in IBController?

2009-10-22 Thread tiedemj
Hi, I'm trying to get IB Controller to work from two computers up against TWS running on another computer. However, I get Error 326 - unable to connect as the client id is already in use Is it possible to configure the client id in the same way as it is for the IB Data plugin. So far, I've

[amibroker] How to identify chart-window in AFL code?

2009-09-26 Thread tiedemj
How can I identify which window is running my AFL code. Say I have two chart windows open - with the same symbol. However, using StaticVarSet/Get (for automatic trading purposes) does not destinguish between the two windows. I need something like the following: chartWindow = xx;

[amibroker] Re: How to identify chart-window in AFL code?

2009-09-26 Thread tiedemj
Tx - This is exactly what I need. However, for some reason, the getChartId() function always return the same value (in my case 1250)... (I create new charts from the file-default chart menu) is it just me - or is there something I don't get? jens

[amibroker] Re: How to identify chart-window in AFL code?

2009-09-26 Thread tiedemj
the different chart IDs and also show the execution order in the AB Log window. It may help you find you bug. Charts never have the same ChartIDs. herman tiedemj wrote: Tx - This is exactly what I need. However, for some reason, the getChartId() function always return the same value

[amibroker] Re: Is Custom Backtester reentrant safe?

2008-08-28 Thread tiedemj
--- In amibroker@yahoogroups.com, tiedemj home@ wrote: bump - still found no resolution on this... --- In amibroker@yahoogroups.com, tiedemj home@ wrote: Hello - trying to stop trading activity when portfolio equity is below maxEquity by some pct, and resume trading when equity rises

[amibroker] Re: Is Custom Backtester reentrant safe?

2008-08-27 Thread tiedemj
bump - still found no resolution on this... --- In amibroker@yahoogroups.com, tiedemj [EMAIL PROTECTED] wrote: Hello - trying to stop trading activity when portfolio equity is below maxEquity by some pct, and resume trading when equity rises above previous maxEquity (where equity

[amibroker] Is Custom Backtester reentrant safe?

2008-08-25 Thread tiedemj
Hello - trying to stop trading activity when portfolio equity is below maxEquity by some pct, and resume trading when equity rises above previous maxEquity (where equity is as if trading had not been suspended) Using custom backttest as follows: // first run to collect when to stop/resume

[amibroker] hedging - is it possible to control individual exits in CB?

2008-08-16 Thread tiedemj
Hello In order to hedge Forex trading, I'm running two independent trading systems. One performs well in certain situations, the other under opposite conditions. However, the two systems will often provide opposite tradesignals (long/short), even in the same bar. I still want to take the two

[amibroker] Re: Taking all signals (long/short) with individual profit/loss target exits

2008-08-15 Thread tiedemj
! ApplyStop()'s Profit Target and Stop Losses are evaluated INDIVIDUALLY for each open trade and they are NOT exited at the same time. Best regards, Tomasz Janeczko amibroker.com - Original Message - From: tiedemj [EMAIL PROTECTED] To: amibroker@yahoogroups.com Sent: Friday, August

[amibroker] Re: Portfolio backtest in forex

2008-08-11 Thread tiedemj
Ilhan, think you are on to something important in the way Amibroker handles forex trading today. However, after having done some tests on my own, I think the code below should be modified to use the currency being traded (first symbol) versus USD instead of base (second symbol) in a currency

[amibroker] Re: Taking all signals (long/short) with individual profit/loss target exits

2008-08-09 Thread tiedemj
at the same time. Best regards, Tomasz Janeczko amibroker.com - Original Message - From: tiedemj [EMAIL PROTECTED] To: amibroker@yahoogroups.com Sent: Friday, August 08, 2008 5:10 PM Subject: [amibroker] Re: Taking all signals (long/short) with individual profit/loss target exits

[amibroker] How to setup AB for IB Forex trading with eSignal data?

2008-08-09 Thread tiedemj
Hello entered all currencies in Preferences-Currencies (using dynamic) entered all base currencies in Symbol-Information-Currency(field) for all symbols using the following values: RoundLotSize = 1 MarginDeposit = -2; //due to IB margin requirement of 2% TickSize = 0.0001; // 0.01 for JPY

[amibroker] Taking all signals (long/short) with individual profit/loss target exits

2008-08-08 Thread tiedemj
Hello Anybody know how to express a system in AFL, that trades ALL buy and short signals - holding each trade until a profit or loss target is reached independent for each individual trade? I was trying to use sigScaleIn/Out - but as there can be both entry - and exit signals on each bar - I

[amibroker] Re: Taking all signals (long/short) with individual profit/loss target exits

2008-08-08 Thread tiedemj
( backtestRegularRawMulti ); rgds, Ed - Original Message - From: tiedemj To: amibroker@yahoogroups.com Sent: Friday, August 08, 2008 1:12 PM Subject: [amibroker] Taking all signals (long/short) with individual profit/loss target exits Hello Anybody know how

[amibroker] How to use (ole) Retrieve() Quotations from C# ??

2008-05-02 Thread tiedemj
So close, but not yet there... Hi - I've been trying to use Retrieve () from Quotations in C# using the description found here: http://groups.google.com/group/microsoft.public.dotnet.framework.inter op/msg/010238fcb89f94ee Below is the code. The ole call goes fine - but it only returns the

[amibroker] Programatically add and delete ticker symbols in database

2007-02-23 Thread tiedemj
Hi, is it possible (using the Amibroker Development Kit), or by other means, to programatically create an amibroker database? Also, is it possible to programatically add and delete ticker symbols into an already existing database (incl. intraday databases using IB plugin)? regards Jens

[amibroker] Re: Multiple Broker.Application instances with multiple CPU machines

2007-01-16 Thread tiedemj
--- In amibroker@yahoogroups.com, Tomasz Janeczko [EMAIL PROTECTED] wrote: Hello, No, by default all .EXE OLE/COM servers use always first running instance, and you can not change it. Best regards, Tomasz Janeczko amibroker.com - Original Message - From: tiedemj [EMAIL PROTECTED

[amibroker] Multiple Broker.Application instances with multiple CPU machines

2007-01-15 Thread tiedemj
Hi, When using the Type objClassType; objClassType = Type.GetTypeFromProgID (Broker.Application); application = Activator.CreateInstance(objClassType); interface to access AmiBroker functionality from C# multiple times, it seems I only get access to one

[amibroker] treatment of same bar sell and buy signals

2006-12-25 Thread tiedemj
Hi If you hold a position, it seems, that if you get both a buy and a sell signal on the same bar for the symbol in your holding position, only the sell signal is executed - and the buy signal for that symbol is ignored in the selection of a new trade, so even if the symbol in question has

[amibroker] Re: DateTime calculations - internal format of dates/days?

2006-05-28 Thread tiedemj
-- Cheers Graham AB-Write Professional AFL Writing Service Yes, I write AFL code to your requirements http://e-wire.net.au/~eb_kavan/ab_write.htm On 28/05/06, tiedemj [EMAIL PROTECTED] wrote: What is the internal format of dates/days in DateTime() numbers. How are years, months and days

[amibroker-ts] Looking for custom portfolio backtester example

2006-04-10 Thread tiedemj
The Porfolio Backtester Interface Reference Guide - preliminary documentation (is there a newer version?), gives a good overview of the methods and facilities available, but no examples. Is there anybody who can point at a (generic) example for the medium- and low- level approach that can be

[amibroker] Re: Best backtest report metric to evaluate and pick optimization settings

2006-03-22 Thread tiedemj
or automated trading. You don't have to dive in to IO but you can down load the documentation and see if that helps Regards Joe - Original Message - From: tiedemj To: amibroker@yahoogroups.com Sent: Monday, March 20, 2006 7:58 AM Subject: [amibroker] Re: Best

[amibroker] Best backtest report metric to evaluate and pick optimization settings

2006-03-19 Thread tiedemj
Ultimately, a high CAR will give the best results overall - but when constructiong trade systems using many symbols/stocks - RAR is also very valuable. However, picking optimization values around an extremely high RAR might lead to curve fitting (this situation will never come around again, as