PureBytes Links
Trading Reference Links
|
Attached is an .ela file and the same information in a .txt
format for those without TS4/TS2000.
I am intrigued by "bet size" algorithms and what they will do
to a system.
The attached function can be called by any system to provide
a "bet size" (number of contracts) for trading based on either
or both methods coded.
I hope that some of you folks take this and add to it so that
we may have a very general "bet size" function for inclusion
in systems.
Clyde Lee
ps -- hit the delete key if you get duplicates. I just want as
much participation in this subject as possible.
cl
{**********************************************************************
Function : Fib_Number_Contracts
Last Edit : 10/18/1999
Provided By : Clyde Lee (c) 1999
Notes: I wanted to try out an old casino betting scheme used
with roulette or anything else with nearly even odds
of win/loss on each bet. In addition I wanted to see
about a fixed percentage of equity and a standard
deviation calculation would yield -- and a combination.
The basis of the first method is the Fibonacci series.
Starting with a series of 0 1 1 we bet the sum of the
outside (first and last) two numbers 0+1=1.
If we lose we add the sum of the last two numbers in the
sequence so now we would have 0 1 1 2
and again bet the outside two numbers 0+2=2
If we lose we add this sum of the last two numbers in the
sequence so now we would have 0 1 1 2 3
and again bet the outside two numbers 0+3=3
However, if we win then we "mark off" the outside two
numbers and then bet the remaining outside numbers.
It is possible to end up with only one number and if
you do you just bet that. Given the 0 1 1 2 3
series and a win then the new series is 1 1 2 so we
bet 3 on the next round.
It is best to set a reasonable limit of maximum bet
size since on long runs of losses this adds up quickly.
If UseFibW is set to false and PercRisk is set to some
typical value (1,2,3,4..) then the number of contracts
to enter/bet is a function of Standard Deviation and
value of contract units.
If both UseFibW and PercRisk are specified, the total number
of contracts returned is the smaller of that computed using
percent risk or fib series.
If you want to know how much risk is involved just using the
fib series then put this in a system with one input parameter
being PercRisk. Optimize system using values from zero to
20, 30 or so in steps of 2. Look at the results. When the
original value at zero percent is matched at some higher
percent then you know the raw risk of the fib series method.
Have Fun
Clyde Lee
************************************************************************
**}
Input: UseFibW(truefalse), {Use fib type weighting for bet
}
PercRisk(numeric), {Percent of total value a/c to risk
per trade}
InitCash(numeric), {Initial cash in
}
MaxCont(numeric); {Maximum number of contracts to
trade }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Clyde Lee Chairman/CEO (Home of SwingMachine)
SYTECH Corporation email: <clydelee@xxxxxxx>
7910 Westglen, Suite 105 Work: (713) 783-9540
Houston, TX 77063 Fax: (713) 783-1092
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
To subscribe / unsubscribe from SwingMachine list
http://www.egroups.com/list/swingmachine/
After joining list the freeware SwingMachine program
(DOS Version) is available in the VAULT at:
http://www.egroups.com/list/swingmachine/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Attachment Converted: "c:\eudora\attach\clydelee.vcf"
Attachment Converted: "c:\eudora\attach\Fibnocon.txt"
Attachment Converted: "c:\eudora\attach\Fibnocon.ela"
|