Compare commits

..
6 Commits
9 changed files with 50 additions and 21 deletions

No files matched your search

+8
View File
@@ -1,3 +1,11 @@
1.1.8
- Enabled wild cards in risk management UI
- Fixed spreader order updates
1.1.7
- Fixed spread leg price fill
- Fixed HO cash per point value
1.1.6
- Fixed occasional crash when filtering fills
- Fixed several cash per point multipliers
+1 -1
View File
@@ -666,7 +666,7 @@ CppConfig
cpp_entry { key: "HIB" value: 1000 }
cpp_entry { key: "HIL" value: 1000 }
cpp_entry { key: "HJC" value: 1000 }
cpp_entry { key: "HO" value: 420 }
cpp_entry { key: "HO" value: 42000 }
cpp_entry { key: "HO2" value: 42000 }
cpp_entry { key: "HO4" value: 42000 }
cpp_entry { key: "HOA" value: 5 }
@@ -218,9 +218,14 @@ void ExecutionGateway::on_exe_report(
: api::orderman::MANUAL_ORDER_INDICATOR_YES;
str_to(msg.get<fix::OrderID>(), &data->exchange_order_id);
if (msg.has<fix::Price>())
data->price = securities::decode_exchange_price(
*sec, Price(msg.get<fix::Price>()));
if (msg.has<fix::Price>()) {
if (data->leg_security)
data->price = securities::decode_exchange_price(
*data->leg_security, Price(msg.get<fix::Price>()));
else
data->price = securities::decode_exchange_price(
*sec, Price(msg.get<fix::Price>()));
}
else
data->price = Price(os::nan());
@@ -21,14 +21,14 @@ public:
net_pos_new = net_pos + quantity.value();
else if(side == api::Side::SIDE_SELL)
net_pos_new = net_pos - quantity.value();
if (net_pos_new > long_pos_limit){
if (net_pos_new > long_pos_limit && side==api::Side::SIDE_BUY){
out_res.ok = false;
if (is_security_level)
out_res.error_msg = fmt::format("Security Long Position (Max {} Current {})", long_pos_limit, net_pos);
else
out_res.error_msg = fmt::format("Product Long Position (Max {} Current {})", long_pos_limit, net_pos);
}
else if (net_pos_new < short_pos_limit){
else if (net_pos_new < short_pos_limit && side==api::Side::SIDE_SELL){
out_res.ok = false;
if (is_security_level)
out_res.error_msg = fmt::format("Security Short Position (Max {} Current {})", short_pos_limit, net_pos);
@@ -588,6 +588,12 @@ void NativeOrder::on_exe_report(const NewExecutionReportEvent &er) {
auto &state = me->state;
auto &native_state = get_native_state(state);
if (er.data->leg_security) {
LOG(OrderMan, Diag,
"Ignoring leg execution report for order {}", key().value());
return;
}
if (native_state.last_msg_seq_num() > er.data->msg_seq_num) {
LOG(OrderMan, Warn,
"Ignoring already seen execution report {} in order {}",
+1 -1
View File
@@ -139,7 +139,7 @@ body {
.is-main-control-bar {
margin:2rem 3rem 0 0;
overflow: hidden;
text-align: center;
//text-align: center;
.button {
margin-left: 1em;
}
+2 -2
View File
@@ -24,8 +24,8 @@ let init (context:ServiceContext.ServiceContext) =
mdRelayExpNameData = Array.empty<ExpirationNameList>
scratch = emptyAccount
previousScratch = emptyAccount
AllValue = ""
AllValueDisplay = ""
AllValue = "*"
AllValueDisplay = "All"
OptionsMenuOpen = ""
ConfirmModal = "", (Msg.SelectTab General)
SelectedClipLimits = []
+21 -11
View File
@@ -69,10 +69,12 @@ let GetSymbolArray (model:Model) =
|> Array.distinct
let GetFilteredSymbolArray (model:Model) (remove:string []) =
Array.map<bts.api.Product, string> (fun a -> a.symbol ) model.mdRelayProductData
|> Array.filter (fun elm -> (not <| Array.exists (fun e -> elm = e) remove))
|> Array.distinct
let a = (Array.map<bts.api.Product, string> (fun a -> a.symbol ) model.mdRelayProductData
|> Array.filter (fun elm -> (not <| Array.exists (fun e -> elm = e) remove))
|> Array.distinct)
match a.Length with
| 0 -> a
| _ -> [ a; [|model.AllValueDisplay|] ] |> Array.concat
let limitFilter (positionLimit:AccountSecurityPositionLimitUnit option) (clipLimit:AccountSecurityClipLimitUnit option) allValueDisplay (array:'a []) =
match positionLimit, clipLimit with
@@ -193,7 +195,11 @@ let clipLimitsView model dispatch =
&& (elm.security.securityType = limit.security.securityType)
)
model.scratch.securityClipLimits.limit
|> Array.map (fun (elm:AccountSecurityClipLimitUnit) -> elm.security.securitySymbol)
|> Array.map (fun (elm:AccountSecurityClipLimitUnit) ->
match (elm.security.securitySymbol = model.AllValue) with
| true -> model.AllValueDisplay
| false -> elm.security.securitySymbol
)
@@ -223,7 +229,7 @@ let clipLimitsView model dispatch =
)
TableControl.Cell (Fields.enumSelect<string>
""
limit.security.securitySymbol
(match (limit.security.securitySymbol = model.AllValue) with | true -> model.AllValueDisplay | false -> limit.security.securitySymbol)
(GetFilteredSymbolArray model <| (getUsedSymbolNames limit))
[]
(fun value -> ((limit, (changeSymbol limit value)) |> ClipLimits |> dispatch))
@@ -262,7 +268,7 @@ let clipLimitsView model dispatch =
div [ ClassName "column is-size-7 has-text-grey-mid is-help-text"; ]
[str "Clip limits can be set for one security, for all securities in a product (by selecting \"All\" for securities), or for all products within a security type (by selecting \"All\" for both symbol and security)"]
]
TableControl.createDataTable (Some headerRow) rws (Button.button "Add" "" "plus" Button.Enabled addRow)
TableControl.createDataTable (Some headerRow) rws (Button.button "Add" "" "plus-circle" Button.Enabled addRow)
]
let productLimits model dispatch =
@@ -362,7 +368,11 @@ let productLimits model dispatch =
&& (elm.product.securityType = limit.product.securityType)
)
model.scratch.productPositionLimits
|> Array.map (fun (elm:AccountProductPositionLimitUnit) -> elm.product.securitySymbol)
|> Array.map (fun (elm:AccountProductPositionLimitUnit) ->
match (elm.product.securitySymbol = model.AllValue) with
| true -> model.AllValueDisplay
| false -> elm.product.securitySymbol
)
let rws:TableControl.row list =
@@ -390,7 +400,7 @@ let productLimits model dispatch =
)
TableControl.Cell (Fields.enumSelect<string>
""
limit.product.securitySymbol
(match (limit.product.securitySymbol = model.AllValue) with | true -> model.AllValueDisplay | false -> limit.product.securitySymbol)
(GetFilteredSymbolArray model (getUsedSymbolNames limit))
[]
(fun value -> ((limit, (changeSymbol limit value)) |> ProductLimits |> dispatch))
@@ -433,7 +443,7 @@ let productLimits model dispatch =
div [ ClassName "column is-size-7 has-text-grey-mid is-help-text" ]
[str "This limits the net position for a product (i.e. accumulated position over all securities belonging to a product). This can be set for one product, or for all products within a security type by selecting \"All\" for symbol"]
]
TableControl.createDataTable (Some headerRow) rws (Button.button "Add" "" "plus" Button.Enabled addRow)
TableControl.createDataTable (Some headerRow) rws (Button.button "Add" "" "plus-circle" Button.Enabled addRow)
br []
]
@@ -551,7 +561,7 @@ let securityLimitsView model dispatch =
div [ ClassName "column is-size-7 has-text-grey-mid is-help-text" ]
[str "Optionally, the net position for one or more securities can also be limited. For example, the Product Limits can be set to restrict the Max Net Long Position across all ES futures to 10,000 contracts, but Security Limits can be used to restrict the ES Jun future to 500 only"]
]
TableControl.createDataTable (Some headerRow) rws (Button.button "Add" "" "plus" Button.Enabled addRow)
TableControl.createDataTable (Some headerRow) rws (Button.button "Add" "" "plus-circle" Button.Enabled addRow)
]
let LimitsView model dispatch =
+1 -1
View File
@@ -11,7 +11,7 @@ $known_good = @{
"GE" = 2500
"HE" = 400
"HG" = 5000
"HO" = 420
"HO" = 42000
"LE" = 400
"M6E" = 125
"NG" = 100