gluebunny
12-09-2007, 01:50 AM
Hi, trying to get a complex indictator to determine the buy/sell signal inside itself, which I have...and I'd like it to set a public double to 1/-1 for a buy/sell respectively that the strategy can key upon for it's buy/sell signals, making the logic in the strategy very simple.
Upon looking at this forum it was said that I should make it a DataSeries and expose it, so I did:
/// <summary>
/// </summary>
[Browsable(false)]
[XmlIgnore()]
public DataSeries signal
{
get { return Values[4]; }
}
However...when I do this my indicator stops drawing anything at all, and the strategy does nothing.
What's the best way to expose one particular variable and have a strategy be able to use logic on that for decision making?
Thanks for any advice
Upon looking at this forum it was said that I should make it a DataSeries and expose it, so I did:
/// <summary>
/// </summary>
[Browsable(false)]
[XmlIgnore()]
public DataSeries signal
{
get { return Values[4]; }
}
However...when I do this my indicator stops drawing anything at all, and the strategy does nothing.
What's the best way to expose one particular variable and have a strategy be able to use logic on that for decision making?
Thanks for any advice