PureBytes Links
Trading Reference Links
|
Hi,
I am trying to implement some sort of "set" that include the traded
months of a futures contract. For example soybeans trade months
1,3,5,7,8,9,11. I then want to be able to identifiy what months in
this list that will be traded (like 3,7,11). And then be able to set
the backtester to trade that contract from date 3-1 to 6-30 if
contract month 7, 7-1 to 10-31 if cotract month 11, 11-1 to 2-28 if
contract month 3.
I was looking for an easier way to implement this so that I can check
if the current symbol is in the traded month list. I also need to be
able to know what would have been the previous traded month. I
started trying to implement this with strings and using the strfind,
strextract, strleft, strmid, etc. but thought that there must be an
easier way.
I next thought I should try to create my own array that held this
information and then use array processing formulas like iif() and
ref(). But again I thought that there must be an easier way to
initialize the array. I can do this:
ContractMonths[0] = 1;
ContractMonths[1] = 3;
....;
but again thought that there might be a way to do this as one step like:
ContractMonths = [1,3,5,7,8,9,11];
Any thoughts on being able to create and use arrays that have nothing
to do with the price arrays? Has anyone implement something similar
that can point me in the right direction?
Thank you,
Marty
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~->
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|