Profile Picture

Equity options strategy

Posted By phg 8 Years Ago
Message
phg
Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)
Posted Sunday March 22 2009

I am working on a strategy that trades equity options. There are two things that have me stumped at the moment:
- Under NewBar I need access to Bid and Ask, whatever the most recent values are.
- How is a limit specified on a closeposition order?
Thanks.



-Pete

See also Yahoo group about applying RE.

Posted Sunday March 22 2009
The Bid and Ask properties of the most recent bar will be the most recent bid and ask values, if this data is available.  If the Bid/Ask isn't available these values will be zero, however.

To use a limit order to close a position, you could either set the profit target price to the desired limit price, or submit your own order with Position.SubmitOrder().

Thanks,
Daniel

phg
Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)
Posted Monday March 23 2009
Thanks! This worked: this.Bars.Current.Ask
I'll look into SubmitOrder.


-Pete

See also Yahoo group about applying RE.

phg
Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)
Posted Monday March 23 2009
On closer examination, unfortunately, I can't find a way to submit an equity option order. I think this is not a small problem; none of the 'objects' seem to have properties for things like expiry, right, strike and so forth, for example.

-Pete

See also Yahoo group about applying RE.

Posted Tuesday March 24 2009
Are we talking programatically? If so, you don't specify that information in the order itself, it's done at the symbol level.

phg (3/23/2009)
On closer examination, unfortunately, I can't find a way to submit an equity option order. I think this is not a small problem; none of the 'objects' seem to have properties for things like expiry, right, strike and so forth, for example.
phg
Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)
Posted Tuesday March 24 2009
What is the syntax for designation the symbol an order applies to? (Not necessarily the symbol implied by the current NewBar.)

I found it. It is a PositionSettings choice.

-Pete

See also Yahoo group about applying RE.


Edited: Tuesday March 24 2009 by phg
phg
Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)
Posted Tuesday March 24 2009

I'm trying to work with options. I need to index a Dictionary with the proper 'option symbol' to select a pre-determined trade price. But I can't extract what I need:

OutputMessage("New Bar: " + Symbol); // Prints "TBSI 042009 C @ $7.50"  <--- This is what I need.

//t=d[Symbol.Name]; // Can't index dictionary by Symbol. Symbol.Name prints just "TBSI". Symbol.Strike prints "7.50".

I can't figure out how to get the full specificaton without parsing the output message? How does OutputMessage obtain the full specification?



-Pete

See also Yahoo group about applying RE.

Posted Tuesday March 24 2009
ToString()

phg (3/24/2009)


I'm trying to work with options. I need to index a Dictionary with the proper 'option symbol' to select a pre-determined trade price. But I can't extract what I need:

OutputMessage("New Bar: " + Symbol); // Prints "TBSI 042009 C @ $7.50" <--- This is what I need.

//t=d[Symbol.Name]; // Can't index dictionary by Symbol. Symbol.Name prints just "TBSI". Symbol.Strike prints "7.50".

I can't figure out how to get the full specificaton without parsing the output message? How does OutputMessage obtain the full specification?
Posted Tuesday March 24 2009
I would probably use the symbol itself as the key into the dictionary, so it would just be t=d[Symbol].
phg
Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)Supreme Being (44,791 reputation)
Posted Tuesday March 24 2009
That doesn't work, but this does: this.Symbol. I don't know what the difference is?

I take it back. It does not work either:   t=d[symbol];
Error The best overloaded method match for 'System.Collections.Generic.Dictionary<string,item>.this[string]' has some invalid arguments 
Error Argument '1': cannot convert from 'RightEdge.Common.Symbol' to 'string' 

-Pete

See also Yahoo group about applying RE.


Edited: Tuesday March 24 2009 by phg


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems