Is it possible to use multiple CommentaryWindow ?
Author: traderray
Creation Date: 7/13/2017 6:06 PM
profile picture

traderray

#1
I need to have 2 commentary windows. When I try the following I get 2 copies of the last commentary. Is there a command to close the first window or is there another way to achieve this?


CODE:
Please log in to see this code.
profile picture

Eugene

#2
It's not going to work. The static class is programmed with only one window in mind. Let's start with why do you think you need to have 2 commentary windows?

P.S. This will not work as the path is ignored internally:
CODE:
Please log in to see this code.

Output is always sent to one file under %AppData%.

Also, consider using the newer, more convenient syntax with extension methods.
profile picture

traderray

#3
I have a script that produces, for example:
1. Set of data and charts giving an overview of the market.
2. Set of data and charts giving WLP and external data for positions held.
3. Set of data and charts giving WLP and external data for certain watchlists.
....

I find it very helpful to run this script and then simply scan down the reports viewing the data as I scan. I want to be able to go to any set of data without needing to scan down a single commentary window until I find the data I want.
profile picture

traderray

#4
Eugene,

I believe I have a reasonable solution.

1. I will create the html files myself from the script with each having it's own name.
2. I will open each file with the following sample coding.
CODE:
Please log in to see this code.


I believe this will work fine. Do you have a better solution?

Thanks for your help.
profile picture

traderray

#5
Eugene,

I have changed my example coding to create a html file and then open it. It works fine. Is there a simpler solution?

CODE:
Please log in to see this code.
profile picture

Eugene

#6
Ray, I'm fine with whatever works for you. The library's source code is open so you're welcome to modify it to suit your needs.
profile picture

traderray

#7
Thanks Eugene, I will put that on my todo list.
profile picture

Starburst

#8
Hi,

Is it possible to use the CommentaryWindow and limit it to one or two of the latest trading days and not the entire strategy?
Does it have a Clear Debug function?

Thank you for your help.
profile picture

LenMoz

#9
In the standard loop, you can condition your PrintDebug like this...
CODE:
Please log in to see this code.
To clear...
CODE:
Please log in to see this code.

profile picture

Eugene

#10
Just as LenMoz has suggested, the same principle should apply to the CommentaryWindow:

CODE:
Please log in to see this code.
profile picture

Starburst

#11
Thank you both for your response to my inquiry. I’m sorry but apparently I did not compose my question with enough details.

If I was using intraday data 5 min, how do I limit my bars to the last day or two.

Thank you again.
profile picture

Eugene

#12
Might be something like this (requires Community.Components):
CODE:
Please log in to see this code.
profile picture

Starburst

#13
Works great! Thank you
profile picture

Eugene

#14
Glad I could assist.