Please help me......

 

How to return UsePeriod_5==false?

if((UsePeriod_5==true)&&(ContinueNext==true))
{
////////////////////
double OPEN_5=iCCI(NULL,0,5,PRICE_OPEN,0);
double CLOSE_5=iCCI(NULL,0,5,PRICE_CLOSE,0);
double HIGH_5=iCCI(NULL,0,5,PRICE_HIGH,0);
double LOW_5=iCCI(NULL,0,5,PRICE_LOW,0);
////////////////////
double BUY_CCI_5=0;
double SELL_CCI_5=0;
///////////////////////////////////////////////////////////////////////
if(OPEN_5 < -200) BUY_CCI_5=1;
if(OPEN_5 > 200) SELL_CCI_5=1;

}

I want... if(BUY_CCI_5+SELL_CCI_5 == 0) ...return( UsePeriod_5=false);

Any idea?

 
pannek wrote >>

How to return UsePeriod_5==false?

if((UsePeriod_5==true)&&(ContinueNext==true))
{
////////////////////
double OPEN_5=iCCI(NULL,0,5,PRICE_OPEN,0);
double CLOSE_5=iCCI(NULL,0,5,PRICE_CLOSE,0);
double HIGH_5=iCCI(NULL,0,5,PRICE_HIGH,0);
double LOW_5=iCCI(NULL,0,5,PRICE_LOW,0);
////////////////////
double BUY_CCI_5=0;
double SELL_CCI_5=0;
///////////////////////////////////////////////////////////////////////
if(OPEN_5 < -200) BUY_CCI_5=1;
if(OPEN_5 > 200) SELL_CCI_5=1;

}

I want... if(BUY_CCI_5+SELL_CCI_5 == 0) ...return( UsePeriod_5=false);

Any idea?

Then you must put this

I want... if(BUY_CCI_5+SELL_CCI_5 == 0) ...return( UsePeriod_5=false);

over the other code that follows and you must call the CCI Indicator int the variales BUY_CCI_5 and SELL_CCI_5 before you make the if statement

 
PipTraderTim wrote >>

Then you must put this

I want... if(BUY_CCI_5+SELL_CCI_5 == 0) ...return( UsePeriod_5=false);

over the other code that follows and you must call the CCI Indicator int the variales BUY_CCI_5 and SELL_CCI_5 before you make the if statement

no.. i want a void or samething to return UsePeriod_5=false

 

Don't know how a void could return anything but how about this solution?

if((UsePeriod_5==true){
  if(ContinueNext==true){
    ////////////////////
    double OPEN_5=iCCI(NULL,0,5,PRICE_OPEN,0);
    double CLOSE_5=iCCI(NULL,0,5,PRICE_CLOSE,0);
    double HIGH_5=iCCI(NULL,0,5,PRICE_HIGH,0);
    double LOW_5=iCCI(NULL,0,5,PRICE_LOW,0);
    ////////////////////
    double BUY_CCI_5=0;
    double SELL_CCI_5=0;
    ///////////////////////////////////////////////////////////////////////
    if(OPEN_5 < -200) BUY_CCI_5=1;
    if(OPEN_5 > 200) SELL_CCI_5=1;
  }
}else{
  return( UsePeriod_5);
}
Reason: