Thursday, August 4, 2011

New Look at R Multiples and Partial Profit Taking

This post will require a familiarity with R Multiples (Van Tharp's idea). I did a study on partial profit taking as my timeframe changed from intraday to swing trading. I know that Van Tharp doesn't believe in partialling out of trades, but there are psychological benefits in my opinion. My swing trading exit strategy is to partial out 75% of my position at 1.5R and let the rest go to at least 4R. When you are only holding 25% of your original position, you have the freedom to let it ride and feel less temptation to exit early. Holding overnight becomes less harrowing when you are only holding 25%.

To use this spreadsheet, you should have an idea of the probability of your first and second targets getting hit. If you don't have data, you can guesstimate or paper trade until you have enough data to determine how accurate your entries are.

https://spreadsheets.google.com/spreadsheet/ccc?key=0AicC1UrMfnSqdFhlMTVaYVpmWkJHTlg3RjIxNjg3VXc&hl=en_US

Friday, May 13, 2011

XLF - descending triangle


I can't think of many reasons to be long here. XLF is setting up a descending triangle, there is the H&S setup in XLE, the dollar is getting a dead cat bounce or maybe more, the "sell in May" effect, end of QE2 approaching... It's very difficult for markets to rally without financials participating.

Friday, April 22, 2011

Volatility Based Position Sizing and Choppiness Index easy language code

I don't really pay much attention to this little blog anymore but I've noticed looking at the stats that two of my most popular posts deal with volatility based position sizing and Bill Dreiss's choppiness index. So in the spirit of open source, I'm releasing my code here. Hopefully it is helpful to someone out there.


Inputs: InvestmentCapital (70000),
PercentRisk(.2),
MaxPercentAllocation(50),
StopFactor(.025), {volatility based stop}
ProfitFactor(3);

Variables: DollarRisk(0), NumShares(0), Vx(0), timeofentry(0);
Variables: HMax(0), LMax(0), Period(14), Choppiness(0);

DollarRisk = InvestmentCapital*PercentRisk/100;
Vx = SquareRoot(AvgTrueRange(50));

NumShares = DollarRisk/(Close[0]*Vx*StopFactor);
SetStopShare;
SetStopLoss(Close[0]*Vx*StopFactor);
If ProfitFactor > 0 then Begin
SetStopShare;
SetProfitTarget(AbsValue(Close[0]*Vx*StopFactor*ProfitFactor));
End;

If NumShares*Close[0] > MaxPercentAllocation/100*InvestmentCapital then Begin
NumShares = 0;
End;

NumShares = Round(NumShares, 0);

HMax = MaxList(Highest(Close[1], Period));
LMax = MinList(Lowest(Close[1], Period));
If Hmax = Lmax then Hmax=Hmax+.00001;
Choppiness = 100.0 * Log(Summation(TrueRange,Period)/(HMax -LMax)) / Log(Period);