Bypassing Alert dialog box and writing directly to Event Log
Hi,
I normally use the Alert() function to pop up the Alert dialog which also happens to write to the Event Log. Is there a way to avoid popping up the Alert dialog box altogether and write directly to the Event Log window? This way I won't have to keep dismissing the Alert dialog all the time.
Regards.
Hi,
Before starting this thread I did try the Print() method, but it doesn't print to the "Event Log" window which I have docked to the main window and monitor it for any events. It would be very convenient to have a function other than Alert that would write to the event log directly. That way I would avoid having to close the alert box all the time.
NOTE: Print() method does print to a log file under the "Log Files" folder but not the Event Log window itself.
Regards.
You can add your own custom column. You will be able to set your own settings to it. It's the way, how to exclude the time.
How to add new column:
Open Event log -> click on event log ->than use hotbuttons(Ctrl+G) to open event log settings -> columns -> click on button "+"(Create custom column)-> in chapter script select new -> set your own setting to it.
Regards, Support PTMC.
Hi, AminderG!
We need more information to help you.
Please could you tell about your bussines case:
- for what case you need this (are you using table alerts or you are using indicators/strategies or you are coding something)?
- what are your goals (trading or information output)?
- what steps did you do (could you please describe your strategy/indicators that you use)?
Regards, Support PTMC.
In this instance, I have a generic indicator that sits on multiple charts for multiple securities which outputs alerts once certain conditions are met. I then use this information to look at charts in more detail which will assist me in trading. Due to display limitations, the Event Log window is a very small (horizontally) and long (vertically) column on the right hand side of the ProTrader application. I monitor the messages written to it by the Alert function. Since space is a premium, I would like to avoid adding information to it that I don't need. This includes timestamps.
Hope that helps.
Regards.
Hi AminderG!
Thank you for your answer.
We were thinking how to help you. In fact, we can not remove time from Event Log column Message for a few reasons:
- it's important information for pannel TSL -> logs
- it's important information in Algo Studio -> logs
If you need only one column - message and space is a premium you can hide all columns but message:
If you have any other questions or proposals we would be glad to answer to you.
Hello,
Thanks for getting back to me. Is there no way you can have a flag in the Print() function to not print the timestamp? Or somehow change the column properties to exclude the timestamp?
NOTE: The Alert() method doesn't print the timestamp, only the Print() method. But the Alert() method also puts up the dialog box, which I'm trying to avoid.
Currently, as you showed above, I have just the message column showing.
Regards.
Hello, AminderG!
We cannot change default column properties (as we said earlier). But we can propose to you to add your own custom column. If you need information how to use it:
- Please refer to C# language documentation for more information.
If you need direct example of custom column, please send to us Feature request.
Regards, Support PTMC.
Hello one more time, AminderG!
We are trying to do our best. Thats why we will try to remove timestamp from column - Message(Event log).
And we will fix lack of timestamp in function Alert()
As soon as we have more information - we will inform you.
Thank you for your patience.
Regards, Support PTMC.