Positions after WLP restarts the strategy
Author: kazuna
Creation Date: 5/8/2009 3:21 PM
profile picture


This morning WLP didn't work very well and it kept getting disconnection from Fidelity streaming server and so I had to restart WLP. Although my strategy didn't have any position at that time, I got one question which I belive it was not mentioned particulaly in the document.

Suppose my strategy filled buy positions and then I had to close WLP (e.g. crash). What if WLP restarts and the strategy is reactivated, the sell alerts will fill the sell order in the posistions in the account which were filled in the previous strategy execution? Since WLP is position based, I guess WLP can figure it out.
profile picture


1. WLP5 Strategies run in theoretical mode. They have no idea whether or not you have positions in your account.

2. If WLP isn't connected and running at the time it's time to exit, you won't get an exit Alert.

3. Later, when you restart and connect, you can see where the theoretical Strategy exited the Position, and then you must manage it manually. Use the Trade Ticket to exit if you want to.
profile picture


I think I didn't explain my question very well.
Here is an example of my question.

At 9:30, a strategy is started.
At 10:00, it gets an enter alert and a position is established.
At 12:00, WLP crashes and the strategy is restarted.
At 13:00, it gets an exit alert and my question is if the position established at 10:00 will be closed?

WLP runs in theoretical mode, so it should know that there was a time to enter. But when WLP gets the time to exit after WLP restarts, will I get an alert and the order will be filled?
profile picture


In that case, of course. As long as you initialize the data properly such that a Position is created again at 10:00, then the exit will occur. If it's running at the time of the exit, then you'll get the Alert for it.

Please log in to see this code.
Maybe. It depends on the order and the backend trading system. Wealth-Lab can only sent the order, it can't guarantee that it gets filled.
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).