Quote:
Originally Posted by Enivid
Can you copy the exact code of that part of your indicator? Maybe there is some syntax typo that causes this error.
|
Yes.This is the code:
MQL5 Code:
#property copyright "Copyright © 2009"#property link ""#property version ""#property description ""#property indicator_chart_window#property indicator_buffers 1double CCIBUFFER
[];static bool TriggerOnlyThisBar
;//+------------------------------------------------------------------+//| Custom indicator initialization function |//+------------------------------------------------------------------+void OnInit(){ //---- indicator buffers mapping SetIndexBuffer(0, CCIBUFFER
); }//+------------------------------------------------------------------+//| Custom CCI Arrows |//+------------------------------------------------------------------+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 handle
;handle
= iCCI(NULL, PERIOD_M5, 14, PRICE_CLOSE);int buffer_num
=BarsCalculated(handle
);CopyBuffer(handle
,0,0,buffer_num
,CCIBUFFER
);ArraySetAsSeries(CCIBUFFER
,true); { if((CCIBUFFER
[0] > 0)&& (CCIBUFFER
[1] < 0)&& TriggerOnlyThisBar
!= Bars(Symbol(),PERIOD_M5)) { Alert(Symbol()," SIGNAL DOWN "); TriggerOnlyThisBar
= Bars(Symbol(),PERIOD_M5); } } if ((CCIBUFFER
[0] < 0)&& (CCIBUFFER
[1] > 0)&& TriggerOnlyThisBar
!= Bars(Symbol(),PERIOD_M5)) { Alert(Symbol(),"SIGNAL UP "); TriggerOnlyThisBar
= Bars(Symbol(),PERIOD_M5); } return(rates_total
);}