Writing to a internet logfile when executed
Author: dansmo
Creation Date: 2/1/2011 7:10 AM
profile picture

dansmo

#1
Hi,

I want to control when my strategies are executed and write to a logfile whenever the srategies are executed. How can this achieved?
profile picture

Eugene

#2
By manually adding a block of code to each of your strategies that appends a line to a log file.
profile picture

dansmo

#3
Does it work the same way if the file is on the internet? Is it that easy?
profile picture

Eugene

#4
As I see things, it would be easy to just drop the file to a local folder, and then:

1. Use a custom app to monitor file system changes in that folder. Hint: Use FileSystemWatcher to detect file changes

2. And then upload your changed file. Depending on where and how exactly you'd like to place that file "on the internet" (HTTP, FTP, Dropbox, Amazon S3... just to name a few), you'd need to figure out how to do it in C# or your favorite script language (PowerShell, AutoIt etc.)

Chances are, a script/utility might already exist for automatic uploading of changed files "to the internet".
profile picture

dansmo

#5
I am looking for a direct way where
a) there is no other software involved
b) the user does not notice anything.
profile picture

Eugene

#6
That's unrealistic.
profile picture

dansmo

#7
Hmmm...was I understand it WLD has a connection to the internet. So there should be a way to read/write directly from a script, shouldn´t it?
profile picture

Eugene

#8
Sure that's right. There also exists the possibility to use WL's built-in email notifications - which work for Alerts only i.e. not suitable when no alerts were triggered.

But it's pretty easy to notice (and remove) the watchdog code added to a strategy - unless it's compiled in a library and that library is safely obfuscated. If the user isn't tech savvy, still there are other, more subtle ways of "outing" like an added delay of strategy execution due to accessing an internet resource and/or an exception message popping up telling something like "destination host unreachable".

Anyway, the web upload solution is completely up to you.
profile picture

dansmo

#9
QUOTE:
that library is safely obfuscated


What do you mean by that?
profile picture

Eugene

#10
profile picture

dansmo

#11
OIC, so without doing this anyone could read my dlls, right?
profile picture

Eugene

#12
Think big: it's even possible to decompile an unobfuscated .NET assembly and have it served as a Visual Studio solution.
profile picture

dansmo

#13
Okay, so I really need to obfuscate then.
profile picture

dansmo

#14
I am a bit curious: how does Fidelity and MS123 protect their code/dlls?
profile picture

Eugene

#15
A good example of question that will stay unanswered.
profile picture

dansmo

#16
Because if I new that it would be much easier for me to read the code?
Just trying to understand obfuscating better.
profile picture

Eugene

#17
Because nobody in the industry would help make a hacker the first step by unveiling any details about their protection scheme(s).
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).