Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strictier function signatures #23

Open
untoreh opened this issue May 16, 2023 · 0 comments
Open

strictier function signatures #23

untoreh opened this issue May 16, 2023 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@untoreh
Copy link
Collaborator

untoreh commented May 16, 2023

Basically all functions with arguments any combination of Strategy AssetInstance Order Trade etc... have "loose" signatures. Meaning for example that you could call them with arguments where the strategy refers to an exchange, and an asset refers to another...
They would have to be rewritten for example like:

function position!(
    s::IsolatedStrategy{Sim}, ai::MarginInstance, t::PositionTrade{P};
) where {P<:PositionSide}

to

function position!(
    s::Strategy{X,N,E,Isolated,C}, ai::AssetInstance{A,E,Isolated}, t::Trade{O,A,E,P};
) where {X,N,E<:ExchangeID,C,A<:AbstractAsset,O,P<:PositionSide}
@untoreh untoreh added the help wanted Extra attention is needed label May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant