When I run this code in a backtest I see the exits issues under the TRADES tab - they are easily identifiable as each exit has a comment.
However, running in the strategy montior, only new entries are showing up in strategy alerts and the orders window. What have I done wronge?
CODE:
Please log in to see this code.
Thanks
Size:
Color:
Whatever went wrong, I think its cause is outside of this code block.
Size:
Color:
QUOTE:
running in the strategy montior, only new entries are showing up in strategy alerts and the orders window. What have I done wronge?
What do you expect to see in Alerts and Orders? "Alerts" in any window are only displayed if they occur for the most-recent bar.
Size:
Color:
I expected to see:
date symbol Account Action Qty Order type Price Strategy Data Range Scale Position Size Signal name
12/5/2012 902_HK PaperAccount3 Sell xxxxxx Stop xxxxx {name} {set} xx Bars Daily Percent Volatility Long Trail Stop: xx is x times
*date is almost always out off by one day* ATR lower than high of xx
However, they're back. The odd bit is, the exit alerts hadn't shown up for a couple of weeks and I was depending on my external code.
I had "Disable Portfolio Synch" previously unticked. I ticked it on and ran the strategy and exit alerts showed up in the alert window, but only new orders showed in the orders window. I went back and unticked the option and now new orders and exit orders are making it through to the orders window.
Size:
Color:
You said, "only new entries are showing up". If this is the description of the problem, then I don't understand what the problem is. Therefore, I was actually asking if you expected to see Alerts from previous bars/days, which is not the way it works.
Re: Disable Portfolio Synch
Enabling Portfolio Synch will prevent WLP from exiting a Position that you do not own, so this will indeed filter exit alerts from reaching the Orders tool; but that setting does not affect alert themselves, which should still appear in the Alerts pane.
QUOTE:
I ticked it on and ran the strategy and exit alerts showed up in the alert window, but only new orders showed in the orders window. I went back and unticked the option and now new orders and exit orders are making it through to the orders window.
By "new orders" I now understand this to mean "entry orders". So, if this is the case, I think you've successfully verified that the Portfolio Synch function is working correctly. If in doubt, see User Guide: Preferences > Trading > Trading Options > Disable Portfolio Synch. Also Orders > Portfolio Synch.
Size:
Color: