PrintDebug during Paper Trading not working? (Strategy Monitor)
Author: 911C4S_991
Creation Date: 11/21/2019 4:59 AM
profile picture

911C4S_991

#1
I'm making the gradual transition from backtesting to now paper trading before live trading. I've just started paper trading but I've noticed my trades not being placed as expected according to my algorithm. To debug this I'm attempting to use the PrintDebug messages I have peppered throughout my code. However, the Debug and Error Messages window is not reflecting any of my messages (at all).

Am I missing something obvious to have my debug print statements appear during paper trading?
profile picture

Eugene

#2
Paper trading doesn't have to do with it. You're using it in Strategy Monitor, right? PrintDebug and cosmetic chart methods (drawing, accessing ChartPanes etc) intentionally do not work in the SM.
profile picture

Eugene

#3
Erik, what program version and build are you using?
profile picture

911C4S_991

#4
Maybe I should ask for more general advice - is there any way to create a log or instrument a strategy so I can monitor its operation throughout the trading day? I've looked at other questions on this forum and the WLP documentation and don't see other methods to do this yet.

Thank you!
profile picture

911C4S_991

#5
Hey Eugene - I'm using v6.9.21.15 64-bit...

Thanks!
profile picture

Eugene

#6
So I assume you are using SM, right? Couldn't derive it from your question nor from the answer. ;)

QUOTE:
is there any way to create a log or instrument a strategy so I can monitor its operation throughout the trading day?

Applicable to Strategy Monitor or Strategy window?
profile picture

911C4S_991

#7
Applicable to the Strategy Monitor (I think), which is how I'm having my strategy be executed in 'real-time' during the trading day? My apologies for the newbie question, I'm been using WLP for over a year now but am just now beginning to explore having a strategy run during the trading day rather than in backtesting on old dataseries.

Thanks again, much appreciated!
profile picture

Eugene

#8
QUOTE:
Applicable to the Strategy Monitor (I think)

The SM has a convenient built-in logging facility on a per strategy basis. Please refer to the WL User Guide > Strategy Monitor > Strategy Pane > Strategies Right-Click Menu > Enable/Disable/View Logging.

You're welcome!

P.S. I'm marking the topic's title with "Strategy Monitor" because it's the key in the context of this topic.
profile picture

911C4S_991

#9
Quick update; I'm not sure if the SM 'Enable/Disable/View Logging' will provide the level of detail I'm looking for. It is useful, but I'd like more granularity in my own comments instrumented in my strategies during real-time execution. After doing some more searching here I found an old post referring to 'log4net' which is part of .NET and built into Wealth-Lab Pro now. Nice!

A few quick questions as I continue to self-educate and learn how to use this with respect to Wealth-Lab Pro:

1) I found the 'AssemblyInfo.cs' file for Wealth-Lab Pro at:

c:\users\<me>\source\repos\EKWealthLabClassLibrary20180307\EKWealthLabClassLibrary20180307\Properties\

I'm assuming for now this is the proper one to add the [assembly] line to for log4net functionality? If not is there another one I should use?

2) Is there an existing app.config (or similar) for WLP I should use or is it better to create my own and explicitly point to it? Just looking for best-practices here but I'm happy to poke around and find what works too... (including info / questions for others' benefit too)

3) What is the current version of log4net included w/ WLP? I've yet to get to the point of running any logging so it may include the current version in the log, I'm just not sure at this point.

4) Lastly, I found the old reference here to log4net almost by mistake; when I tried to search on log4net it didn't return at posts including the one I found. I'm concerned I'm missing additional old posts here I could use to help me (and others) - any reason why my search isn't working? I just want to avoid being redundant and use this forum's old / existing information as much as possible the self-educate... :)

Thanks!
profile picture

Eugene

#10
The level of detail provided by log4net (a 3rd party component) is intended to troubleshoot Wealth-Lab Pro issues, not Strategy activity. The log4net component is not supported by us. You could probably make use of it following existing forum posts on your own but it's not what I'd recommend at the moment.

You're approaching the problem from the perspective which doesn't seem right to me. You said, 'I've noticed my trades not being placed as expected according to my algorithm.' Instead of going deeper into the unsupported territory with log4net, let's get back to your problem and try to solve it. If you start a new forum thread and explain what went wrong, we'll try to help get to the bottom of it. In the new thread please provide the following information:

1. Describe the problem in detail. To clarify explanations, send a screen shot by striking the "Print Screen" key and then pasting into Paint or other imaging application. Save as PNG and attach.
2. Strategy settings in the SM
3. Single symbol or Multi-symbol mode, Position Sizing, and Data Loading settings
4. Preferences (F12), particularly Commissions; Backtest Settings; Slippage and Round Lots, and Trading groups
5. Symbol(s) and Data provider
6. Strategy or sample code used. Again, we ask that you provide an "as-small-as-possible" script that demonstrates the anomaly. If you're using a un-modified public Strategy, the name is sufficient.

P.S. Also, please create a support ticket to verify your Fidelity WLP entitlement. Thank you.
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).