// determine entry based on CCI if (cciperiod > 0 && isNewBar == true) { firebuy = false; firesell = false; double cci = iCCI(Symbol(), 0, cciperiod, PRICE_TYPICAL, 0); if(sellallowed && cci < ccimin) if ( volatility > VolatilityLimit ) { firesell = true; sellallowed = false; } if(buyallowed && cci > ccimax) // if ( volatility > VolatilityLimit ) { firebuy = true; buyallowed = false; } if (cci < ccimax && cci > ccimin) { buyallowed = true; sellallowed = true; } }
by moving,I want to say :// determine entry based on CCI if (cciperiod > 0 && isNewBar == true) { firebuy = false; firesell = false; double cci = iCCI(Symbol(), 0, cciperiod, PRICE_TYPICAL, 0); if(sellallowed && cci < ccimin)// if ( volatility > VolatilityLimit )
{ firesell = true; sellallowed = false; } if(buyallowed && cci > ccimax)if ( volatility > VolatilityLimit )
{ firebuy = true; buyallowed = false; } if (cci < ccimax && cci > ccimin) { buyallowed = true; sellallowed = true; } }
Thanks for your help .
Gerard