Need Help with my first indicator
first, if it's your first indicator why not use the new MQL method
second, your indicator cannot be compiled
int OnCalculate (const int rates_total, const int prev_calculated, const datetime& time[], const double& open[], const double& high[], const double& low[], const double& close[], const long& tick_volume[], const long& volume[], const int& spread[])
int determineCondition() { // Check conditions shouldBuy=iCCI(NULL,0,CCI_Period,PRICE_CLOSE,current)>CCIbuyLevel; shouldSell=iCCI(NULL,0,CCI_Period,PRICE_CLOSE,current)<CCIsellLevel; return (0);/// }
current is either 1 or zero
So you not doing calculations based on the value of i in your loop
I'm trying to write an indicator but it has the following problems:
1- Has a redraw factor of 3. (repaints the last few bars.)
2- Doesn't draw the past correctly.
3- Doesn't seem to match the CCI indicator.
It's my first indicator. Any help is appreciated.
Thanks.
Sorry... Now it can be compiled..