logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ksrt  
#1 Posted : Wednesday, April 22, 2009 11:29:26 PM(UTC)
ksrt

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/16/2009(UTC)
Posts: 11
Location: Sydney

Hi

Not sure if I am going up the wrong path or whether this is possible but from the testing I have been completing I am seeing my loosing trades loose more money than I would like.

The trades are stopping out as required (using a 2*ATR stop) but the problem is the size of the trades are much greater than I would trade & they therefore loose more of my capital than I would like. Ie it is entering trades at 50k instead of 10k which means I am loosing 5 times my capital than I’d like.

Even when I am putting in a .15 as the % of capital – it still enters into larger trades.. This may solve part of my problem but I still don’t think that will enter the trade according to my rules.

This leads me to ask, can the EST handle position sizing? I would like it to something like this:

(sorry if the language/structure is not correct but I wanted to understand if this was possible before I attempt to create it & I am still learning the correct formats)

{Adjust Position size to reflect trades that would be taken}

PurchasePrice:= currentSimulationage {Purchase price when trade is initiated}

MaxRisked:= currentcapital*2% {available capital taken x by risk tolerance}

MaxPositionSize:= currentcapital*15% {available capital x by position size %}

InitialStop:= currentsimulationage-(currentsimulationATR*2) {Purchase price - (2 x current ATR)}

PositionSize1:= maxrisked/(purchaseprice-initialstop) {Calculate qty of shares to purchase}

PositionValue1:= positionsize1*purchaseprice {determine value of trade to determine if it meets requirements}

PositionSize2:= MaxPositionSize/PurchasePrice {Alternative Calculation of qty of shares to purchase}

PositionValue2:= PositionSize2*PurchasePrice {Alternative Value of trade if Position1 is not acceptable}

QtyPurchased:= if(PositionValue1<MaxPositionSize,(PositionSize1),(PositionSize2) {formula to determine which amount of shares to purchase for the trade}

{Entry Qty}

QtyPurchased

If you can let me know if something like this is possible or an alternative that would be great.

Thanks

Ksrt

wabbit  
#2 Posted : Wednesday, April 22, 2009 11:44:24 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Something like?

Code:

risk:=0.02;
atrPeriods:=10;

lots1:=(simulation.accountcash * risk) / (2*ATR(atrPeriods));
lots2:=simulation.accountcash / close;

int(min(lots1,lots2));



wabbit [:D]


ksrt  
#3 Posted : Thursday, April 23, 2009 12:06:36 AM(UTC)
ksrt

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/16/2009(UTC)
Posts: 11
Location: Sydney

I am not at home so unfortunately cant test..

That is seems close but there are times when the minimum would not be taken because the higher qty may fit as it may fit into my rules.

that is why I need to compare both qty's to my risk tolerance and the max position size as if the higher qty fits into this it should be taken over the minimum.. .

wabbit  
#4 Posted : Thursday, April 23, 2009 2:41:37 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
You cannot afford the max value... hence the second rule.

If the ATR was really small then the number of shares which could be purchased would be very large. Purchasing this number of shares would exceed the available capital, so you could only spend 100% of the capital to buy a smaller parcel.


wabbit [:D]

Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.