Topics
Replies
wefald
06 Aug 2019, 11:52
I may have an idea what caused the issue. I was briefly disconnected just after 9:00, while the bots were running, so that 9:00 would be the last time they saw before the disconnect.. It seems like the instances that were started before that disconnect display the mentioned notification error, but instances started later work fine.
I'll monitor and see if that hypothesis is confirmed, and if not, I'll screenshot, send code etc.
@wefald
wefald
06 Aug 2019, 11:38
I don't really know what to answer to that, but I'll fill in some more detail:
Two bot instances (of the same bot) returned notification windows with wrong times. One of them was on EURSEK, 5 minute candles, and it was triggered by the OnBar part of the code at 10:20 (using FLEStandardTime) and was meant to show 10:15 in the notification window, corresponding with the last finished candle (OpenTime.Last(1)), but it showed 9:00. The same thing (also showing 9:00) happened with another bot on a different symbol a bit earlier on, but I don't remember the details there.
After a restart, the same instance on the same symbol used the correct time the next time it made a notification window.
I'll keep an eye out for more wrong times.
@wefald
wefald
11 Jul 2019, 11:06
It worked. Thanks!
Is it also possible to make this pop-up make a sound of some kind? The "pop" sound of a rejected buy order is a big part of why I chose that solution.
A search for "messagebox" in the cBot API I have yielded zero results.
If sound is not doable, then do you have similar code for an email alert? I could have an alert sent to some account that i equipped with desktop notifications.
@wefald
wefald
11 Jul 2019, 10:43
Thanks for replying fast.
I don't have a name regarding who told me this, but someone did. Either from the FxPro support team or from Spotware, as I was learning how to program cBots.
(Since I was told I could not make a pop-up window at all, I think my solution is rather creative. But yeah, bottlenecking during busy times when trying to send a bunch of orders shouldn't come as a big surprise to anyone.)
I tried the code you just provided, but I got an error saying that the type or namespace name Forms does not exist in namespace System.Windows (Maybe you miss a "samlingsreferanse"?)
(The error message was in Norwegian, but the last word translates word for word to collection referance)
@wefald
wefald
12 Feb 2021, 15:19 ( Updated at: 12 Feb 2021, 15:28 )
RE:
PanagiotisCharalampous said:
Thanks for the quick reply. (:
@wefald