display same kind arrow once
if ((signal[k-1]!=0)||(signal[k-1]==NULL)){ // if last mark arrow is not down the display down arrow ArrayInitialize(downArrow, EMPTY_VALUE); downArrow[i] = Open[i]+SignalGap*Point;
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
int start()
{
int counted_bars=IndicatorCounted();
//----
int i,limit, top, k;
int signal[];
limit=Bars-1;
if(counted_bars>=1) limit=Bars-counted_bars-1;
if (limit<0) limit=0;
for (i=limit;i>=0;i--) {
if((FullBody(i))&&(isShrinking(i+1))){
if(isNegativeExpanding(i)){
signal[k]=0; // mark current arrow is down
if ((signal[k-1]!=0)||(signal[k-1]==NULL)){ // if last mark arrow is not down the display down arrow
downArrow[i] = Open[i]+SignalGap*Point;
k++; }
}
else if(isPositiveExpanding(i)){
signal[k]=1; // mark current arrow is up
if ((signal[k-1]!=1)||(signal[k-1]==NULL)){ //if last mark arrow is not up then display up arrow
upArrow[i] = Open[i]-SignalGap*Point;
k++;
}
}
}
} // end for
//----
return(0);
}