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

[EquisMetaStock Group] Re: Postion Sizing: fixed amount



PureBytes Links

Trading Reference Links

Well, a first thought might be that you count your long entries.
Let's say you have a simple breakout system, like for e.g. going long
on a 20-day high, then exiting on a 10-day low.

You could write something like this in the entry section:

buy:=H=HHV(H,20);
sell:=L=LLV(L,10);
a:=Cum(buy);
b:=ValueWhen(1,sell,a);
trades:=a-b;
long:=roc(trades,1,$)>0 and trades<=4;
long

Then in the exit section you could write:

buy:=H=HHV(H,20);
sell:=L=LLV(L,10);
a:=Cum(buy);
b:=ValueWhen(1,sell,a);
trades:=a-b;
long:=ROC(trades,1,$)>0 and trades<=4;
state:=If(BarsSince(long)>BarsSince(sell),1,0);
state>Ref(state,-1)

Now, in the position sizing, you could simply choose % of available
capital and then enter the function:

buy:=H=HHV(H,20);sell:=L=LLV(L,10);a:=Cum(buy);b:=ValueWhen(1,sell,a);trades:=a-b;if(trades=1,25,if(trades=2,100/3,if(trades=3,50,100)))

By creating an expert advisor, I got the correct 4 buy signals
(whenever they occured). Also, I've checked the position sizing
function and I think it's correct. BUT, I couldn't have my system
tester work correctly! I don't prefer using ms's system tester, so
guess other guys here may help you a lot more.

Regards,

mc
--- In equismetastock@xxxxxxxxxxxxxxx, "dasein_10"
<daniele_delmonte@xxx> wrote:
>
> I have tried yet but it doesn't work: becouse every time meta take 
> the avaible equity, so in the second position the amount is 0.75 
> (equity avaible)*0.25=18.75% the third time is 14% and the last 
> 10,05% for a total of 74%.
> Have someone other idea?
> 
> 
> --- In equismetastock@xxxxxxxxxxxxxxx, Pete Lieber <plieber@> 
> wrote:
> >
> > 
> > Open your system in System Editor
> > Click the "General" tab at top
> > Make sure the "Position Limit" box is checked and enter "4" in the 
> box to the right of text "Limit number of simultaneous positions to"
> > Next click on "Buy Order" tab at top
> > In the drop-down box next to "Entry Size" select "% of available 
> equity"
> > In the next box to the right type in ".25"
> > Go to "Sell Short Order" tab and repeat the previous two steps
> > 
> > 
> > To: equismetastock@xxxxxxxxxxxxxxx
> > From: daniele_delmonte@
> > Date: Mon, 9 Feb 2009 10:04:25 +0000
> > Subject: [EquisMetaStock Group] Postion Sizing: fixed amount
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >     
> >             Hi, I don't know how create this position sizing: when 
> I have the buy 
> > 
> > signal, I entry the position with 1/4 of equity, and add a 1/4 
> every 
> > 
> > time I have a buy.
> > 
> > Four progressive entries of  0.25% of equity each one.
> > 
> > It's possible?
> > 
> > Where I can find some material of Meta code on position sizing?
> > 
> > 
> > 
> > Thanks
> > 
> > 
> > 
> > Daniele
> >
>




------------------------------------

Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

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

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