Well I thought I understood how to add a variable inside a indicator then access it from a strategy, but I guess I am still confused. Listed beow is the indicator code adding the variable inside an indicator. Also listed it the code generated from the strategy wizard then modified to access the variable. I am getting a error CS200 and CS0029 when I try to reference the variable. In the strategy wizard I do not see access to the variable I added so I unlocked the code and tried to do it manually. When a variable is added in an indicator what allows it to ben see in the strategy wizard to enure a script is generated correctly ?
Any help would be greatly appreciated.
Thanks
// Defined The Varaible
private int aSignalStatus = 0;
// Set The Value Of The Variable When A Condition Is Met
aSignalStatus = 2;
// Added This In The Properties Area AT The End Of The Indicator
// Is This The Area That Exposes The Variable ???
[Browsable(false)]
[XmlIgnore()]
public int SignalStatus
{
get { return aSignalStatus; }
}
// Strategy Code
// Condition set 1
if (MyIndicator(21, 12, 3, 4, 1, false, 1).SignalStatus = 1)
{
EnterLong(DefaultQuantity, "Long");
}
// Condition set 2
if (MyIndicator(21, 12, 3, 4, 1, false, 1).SignalStatus == 2)
{
EnterShort(DefaultQuantity, "Short");
}

Comment