Thread: Price Channel
View Single Post
  #6 (permalink)  
Old 12-05-2005, 01:53 PM
igorad's Avatar
igorad igorad is offline
Senior Member
 
Join Date: Oct 2005
Location: Ukraine
Posts: 820
igorad is on a distinguished road
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.
Reply With Quote