this is the code:
... Variables
private DataSeries stochD;
private DataSeries stochFifty;
....protected override void Initialize()
stochD = new DataSeries(this);
stochFifty = new DataSeries(this);
.... protected override void OnBarUpdate()
{
double maValue = 0;
switch (matype)
{
case 1:
{
Middle.Set(maValue = EMA(Inputs[0], Period)[0]);
break;
}
case 2:
{
Middle.Set(maValue = HMA(Inputs[0], Period)[0]);
break;
(................................................. ............................)
stochD.Set(KBT_Stochastics(Close,5,8,5).D[0]);
stochFifty.Set(KBT_Stochastics(Close,5,8,5).Middle Line[0]);
if ( (Middle[0] > Middle[3 ]) && (stochD[0] < stochFifty[0] ) )
{
if (showStochRegionAlerts) DrawRegion(............ );
}
after compiling and refreshing the window the entire thing disappears.. i been here before..
help please
Comment