My assumption is that in BIP1 the global variable will update and carry through to be used in BIP0 but apparently I'm wrong. What am I doing wrong here?
protected override void OnBarUpdate()
{
if (CurrentBars[0] < BarsRequired || CurrentBars[1] < BarsRequired)
return;
if (BarsInProgress == 1)
// Determine direction of the long term trend
if( CUMRSI(BarsArray[1],2,3)[0] > CUMRSI(BarsArray[1],2,3)[1] )
{
upTrend = true;
}
else
{
upTrend = false;
} //-----------------------------------------------------------
if(BarsInProgress == 0)
if( upTrend == false)
SignalShort.Set(High[0] + 10);
if( upTrend == true)
SignalBuy.Set(Low[0] - 10);
}

Comment