Alerts appear to trigger earlier in realtime than
Author: jreality
Creation Date: 3/18/2009 6:46 PM
profile picture

jreality

#1
I've been trading a system that uses a 15-minute time scale. The system is a variation on RSI-agita, except it is for shorting. Further, for multiple positions, the price of the next buy must be a certain percentage higher than the previous buy, in addition to the RSI being above a certain level.

According to the Trades page, there was an alert generated today at 2:45pm EDT. I did take a trade today in response to an alert. However my records indicate that trades I executed (manually in response to the alert) at 2 different brokerages occurred after 2:30pm but NOT after 2:45pm. I would have gotten a better price at 2:45 compared to 2:30. It sure seems like the alert was generated 15 minutes earlier than the system claims it happened.

Same thing happened on 3/16, except that I can only verify the execution time with 1 broker instead of two. It appears I got a price that was as good as the next bar that time though.

I have no explanation as to why WealthLab appears to be generating the alerts earlier in realtime than reported on the Trades Tab, but it appears to be the case. Either something is different about the data in realtime or there is some other issue causing it to generate an alert 15 minutes earlier. I doubt it is something I'm doing coding-wise.

I am going to have my strategy send an email from now on, which will prove the alert was triggered 15 minutes too early. I will also try to do a screen capture of the chart at the time it generates the alert to see if the chart is different at the time when the alert is generated relative to examining it after the end of the day. Maybe I'll modify the regular RS-agita (which wasn't written by me) so that it too generates an email and run that one during the day as a test in addition to my strategy.

Any idea why I could be receiving alerts 15-minutes too early? I know it's hard to believe, but it appears to be true.
profile picture

Cone

#2
Well look, you've got all the data, the strategy/script, the symbols, brokerage records, and we have nothing to look at. I can only tell you that the Alert gets the timestamp of the close of the bar on which it occurred, and, bars are timestamped with the time at the close of the interval. Bars in ATPro charts are timestamped with the time at the start of the interval. That's a 15-minute difference for the same bar, but it doesn't explain why the trade time occurred before the bar ended!

If you're looking for an explanation from us, then post some data, starting with the script.
profile picture

jreality

#3
If I'm understanding you correctly, then this is simply an issue of WealthLab stamping the Trade Entry Dates based on the END of the bar in which the alert happened. (The same way WealthLab stamps the chart bars, as you've just pointed out)

In other words:

1) Today, an alert actually was generated immediately after the bar that ended at 2:30. (The closing price of the bar that ended at 2:30 is what actually triggered the alert.) The alert happened at 2:30, which is the start of the bar that ended at 2:45. It is the start of that bar in which I placed my trade. While, I don't have the Alert visible onscreen anymore, my brokerage records indicate I did place a trade right after 2:30, so that had to have been when the alert happened.

2) The confusion arose when reviewing the trade afterward. When WealthLab recorded the trade in the Trades tab, it said the entry was 2:45. I had assumed 2:45 to mean that the entry took place at 2:45. However, it would seem that my assumption was incorrect. The entry really did take place at 2:30, because when Wealthlab reports a trade having occurred, it stamps it based on the time of the END of the bar in which the alert occurred, even though the alert took place at the beginning of that same bar.

4) Not having understood the above, I was believing the trade took place 15 minutes earlier than stated on the Trades tab, since the trade was stated as having taken place at 2:45, but it did actually take place at 2:30.

5) I simply failed to understand the manner in which WL records the time of a trade. In WL, "2:45" in the Trades tab means "the trade happend on the bar that ended at 2:45. However since that bar BEGAN at 2:30, and since the Alert took place when the bar began, and not when it ended, the trade did indeed take place at 2:30.

In other words, I simply need to keep in mind that stamps are reported based on the end of the bar, even though the actual time of the alert is the beginning of the bar. Is that correct?
profile picture

Cone

#4
That's right.

You're initial description was confusing because you indicated that the "Alert" time was 2:45, which in reality was the time of the bar on which the trade occurred. So, the Alert bar was 2:30.
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).