daven
08-20-2009, 02:55 PM
I am working on a strategy which will go long if certain conditions are met and an avg line, which changes color depending on its slope, is the right color. To make the "color" available to a strategy I have created a variable which is set to a number depending on the color of the plot. I've embedded along with the plot statement but I don't know how to make it accessible to a strategy. Here's a sample of the code:
if (Rising(SMA(Period)))
{
// Connects the rising plot segment with the other plots
RisingPlot.Set(1, SMA(Period)[1]);
LColText = 1;
}
I'm pretty sure I need to somehow add a statement in the "Properties" section
or perhaps do that as well as create a dataseries but the things I've tried don't work. If there is a code sample somewhere that outlines this I would be grateful to see it.
Thanks
DaveN
if (Rising(SMA(Period)))
{
// Connects the rising plot segment with the other plots
RisingPlot.Set(1, SMA(Period)[1]);
LColText = 1;
}
I'm pretty sure I need to somehow add a statement in the "Properties" section
or perhaps do that as well as create a dataseries but the things I've tried don't work. If there is a code sample somewhere that outlines this I would be grateful to see it.
Thanks
DaveN