Display strategy info on chart?
Author: fritz
Creation Date: 3/7/2010 8:43 PM
profile picture

fritz

#1
Is there any way to tell WL to display the signal name & position size on the chart, so I can see at a glance which signal has been triggered?

Is there any way to permanently turn on the "position open to position close" lines that WL displays when you hover the mouse over the triangle icon on a trade bar?
profile picture

Eugene

#2
QUOTE:
Is there any way to permanently turn on the "position open to position close" lines that WL displays when you hover the mouse over the triangle icon on a trade bar?

Yes, look up DrawTradeLines in Community.Components.
profile picture

Eugene

#3
QUOTE:
Is there any way to tell WL to display the signal name & position size on the chart, so I can see at a glance which signal has been triggered?

Not the position size, which is determined after the Strategy has finished executing. The signal name (look up the Position object's properties in the QuickRef) can be displayed on the chart with the help of Cosmetic Charting functions (QuickRef for more).
profile picture

fritz

#4
DrawTradeLines is just what I was looking for! Thanks. Except could I suggest the red vs. green lines should represent winning vs. losing instead of up vs. down?

For my use I lifted the DrawTradeLines code, modified it to show win/loss lines, and added in signal names.
CODE:
Please log in to see this code.

Gary
profile picture

Eugene

#5
QUOTE:
Except could I suggest the red vs. green lines should represent winning vs. losing instead of up vs. down?

Sure. Actually, they were already doing it - just the color was incorrect for the short trades. This change, as well as a new overloaded call that would display trade signal names, will be added to Community.Components. Thank you.

P.S. You may also like to check out WinLossBackground.
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).