[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Variable Position size and Referrencing Tickers



PureBytes Links

Trading Reference Links


Yes. Those tickers are copied exactly from the watch list and pasted 
into the AFL. Still no results. Strange.

-Eric.

--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx> 
wrote:
> Hello,
> 
> The code itself is OK - if only you have tickers 
like "Growth1", "SectorRotation1".
> Do you really have such tickers in your database (is 
upper/lowercase correct) ???
> Because if you don't then position size would be set by your code 
to value of ZERO (no trade).
> 
> The other reason is that you may have incorrect settings.
> For example you may be applying your backtest to last 1 bar (check 
the RANGE setting).
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message ----- 
> From: "ericleake" <eleake@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Thursday, December 30, 2004 9:30 PM
> Subject: [amibroker] Re: Variable Position size and Referrencing 
Tickers
> 
> 
> > 
> > 
> > Tomasz or others:
> > 
> > Ok, so what is wrong with this code? I have put the three 
tickers 
> > into a watch list, and selected the watch list as the filter, 
but 
> > not getting any trades. I do however get trades when selecting 
> > another watch list.
> > 
> > 
> > SetOption("InitialEquity", 100000 );
> > SetOption("MaxOpenPositions", 3 );
> > SetTradeDelays(0,0,0,0);
> > 
> > 
> > n = Name();
> > PositionSize= IIf( n == "Growth1", -33,
> > IIf( n == "SectorRotation1", -33,
> > IIf( n == "phydx", -33,
> > -0) ) );
> > 
> > Buy=1;
> > Sell=0;
> > Filter = 1;
> > AddColumn(Close,"Close", 4.2);
> > 
> > I've even tried commenting out the position sizing IIfs and 
stating 
> > a straight PositionSize=-33;, but still no trades with this 
watch 
> > list. The symbols are accurate.
> > 
> > 
> > -Eric.
> > 
> > 
> >> Hello,
> >> 
> >> You can nest IIFs as infinitely.
> >> 
> >> n = Name();
> >> PostitionSize = IIF( n == "MSFT", 1000,
> >>                       IIF( n == "INTC", 2000,
> >>                       IIF( n == "AAPL", 2500,
> >>                       IIF( n == "GOOG", 1500, 
> >>                             800 /* otherwise */
> >>                          ) ) ) );
> >> 
> >> Best regards,
> >> Tomasz Janeczko
> >> amibroker.com
> >> ----- Original Message ----- 
> >> From: "ericleake" <eleake@xxxx>
> >> To: <amibroker@xxxxxxxxxxxxxxx>
> >> Sent: Thursday, December 30, 2004 6:41 PM
> >> Subject: [amibroker] Re: Variable Position size and 
Referrencing 
> > Tickers
> >> 
> >> 
> >> > 
> >> > 
> >> > Graham-
> >> > Thanks for your response. Are we restricted to an IIf 
statement 
> > with 
> >> > only two alternatives, or can we add additional "if, else"? 
For 
> >> > example, four or five different tickers/position sizes?
> >> > 
> >> > If I had any clue how to give an attempt at the code, I 
would. 
> > But I 
> >> > simply don't.
> >> > 
> >> > -Eric.
> >> > 
> >> > \--- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> 
> > wrote:
> >> >> Don't know if it would actually work, but here is corrected 
line
> >> >> 
> >> >> PositionSize= IIf(name()=="MU", -.25, -50);
> >> >> 
> >> >> Cheers,
> >> >> Graham
> >> >> http://e-wire.net.au/~eb_kavan/
> >> >> 
> >> >> -----Original Message-----
> >> >> From: ericleake [mailto:eleake@x...] 
> >> >> Sent: Thursday, December 30, 2004 12:27 PM
> >> >> To: amibroker@xxxxxxxxxxxxxxx
> >> >> Subject: [amibroker] Variable Position size and Referrencing 
> >> > Tickers
> >> >> 
> >> >> 
> >> >> 
> >> >> A question for the group that I can't find the answer for 
> >> > elsewhere:
> >> >> 
> >> >> Is it possible to select various position sizes per ticker, 
> > rather 
> >> >> than equal position sizes? 
> >> >> 
> >> >> For example, something like:
> >> >> 
> >> >> PositionSize= IIf(Ticker==MU, -.25, -50);, or possibly with 
> > IIf, 
> >> >> Else?
> >> >> 
> >> >> My objective is to apply various position sizes to several 
> >> > different 
> >> >> system equity curves-an asset allocation of strategies, if 
you 
> >> > will.
> >> >> 
> >> >> Thanks.
> >> >> -Eric
> >> >> 
> >> >> 
> >> >> 
> >> >> 
> >> >> 
> >> >> 
> >> >> 
> >> >> Check AmiBroker web page at:
> >> >> http://www.amibroker.com/
> >> >> 
> >> >> Check group FAQ at:
> >> >> http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> >> >> Yahoo! Groups Links
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > Check AmiBroker web page at:
> >> > http://www.amibroker.com/
> >> > 
> >> > Check group FAQ at: 
> > http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> >> > Yahoo! Groups Links
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> >
> > 
> > 
> > 
> > 
> > 
> > 
> > Check AmiBroker web page at:
> > http://www.amibroker.com/
> > 
> > Check group FAQ at: 
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> > Yahoo! Groups Links
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/