How to

 

im litle stucked i want to use just opened candle and not previus i tryed to change things in the code but im getting many errors this is a peace of the code

for (shift=CountDays-1;shift>=0;shift--)

{

time1=iTime(NULL,PERIOD_D1,shift);

i=shift-1;

if (i<0)

time2=Time[0];

else

time2=iTime(NULL,PERIOD_D1,i)-Period()*60;

high = iHigh(NULL,PERIOD_D1,shift+1);

low = iLow(NULL,PERIOD_D1,shift+1);

open = iOpen(NULL,PERIOD_D1,shift+1);

close = iClose(NULL,PERIOD_D1,shift+1);

please give a hint

sailor the bad code reader

 
sailor:
im litle stucked i want to use just opened candle and not previus i tryed to change things in the code but im getting many errors this is a peace of the code

for (shift=CountDays-1;shift>=0;shift--)

{

time1=iTime(NULL,PERIOD_D1,shift);

i=shift-1;

if (i<0)

time2=Time[0];

else

time2=iTime(NULL,PERIOD_D1,i)-Period()*60;

high = iHigh(NULL,PERIOD_D1,shift+1);

low = iLow(NULL,PERIOD_D1,shift+1);

open = iOpen(NULL,PERIOD_D1,shift+1);

close = iClose(NULL,PERIOD_D1,shift+1);

please give a hint

sailor the bad code reader

sailor,

We have to see the complete code to help.

For example I don't know what's the CountDaysis (I have to see the declaration of it) and i varaible too.