Max Percent Risk is not working as expected
Author: jimcrist
Creation Date: 1/17/2009 6:00 PM
profile picture


Max Percent Risk is not working as expected. I'm using a single stock for this test. 2 to 1 margin.

Equity = $100,000
Max Percent Risk = 0.3% (.003)
Entry Price = 17.85
RiskStopLevel = 16.422 (this is set before the BuyAtClose(Bar))

So, 300 divided by 1.428 = 210 shares, but WL5 comes up with 4400?!?
I'm using PrintDebug to output the entry price and RiskStopLevel, right after they're set.
What gives??? Thanks...
profile picture


We could probably say what's wrong there if you posted the code.
profile picture


Please log in to see this code.

Symbol = UKK
Equity = $100,000
Scale = 15 Minute
DateRange = All Data
Position Size = 0.3% risk
profile picture


A couple things that the Guides state:

1. It's completely and utterly impractical to use an AtClose signal in an intraday strategy, except for perhaps the end of day exit - and even then it's not a trade that can be accomplished in practice during regular market hours trading.

You intraday strategists have to keep this in mind:
The only difference between the Close of the current bar and the Open of the next bar is 1 trade.

2. BuyAtClose, like BuyAtMarket, uses the Close of the previous bar for the basis price. So, it's not comparing the 17.85 close of the current bar for the max risk sizing (that's impossible to do since the order has to be there at or before the Close), rather it's using the previous bar's close - 16.49, and there's the big difference.

Fix it:
Change BuyAtClose(Bar) to BuyAtMarket(Bar + 1) - the only practical way to do it, and you get the added benefit of a trading Alert and therefore the ability to auto trade the strategy.
profile picture


There's no BuyAtOpen in WLP5.1?!?
profile picture


Read: BuyAtMarket( bar+1 );
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).