I have an indicator of my making, it plots swingrays of the price, however the specifics of the indicator are not important.
I want to be able to see (from outside the indi) where a swingray was broken. Hence, I declare two variables in the "Variables" section...
/* bars on which we broke HighSwing/LowSwing the last time */ private int _LastHighSwingBreakBar = -1; private int _LastLowSwingBreakBar = -1;
if ( swingbroken... )
{
/* Set values shared by SwingRays2 with the rest of the world */
_LastHighSwingBreakBar = CurrentBar;
Print("_LastHighSwingBreakBar=" + _LastHighSwingBreakBar);
}
So, in order to make the value of this variable public, I put ...
[Browsable(false)]
[XmlIgnore()]
public int LastHighSwingBreakBar
{
get { Update(); return _LastHighSwingBreakBar; }
}
private SwingRays2 SwingRays; ... SwingRays = SwingRays2(); ... Print(SwingRays.LastHighSwingBreakBar);
Many thanks,
Daniel

Comment