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

RE: [amibroker] Position Size question



PureBytes Links

Trading Reference Links

Dave,

 

Your idea was interesting so I charted it. What is the concept here? I
looked at well over 100 stocks and the limit of -10 is 99.9% dominate.
It only creates a smaller position when there is extreme volatility,
which happens more easily with very low priced stocks.

 

Code to make the chart below. I inversed the plots for readability.

//Test of VanTharp PositionSize

SetChartOptions(1, chartShowDates);

 

Size = -2*BuyPrice/(2*ATR(10));

PositionSize = Max(Size,-10);

 

Plot(C,Name(),1,64);

Vmax = 2 * LastValue(Highest(V));

Vmin = -LastValue(Highest(V)) / 2;

Plot(V,"Volume",colorBlack,styleNoLine|styleDots|styleOwnScale,Vmin,Vmax
);

Plot(V,"Volume",colorBlack,styleHistogram|styleOwnScale,Vmin,Vmax);

Plot(-PositionSize,"PositionSize",colorBlue,styleHistogram|styleLeftAxis
Scale);

Plot(-Size,"Size",colorRed,styleHistogram|styleThick|styleLeftAxisScale)
;

 



--

Terry

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of david
Sent: Sunday, July 09, 2006 07:42
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Position Size question

 

OK, I think I was looking at another Varp example first which put me in
a spin, in the user guide (Back-testing your trading ideas), the other
example within "Portfolio-level Backtesting" allows me to compare apples
with apples so to speak, this looks right . 

 

PositionSize = Max(-2*BuyPrice/(2*ATR(10)),-10);

 

Regards

 

Dave

 

 

 

  _____  

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of david
Sent: Sunday, 9 July 2006 9:28 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Position Size question

 

 

Hello, I was wondering how to use Tharp's ATR position sizing (example
in users guide), but limit the position size to a "maximum" of 10% of
trading capital ?

 

Many thanks

 

Regards

 

Dave