I'd like to program options trading in RE.
I have old UNIX prompt C programming experience (and
MacPascal) but none of this Object Oriented / .NET so I
could use a little help.
I traversed the 'Trading Systems available for download'
at RE website but didn't find any that handled Exchange
I need fragments of code which I can modify and insert
into my RE Trading System (where I handle the underlying
stock ticker). As the Trading System for each NewBar
iterates through each symbol (ticker) I would then call
appropriate procedures with their corresponding parameters
but the OO programming paradigm is tripping
me up. Even the terminology is confusing. That's why
I am looking for sample code.
Could someone show me some code examples to:
1. Retrieve the Delta, Open Interest and Bid & Offer for
an ATM Call option (nearest expiry)
for the current symbol. For example, if the stock
has just traded at 78.45 and has 50 cent strikes,
then the At-The-Money Call will be the 78.50 strike.
Actually don't worry too much about calculating the exact
strike price (I'll do that), just show me how to call
the function (with appropriate parameters) to
retrieve the Delta, OI and Bid & Ask prices.
2. Send a Limit Order to Buy (open a long position)
at price XXX for the Option in 1. If there is a
Time-In-Force parameter, make it Day-Only (Day order).
3. Check the status of the order - Filled? Pending? Rejected?
4. Send a Limit Order to Sell an option.
I assume all these code pieces could go inside
the "public override void NewBar()" procedure,
but if not, please clarify where. Also if one needs
to declare types / variables or allocate memory (new)
in the "public override void Startup()" section of code
please indicate that too.
Much Thanks in advance, Mark.