Re: [amibroker] Re: Anybody would like to discuss their Profitable trading systems

2008-11-25 Thread Flávio Veloso
IMHO, buying on bottons and selling on tops is a much simple strategy for any trading system, YMMV. One may try to short on tops and cover on bottons, but everybody knows that short selling is a more risky strategy and thus should be used only by advanced traders. loveyourenemynow escreveu: >

Re: [amibroker] Parameter - Axis/Grid-Levels

2008-11-15 Thread Flávio Veloso
Hi. I think that he was referring to flexibe *levels*. Currently AB has only a finite set of levels, e.g. 0, 20/80, 30/70 etc. Yes it's possible to add arbitrary custom levels. Just right click the pane anc click "Edit formula". Then append the following lines to the formula: Plot(30, "",

Re: [amibroker] Re: UnKnown error msg: "Out of present range"

2008-11-14 Thread Flávio Veloso
Hi. I had this problem fixed just yesterday. The problem was triggered by the following line: PositionSize = (pct_equity * -1) * (BuyPrice / Stop); (As you can see, I use fixed percent risk model.) Notice that depending on the value of the Stop variable, the formula above can generate larg

[amibroker] ROC since some event

2008-11-05 Thread Flávio Veloso
Hi all. I'm trying to determine the rate-of-change of an array since some event occured. I intuitively tried "ROC(array, BarsSince(event))" buy AB says that argument #2 [of ROC()] has incorrect type. In fact, the help says that ROC expect an value as second parameter, but BarsSince() returns a

Re: [amibroker] Re: Round lot size based on position size

2008-10-31 Thread Flávio Veloso
transform the position size from a negative whole > value to a positive fraction before multiplying against the equity. > > http://www.amibroker.com/guide/a_custombacktest.html > > Mike > > --- In amibroker@yahoogroups.com, Flávio Veloso <[EMAIL PROTECTED]> wr

Re: [amibroker] Re: Round lot size based on position size

2008-10-31 Thread Flávio Veloso
ar++) { > for (sig = bo.GetFirstSignal(bar); sig; sig = > bo.GetNextSignal(bar)) { > if (sig.IsEntry() && sig.PosSize > 100) { > sig.PosSize = floor(sig.PosSize/100) * 100; > } > } > > bo.ProcessTradeSignals(bar); > } > > bo.PostProcess(); > } > &g

[amibroker] Round lot size based on position size

2008-10-30 Thread Flávio Veloso
Hi all. Is it possible to use different round lot sizes (e.g. by setting RoundLotSize variable) depending on the number of shares that are going to be bought/short? Basically all I want is RoundLotSize = 100 for any position size that results in more than 100 shares to be bought/short, and Rou

Re: [amibroker] Re: Dynamic trailing stop - ploting vs backtesting giving different values

2008-07-16 Thread Flávio Veloso
Null ); > > I do not believe there is applystop for this > stopline = IIf( InTrade, HighestSince( Ref(Buy,-budl), High - TS ), Null ); > > -- > Cheers > Graham Kav > AFL Writing Service > http://www.aflwriting.com <http://www.aflwriting.com> > > 2008/

Re: [amibroker] Re: Dynamic trailing stop - ploting vs backtesting giving different values

2008-07-15 Thread Flávio Veloso
to-plot-a-trailing-stop-in-the-price-chart/> > > Best regards, > Tomasz Janeczko > amibroker.com > - Original Message - > From: "Flávio Veloso" <[EMAIL PROTECTED] <mailto:flavso%40gmail.com>> > To: mailto:amibroker%40yahoogroups.com>> > S

[amibroker] Re: Dynamic trailing stop - ploting vs backtesting giving different values

2008-07-14 Thread Flávio Veloso
Hi all. Anybody cared to test this??? Is anyone trailing stops manually on the broker matchingApplyStop(stopModeTrailing...) behavior? If so, how are you doing it? I.e. how do you know the exact value to set your stops at? Flávio Veloso escreveu: > Hi all. > > I'm tryi

[amibroker] Dynamic trailing stop - ploting vs backtesting giving different values

2008-07-10 Thread Flávio Veloso
Hi all. I'm trying to plot the trailing stop used by the ApplyStop() function but had no success so far. Consider this simple system: -snip--- SetOption("InitialEquity", 10); BuyPrice = SellPrice = Open; SetTradeDelays(1, 1, 1, 1); Buy = Cross(Signal(),

[amibroker] Profits calculation in backtester report -- where's the error?

2008-05-19 Thread Flávio Veloso
Hello all. I'm trying to design my first system and stumbled upon a discrepancy on AB profits calculation on the backtester report that is driving me nuts. I searched Google, foruns, AB help files and could find an answer for this issue: is AB doing the math right? Is my math wrong? Or maybe t