hi,
i want to close a position at Nth day, i need to be able to track what date the position is first entered.
please help if you know how to do this.
thank you very much,
jude
hi,
i want to close a position at Nth day, i need to be able to track what date the position is first entered.
please help if you know how to do this.
thank you very much,
jude
if the server hosting the script resets (which happens often in live trading) you'll lose your information. You can't use the context as long term storage
Hi, James.
Do you know a good approach to track entry date and other information of positions? what's the boilerplate mechanism?
the boilerplate is to do the painful task of calculating when you would have entered a position.
There might be api functions to retrieve that information from the broker but I don't remember seeing it.
This is why most algos use buy and sell signals that operate regardless of what your current position is