Skip to content

Commit

Permalink
Feature: support trading IndexOption by TradeStation (#8456)
Browse files Browse the repository at this point in the history
* feat: support IndexOption in TSBrokerageModel

* feat: add IndexOptionFee in TSFeeModel
  • Loading branch information
Romazes authored Dec 11, 2024
1 parent 7445f7e commit f1c50e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Common/Brokerages/TradeStationBrokerageModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public class TradeStationBrokerageModel : DefaultBrokerageModel
{
SecurityType.Equity,
SecurityType.Option,
SecurityType.Future
SecurityType.Future,
SecurityType.IndexOption
});

/// <summary>
Expand Down
7 changes: 7 additions & 0 deletions Common/Orders/Fees/TradeStationFeeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ public class TradeStationFeeModel : FeeModel
/// </summary>
private const decimal _equityOptionFee = 0.6m;

/// <summary>
/// Represents the fee associated with index options transactions (per contract).
/// </summary>
private const decimal _indexOptionFee = 1m;

/// <summary>
/// Represents the fee associated with futures transactions (per contract, per side).
/// </summary>
Expand Down Expand Up @@ -73,6 +78,8 @@ public override OrderFee GetOrderFee(OrderFeeParameters parameters)
{
case SecurityType.Option:
return new OrderFee(new CashAmount(CommissionPerTrade + parameters.Order.AbsoluteQuantity * _equityOptionFee, Currencies.USD));
case SecurityType.IndexOption:
return new OrderFee(new CashAmount(CommissionPerTrade + parameters.Order.AbsoluteQuantity * _indexOptionFee, Currencies.USD));
case SecurityType.Future:
return new OrderFee(new CashAmount(parameters.Order.AbsoluteQuantity * _futuresFee, Currencies.USD));
default:
Expand Down

0 comments on commit f1c50e4

Please sign in to comment.