Hi Eugene,
I would like to create a custom Visualizer. In this Visualizer, I would like to get value which has been setup in the strategy script with SETGLOBAL instruction.
Is it possible to do that ? If yes, can you give me a code example that I need to put in the Visualizer source ?
Thanks for your help :-)
Size:
Color:
Hi Alexandre,
This is not supported and I believe, not required. You can use Bars.Tag and Position.Tag to pass values to your performance visualizer.
Size:
Color:
Thanks you Eugene. I asked this question because I looked to manipulate Alert and I see that there is no Tag property.
Do you see another way to pass data for an alert to the Visualizer (without using a temporary file or SignalName) ?
Size:
Color:
As the Position.Tag won't work for Alerts because the currentPos is null, you can resort to the Bars.Tag property of the Alert object. Each Alert has a Bars object linked with it.
Size:
Color:
QUOTE:
As the Position.Tag won't work for Alerts because the currentPos is null,...
That may be true for a Buy Alert, but I would hope a Sell Alert would point to the "existing" Position object (and its .Tag).
Size:
Color:
QUOTE:
I would hope a Sell Alert would point to the "existing" Position object (and its .Tag).
I was mainly talking with PosSizers is mind (which do not size existing Positions). For visualizers, of course the
SystemPerformance.Results.Alerts property contains the list of Alert objects with the Position object assigned in case of exit alerts. To sum up:
1. For entry alerts in a visualizer, use the Bars.Tag property which is accessible either with SystemPerformance.Bars collection or SystemPerformance.Results.Alerts
2. For exit alerts, use the SystemPerformance.Results.Alerts.Positions[i].Tag property.
Size:
Color: