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
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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..