Closing all Active Positions at the end of the day
Author: Shaaker
Creation Date: 10/23/2012 12:57 PM
profile picture

Shaaker

#1
The following strategy simply buys during the day and is supposed to close all the positions buy the end of the day. But in many situations it fails to do so and some positions remain open until many days later. Am I missing anything here?

CODE:
Please log in to see this code.
profile picture

Eugene

#2
Please start from reading the WealthScript Programming Guide, Programming Trading Strategies > Multi-Position Strategies > Some Guidelines for Managing Multiple Positions and "MP Strategy Template" below. Hope that helps.
profile picture

Shaaker

#3
Thanks, found the problem.
profile picture

Eugene

#4
Glad to have helped.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).