|
It isn't big problem. Simply change in code following part:
// Signal area : any conditions to trend determination:
// 1. Price Channel breakout
if(Close[shift]>bsmax[shift+1]) trend=1;
if(Close[shift]<bsmin[shift+1]) trend=-1;
// Correction boards values with existing trend
if(trend>0)
{
if(Risk>0 && Close[shift]<bsmin[shift]) bsmin[shift]=bsmin[shift+1];
if(bsmin[shift]<bsmin[shift+1]) bsmin[shift]=bsmin[shift+1];
}
if(trend<0)
{
if(Risk>0 && Close[shift]>bsmax[shift]) bsmax[shift]=bsmax[shift+1];
if(bsmax[shift]>bsmax[shift+1]) bsmax[shift]=bsmax[shift+1];
}
Igor.
|