Hi,
I don't know the last author.
Best regards
|_SECTION_BEGIN("ct1");
/*
Coin Toss model , it has nothing to do with Technical OR Fundamental
Analysis
It has nothing to do with entry or exit rules.
Here One books profits and losses at a predefined percent.
This Model was Inspired by many authors
---------------------------------------
a)Victor Sperandeo :- Methods of Wall Street Master
b)Nasim Taleb :- Fooled by Randomness
c)Ed Thorp :- #Beat the Market #Beat the Dealer
d)William Poundstone :- Fortune's Formula
thanks for AB codes and concepts by
a)Dimitris Tsokakis
b)Herman van den Bergen
c)Anthony Faragasso
d)Graham Kavanagh
and countless good souls.
Hearty thanks to
"Tomasz Janeczko" for AB Platform.
Disclaimer : any error in code or concept here belongs to me.
This Amibroker Script is for educational purposes only. I cannot
guarantee
it's accuracy nor take any responsibility for your use of it. Use at
your own
risk.
*/
SetOption("InitialEquity", 5000);
SetOption("CommissionMode", 2); //2 - $ per trade
SetOption("CommissionAmount", 1.35); // commission in BPS per leg
SetOption("MarginRequirement", 100);// no margin
SetOption("UsePrevBarEquityForPosSizing", 1);
SetOption("AllowSameBarExit",1); // Sq off Daily
SetOption("PriceBoundChecking",0);
SetTradeDelays( 0, 0, 0, 0 );
*RoundLotSize*=1; //Change this according to your needs [i did it for
Nifty].
posSizeX = Optimize("posSizeX", 1, 1, 10, 1);
winloss = Optimize("winloss", 50, 10, 50, 2); // Assumed probability of
winning, higher the better
winPercent = Optimize("winPercent", 1, 0.25, 10, 0.25); // higher the
better
lossPercent = winPercent/2; //Optimize("lossPercent", 0.5, 0.25, 10,
0.25); // lower the better
//iterations = Optimize("iterations",1,1,20,1); // to
test randomness at different levels, not used in any equation.
HitRatio = mtRandomA() < (winloss/100); //hit ratio
*PositionSize* = -(posSizeX); //exposure of capital
*Buy* = Day() != Ref(Day(), -1 ); // trade daily
*Sell* = *Buy*; // Sq off Daily
*Short*=*Cover*=0;
*BuyPrice*=100; // to make it generic from EURUSD to Hangseng to Bovespa
//if you win you get winPercent, if you loose you loose lossPercent
*SellPrice*=IIf(HitRatio,*BuyPrice**(1+(winPercent/100)),*BuyPrice**(1-(lossPercent/100)) );
Plot(Equity(),"Equity : " , 1,1);
RequestTimedRefresh(1);
SetChartBkGradientFill( ParamColor("BgTop",
*colorWhite*),ParamColor("BgBottom",*colorViolet*));
_SECTION_END();|
Le 07/07/2010 01:17, spacebass5000 a écrit :
wow, how did I miss this... i have read and reread this book many
times. thanks for the reminder!!!!!!!
--- In [email protected] <mailto:amibroker%40yahoogroups.com>,
"notanaiqgenius" <notanaiqgen...@...> wrote:
>
> If you happen to have Howard Bandy's book, Quantitative Trading
Systems, you can see page 91-92 for an example of random entries (but
not exits). (Sorry, I'm not going to post the code here out of respect
for Howard's work.)