kieran-mackle / AutoTrader

A Python-based development platform for automated trading systems - from backtesting to optimisation to livetrading.

Home Page:https://kieran-mackle.github.io/AutoTrader/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to properly close a position in a strategy

stophr opened this issue · comments

Hello, I really appreciate the effort that went into this project. I would like to know the proper way to close a position. For instance, my strategy's logic decides that its confused (getting mixed signals), as a result it needs to close all open positions till it gets a clear signal. How would one best go about this from within the strategy? I have a feeling its to create a market order in the opposite direction, but this leaves open stop & limit orders that need to be cleaned up. Just wondering if this is the correct path or if there is a better way. Thanks!