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

[amibroker] How to programm position sizing



PureBytes Links

Trading Reference Links

Good morning,

could anyone help me with my basic system?
Buy on crossing 5 and 20 days EMA - buy only for 60% of equity. Stop
Loss counted from average volatility during past 4 days. 
After my profit get over my initial risk (difference between buy and
SL), buy for another 30% of equity. After my profit get over 2x
initial risk, buy the last 10% of equity.
Exits are done by trailing stop - counted from average volatility
during past 4 days.
I have done this:

PositionSize = -60;
Buy = Cross(EMA(Close,5),EMA(Close,20));
Vol = (Sum(High-Low,4)/4)/Close*100;
ApplyStop(stopTypeTrailing, stopModePercent, Vol,1, False, 0 );
Sell = 0; 

Really don't know how to continue :-( Thanks for any help..
MArtin.




Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.27/517 - Release Date: 11/3/2006