Re: [amibroker] Re: simple lower lows

2009-03-14 Thread Brenton Hill
Jim For three lower lows you can also use ThreeLowerLows = HHV(L-Ref(L,-1),3)0; Brenton Mike wrote: You should use PeriodsBack, not PeriodsBack - 1. Also, you should define PeriodsBack before using it in the Sum operation. See message 136157. Mike --- In amibroker@yahoogroups.com

Re: [amibroker] Re: Simple slippage implemented in CBT generates COM error

2009-03-18 Thread Brenton Hill
I reckon you'd need to processtradeSignals after modifying the exit prices. ozzyapeman wrote: The custom commission table unfortunately doesn't allow me to do what I want, which is to slip exits by an amount that varies according to market time. The example I am pasting here is simplified.

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

2009-05-31 Thread Brenton Hill
Dave Look up SetPositionSize function *SetPositionSize( size, method ) * /method/ (ARRAY) defines how 'size' is interpreted * spsValue (=1) - dollar value of size (as in previous versions) * spsPercentOfEquity (=2) - size expressed as percent of portfolio-level equity (size must

Re: [amibroker] Re: ~~~EQUITY fields values

2009-06-23 Thread Brenton Hill
David I got this reply from Amibroker support. The fields contain the following: CLOSE : Portfolio Equity LOW: Cash (remaining funds in the portfolio) 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

Re: [amibroker] Status of Norgate Premium Data for Amibroker

2009-09-09 Thread Brenton Hill
Kevin I've been using the data service for about 6 years for ASX and US stocks (all major exchanges + OTC) they even have a complete US history going back to 1950 including stocks that have delisted in that time, great for backtesting. I've been using it with Amibroker for about 3 years.

Re: [amibroker] Status of Norgate Premium Data for Amibroker

2009-09-09 Thread Brenton Hill
Kevin The data is actually stored on your PC in Metastock format, which Amibroker reads through it's Metastock data plugin. Once you've run the integration script to set up the database, all you do is open Ambroker with the XXX-PremiumData database and everything is there, no conversion

Re: [amibroker] Re: Position Opened When No Funds Available

2009-09-15 Thread Brenton Hill
Have you tried this: SetOption(UsePrevBarEquityForPosSizing,True); Brandon_Ridenour wrote: I may have found a solution to this. When I manually set the sell/cover signal, I am now setting it to a value of '4', rather than '1'. When setting it this way, ActivateStopsImmediately seems to

Re: [amibroker] Re: Position Opened When No Funds Available

2009-09-16 Thread Brenton Hill
Brandon Did you try my suggestion, I'm curious if it would solve the problem without resorting to your so called hack solution. SetOption(UsePrevBarEquityForPosSizing,True); Brenton Brandon_Ridenour wrote: Yeah, ive had my share of curve fitting problems. I just thought I had

[amibroker] Remove all static variables

2009-09-21 Thread Brenton Hill
Hi Is there an easy way to remove all static variables at once? I know I can use *StaticVarRemove( ''variablename'' ) *but as far as I can see this require a call for each individual variable name. The static variables are named after the symbol and the DateTime() of the bar that I assigned

Re: [amibroker] Remove all static variables

2009-09-21 Thread Brenton Hill
This worked: StaticVarRemove(*); It needed the quotes *. Thanks Mark Jules for the replies. Brenton Mark Hike wrote: From version 5.25: StaticVarRemove(*) On Mon, Sep 21, 2009 at 10:57 PM, Brenton Hill bphill0...@yahoo.com.au mailto:bphill0...@yahoo.com.au wrote: Hi

Re: [amibroker] Re: Add addtocompiste generated ticker to a watchlist

2009-10-01 Thread Brenton Hill
TA You can just call CategoryAddSymbol() in the code that creates the composite, immedately after creating the composite: AddToComposite(yourarray,CompositeName,C,65); CategoryAddSymbol(CompositeName, *categoryWatchlist*, 61); Brenton ta wrote: Bruce, Thanks for your help. I did figure

Re: [amibroker] AmiBroker 5.29.0 BETA released

2009-10-12 Thread Brenton Hill
Hi Tomasz Is there a 64 bit version of the 5.29.0 BETA release? Regards Brenton Tomasz Janeczko wrote: Hello, AmiBroker 5.29.0 BETA released http://www.amibroker.com/devlog/2009/10/02/amibroker-5-29-0-beta-released/ Best regards, Tomasz Janeczko amibroker.com

Re: [amibroker] Fw: Filter = today in AFL

2009-10-22 Thread Brenton Hill
TodayIsDateNum = Now(3); LastBarsDateNum = DateNum(); Filter = TodayIsDateNum == LastBarsDateNum; h15...@yahoo.com wrote: Can anybody answer my difficulties? Tq Sent from my BlackBerry® smartphone from Sinyal Bagus XL, Nyambung Teruuusss...! -Original Message- From:

Re: [amibroker] Slope of a line...

2009-10-30 Thread Brenton Hill
Amibroker has a function LinRegSlope() which does it. droskill wrote: I'm trying to duplicate the slope function in Excel. Excel calculates it like this: Returns the slope of the linear regression line through data points in known_y's and known_x's. The slope is the vertical distance

Re: [amibroker] Problem with nBar trailing stop

2009-11-02 Thread Brenton Hill
Jeff try this ApplyStop(stopTypeNBar,stopModeBars, 15 ); Brenton jeffarcherjr wrote: Hi Everyone: I'm having a problem implementing (or more likely understanding) an nBar stop. I want to enter a trade and always exit fifteen days later. I think the following code should do this:

Re: [amibroker] JAVA SCRIPT SIMPLE QUESTIONS

2009-11-22 Thread Brenton Hill
Hi Bistrader If you're using AutoIT anyway, you can skip using Java Script altogether and just control Amibroker direct from AutoIT. In AutoIT use: $AB = ObjCreate(broker.application) $AA = $AB.Analysis $AB.LoadDatabase(C:\\Amibroker\\FastTrack) etc Not sure about your Question 2, sorry.

Re: [amibroker] Re: Question on Custom BackTest process

2010-04-01 Thread Brenton Hill
Ronen Read the link you posted properly, it explains it clearly. In the next line we have if statement that enters custom backtest formula if the analysis engine is in actionPortfolio (2nd phase of portfolio backtest) stage. This is important as formula is executed in both scanning phase

Re: [amibroker] globally declare frequently-used variables

2010-04-05 Thread Brenton Hill
Eski Put your frequently-used variable declarations into an include file (eg call it frequently-used variables.afl). Look up #include in the user guide to see how. Then call the single line #includefrequently-used variables.afl at the top of each afl file. Brenton Eski Movsinuit wrote:

Re: [amibroker] Re: Portfolio backtests are not valid?

2010-06-05 Thread Brenton Hill
Keith said: I want to score the Setups and not the Trades. I have a method I use to do just this. For example: Lets say you have a system that buys at limit on the day after some setup criteria have been met. The system gives a lot of setups on a given day (for example 12 setups), but you

Re: [amibroker] Run .js file from Windows Task Scheduler - Possible?

2010-06-06 Thread Brenton Hill
I do this using AutoIT instead of Jscript. (http://www.autoitscript.com/autoit3/index.shtml) It has a command Shell ExecuteWait which makes it waits until the action has completed before starting the next action. It can also be used to control Amibroker directly using AmiBroker's OLE

Re: [amibroker] Can positionsize be different for Buy and Short?

2010-06-09 Thread Brenton Hill
You can use an IIf statement PositionSize = IIf(Buy,LongPositionSize,ShortPositionSize); or use it inside a SetPositionSize() call as follows: SetPositionSize(IIf(Buy,LongPositionSize,ShortPositionSize),spsValue) Brenton David wrote: I have a long/short strategy. I calculate

Re: [amibroker] Round function

2010-06-13 Thread Brenton Hill
Round(YourNumber*100)/100; To round up to nearest cent use Ceil(YourNumber*100)/100; or to round down to nearest cent use Floor(YourNumber*100)/100; ang_60 wrote: Hi everybody, I'm trying the list because, most surely, I'm not the first to face this need: I'd like to round a number to the

Re: [amibroker] How to Get FROM and TO Dates From AA Window

2010-08-09 Thread Brenton Hill
Look up the Status function in the user guide status(rangetodate) notanaiqgenius wrote: I have browsed the help guide but can't find a function to get the From and To dates that are currently set in the Automatic Analysis Window. Does anyone know a way to get these with code? (I want

Re: [amibroker] Re: Open Interest Field

2010-09-01 Thread Brenton Hill
TA If you're trying to import into the open interest field of an existing security, it is not possible, even using $HYBRID 1, I've tried it, and corresponded with Amibroker support about it, I have copied the reply from Marcin below. Regards Brenton Hello, You should import all the data