I've started looking into using alerts as exits and I think I found a couple of bugs. If not bugs then really weird behaviour :)
I set up a fairly simple VWAP divergence strategy which goes short with a 1% stoploss, exits after 30 mins and for "other exit condition" I set 2minute wide range bar, 5 min WRB and 15 min WRB. When I run the backtest, I see several trades where the stoploss seems to have been totally ignored. I've got losses of -5.29%, and one of -1.24%. Normally the OM's exits are perfectly 1% (in fact if I search for "Moved -1." I only get one hit - all exits are exactly 1% away or more) and the -5.29% loss is totally out of range.
There are only two of these aberrations in 764 trials so I suppose that's something but where there are two there are probably more which are hidden. Can you look into this? It sure looks like a bug. If it's expected behaviour can someone explain it to me? (settings & more details below)
Next, when I set some alerts in the "Other Exit Condition", run the OddsMaker and then go back to pick different alerts or just check which ones I've selected, all of the exit alerts have been cleared. I saved the windows setup and went into the .TIL file and I see that the extra alerts are appearing in the StrategyConfig entry for the window so the settings are being retained somewhere, they just aren't being populated properly.
To test this out for yourself, here are my settings:
DataConfig=O=10000000000000000000000000000000000_18_0&QVDD=1&MaxDNbbo=0.1&MaxPUp5=0&MaxPrice=650&MinDV=6000000&MinPrice=15&MinRV=2&MinVWVP=0.08&MinVol10=100&WN=Fade+VWAP+divergence
StartegyConfig=PriceMoveDirection=0&MoveType=1&DollarsValue=0.01&PercentsValue=0.1&ProfitTarget=1&UseStopLoss=1&StopLoss=1&ExitConditionType=3&ExitConditionPercent=0.5&ExitConditionBars=0.5&ExitConditionAlert=Sh_WRB2%3DON%26Sh_WRB5%3DON%26Sh_WRB15%3DON%26X_NYSE%3DON%26X_AMEX%3DON%26XN%3DON%26XX%3DON%26EntireUniverse%3D1%26WN%3DMy%2520Alerts&EntryHoursStart=0&EntryMinutesStart=30&EntryHoursEnd=0&EntryMinutesEnd=0&ExitTimeType=0&ExitTimeMinutesAfter=30&ExitTimeMinutesBefore=0
If you save a dummy layout file and edit it by inserting these values overtop of some other and then re-load the layout, you should get my config. I think.
Here are the problematic lines from the OddsMaker debug output:
#2008-09-15_001 CBI, Entry time=2008-09-15 07:01:01, Entry price=22.70, Timeout price=24.16, Timeout time=2008-09-15 07:30:00, Exit alert price=23.90 found at 2008-09-15 07:05:00, Stop loss price=22.927 found before 2008-09-15 07:10:00, Reason for exit=exit alert, Exit price=23.90, Loser, Moved -5.29%
#2008-10-03_051 MDU, Entry time=2008-10-03 10:45:00, Entry price=27.50, Timeout price=27.96, Timeout time=2008-10-03 11:15:00, Exit alert price=27.84 found at 2008-10-03 10:50:00, Stop loss price=27.775 found before 2008-10-03 10:55:00, Reason for exit=exit alert, Exit price=27.84, Loser, Moved -1.24%
(times are Pacific time, EST-3)
Thanks