Skip to content

Create limit order functionality #1

@silencesdscope

Description

@silencesdscope
  • process() should output whether the order is market or limit
  • if an order is a limit order it should be appended to openOrders list with the relevant variables
  • those variables being: postype, num units, target price, limit order date (there may be more)
  • before trades are initialised, you should iterate each openOrder and check if its target price is met (condition based on postype)
  • if the target is met, use the info from the current data row and the order to append it to openPositions
  • the code then continues and runs self.process()

This will lead to more conditionals inside the trade initialisation part of backtest() so you need to think of a cleaner way to do this than the above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions