//___________________________Sommagap______________________________//
Var: openday,newday(false), mioopen(0), miomin(0), miomax(0), mioclose(0);
Var: gap1,gap2,sommagap,indzona1;
newday=GetValues(days,1,mioopen,miomin,miomax,mioclose);
if isfirstbarday then openday=open;endif;
if IsFirstBarDay and openday<mioclose then gap2= mioClose-openday;endif;
if IsFirstBarDay and openday>mioclose then gap1= openday-mioclose;endif;
if IsFirstBarDay and openday<mioclose then sommagap=sommagap[2]-gap2;endif;
if IsFirstBarDay and openday>mioclose then sommagap=sommagap[2]+gap1;endif;
if t>1714 {and c<openday} then sommagap=0;endif;
Indzona1=CreateViewport(300,0,true);
PlotChart(sommagap,INDZONA1,black,solid,1);