iCCIOnArray() Question.

 

Hi, does anyone know how to use "iCCIOnArray()" in the way listed below?

1. iCCI period 10, shift 0, crosses over the "100". Wait...

2. Next, iCCI period 10, shift 0, crosses back below the "100". Place an order.


I have discovered the documentation:

iCCIOnArray(ExtBuffer,total,12,0)>iCCI(NULL,0,20,PRICE_TYPICAL,0)) return(0);

(Above is the documentation for iCCIOnArray() )


I can implement the code above, and use it appropriately, but the code above does not follow the order of logic that I would like the code to follow.

I have an example of what I have written earlier below:

// all of the code below is listed below the "int start()" ;

int start()

double CCIarray0[0];
double CCIarray1[1];
ArraySetAsSeries(CCIarray0,false);
ArraySetAsSeries(CCIarray1,false);


// next i have my signals for trade placement (order parameters) ;

if(iCCIOnArray(CCIarray1,10,12,0)>100){

 {
   //Place the order; (I understand the code for "OrderSend" );
 }}

// Thank You

I did not use "CCIarray0" AKA "CCIarray()[0]", because I did not understand the code written above first. Again, I would like to ask if any one knows how to use "iCCIOnArray()" in the way listed above.

Thank You!

 

You have 2 arrays . . .

double CCIarray0[0];
double CCIarray1[1];

the first has zero elements, the second has 1 element . . . are you doing an array resize ? what values are you putting into these arrays ?

iCCIOnArray does a CCI on the array of values you give it . . . those values are held in an array.

From the documentation . . . . "Calculation of the Commodity Channel Index on data stored in a numeric array."

 

Hi RaptorUK!

Question: the first has zero elements, the second has 1 element . . . are you doing an array resize ?

Answer: I cant say. I am not familiar with array resize.

Question: what values are you putting into these arrays ?

Answer: I am assuming that I have not assigned a "value". Does the code structure below assignin a value according to your knowledge? " (I am referring to the code below)

Thank You for your comment!

double CCIarray0[1] = {1};

// or...

double CCIarray0[1] = {5};


 

Don't try to take short cuts, they very rarely work out. If you don't know what an array is you need to learn before trying to work with them . . . none of use are born with knowledge, we all have to learn.

Array stuff: Arrays this is also worth watching: Video

 

I couldn't agree more with this statement: "Don't try to take short cuts, they very rarely work out." Thank You.

I will read the "Arrays" and watch the "Video".

Thanks again RaptorUK!

Reason: