it's like that already. the situation is, suppose the alert trigger is calculated as $25.05 and as the price move up to the trigger, tick trades moves from $25.04 to $25.06 would trigger then trades between $25.02 - $25.04 for a minute then trades $25.06-$25.07 causes another trigger and so on within a 5 min bar.
In any case, attached is my formula wizard code if anyone wants to play with it.
thanks guys, I'll integrate your codes and study the logic this weekend. I've read about similar questions related to backtesting and automated trading, and looks like a similar fix. Perhaps, using this fix in the new version of wizard? :-} You guys are awsome!!!
Thanks again. I'll code and let you know the results next week.
What is the variable for NewAlertTrigger? I have a ReferenceError. Attached is what I have so far, implementing both fixes for one test per bar and your one alert per bar. Are my statements put in the right place in the function main? Can you help me with this last step? I added var NewAlertTrigger = 0; is this the correct reference?
Thanks so much,
chris...
SPY alerts triggered multiple times today 4/15/03 at 10:28 to 10:29 on 15min chart. not working as expected. Can you see if I have the code in the right place?
It would appear that your code is working (as far as I can tell). I just loaded it up and received an Alert "Short Lower Low". I will continue to watch it for any signs of errors.
I modified some items in your code. The time stamps are used to determine is we are allowed an action (alert) or if we are allowed to test for a new alert.
You'll notice that I placed the TimeStamp test in the main() function to determine if we are allowed to test for a NEW ALERT.
I also placed the "record TimeStamp" line in each of the Alert functions (onaction1 and onaction2). This records out "alert Action" and prevents the main() loop from checking again until a new bar forms.
Thanks for all your help. Trying it out now and notice the current bar color is white/black while alert is triggered. I won't know about how the alerts work until regular trading hours. Can you check on that bar color bug?
done, market action slowing down after hours now, so may have to wait until tomorrow to see. Reloading all my charts. Whoops, sorry, loaded efs on qqq and bar is still white.
I rebooted and reloaded, and we'll need some more market action to make sure. As qqq hit 26.68 after hours, I see a white bar on the next tick $26.67. ... Man, this is a bugger.
Comment