Lester, thank you for your help.  
Please review below attached these two versions and  several syntax 
errors. Because I'm a newbie for coding, so I can not correct these 
errors by myself. Any help is very appreciated

1.
/*** START ***/

// High and Low in a specified time frame
startTime = 093000;
endTime = 103000;

// add-on plugin functions
hgh = deTimeRangeHHV (H, startTime, endTime);
lwl = deTimeRangeLLV (L, startTime, endTime);
cls = deValueWhenTime(C, endTime);

H_plot = IIf(TimeNum()>=endTime, hgh, Null);
L_plot = IIf(TimeNum()>=endTime, lwl, Null);
C_plot = IIf(TimeNum()>=endTime, cls, Null);

Plot(H_plot, "", colorLightBlue, styleLine);
Plot(L_plot, "", colorOrange, styleLine);
Plot(C_plot, "", colorDarkYellow, styleLine);

Plot(C,"",26,64);

Title = "\\c11"+Interval(2)+" "+
Date()+"\\c-1 H="+H+" L="+L+" C="+C;

SetChartOptions(0, chartShowDates);

/*** END ***/


Ln: 8, Col: 22 : Error 30, Syntax error
Ln: 9, Col: 22 : Error 30, Syntax error
Ln: 10, Col: 22 : Error 30, Syntax error
Ln: 12, Col: 37 : Error 29, Variable 'hgh' used without having been 
initialized.
Ln: 13, Col: 37 : Error 29, Variable 'lwl' used without having been 
initialized.
Ln: 14, Col: 37 : Error 29, Variable 'cls' used without having been 
initialized.


2.
// High and Low in a specified time frame 
startTime = 153000; 
endTime = 163000; 

tt = IIf(TimeNum() >= startTime AND TimeNum() <= endTime,1,0); 
dtt = tt - Ref(tt,-1); 

// add-on plugin functions 
hgh = deTimeRangeHHV (H, startTime, endTime); 
lwl = deTimeRangeLLV (L, startTime, endTime); 
//cls = deValueWhenTime(C, endTime); 

H_plot = IIf(TimeNum()>=endTime, hgh, Null); 
L_plot = IIf(TimeNum()>=endTime, lwl, Null); 
//C_plot = IIf(TimeNum()>=endTime, cls, Null); 
C_Plot = IIf(!tt,ValueWhen(Ref(dtt,1) == -1,C),Null); 

Plot(H_plot, "", colorLightBlue, styleLine); 
Plot(L_plot, "", colorOrange, styleLine); 
Plot(C_plot, "", colorDarkYellow, styleLine); 

SetChartOptions(0, chartShowDates); 
Plot(C,"",26,64); 

Title = "\\c11"+Interval(2)+" "+ 
Date()+"\\c-1 H="+H+" L="+L+" C="+C; 

Ln: 9, Col: 22 : Error 30, Syntax error
Ln: 10, Col: 22 : Error 30, Syntax error
Ln: 13, Col: 37 : Error 29, Variable 'hgh' used without having been 
initialized.
Ln: 14, Col: 37 : Error 29, Variable 'lwl' used without having been 
initialized.



--- In [email protected], "Lester Vanhoff" <[EMAIL PROTECTED]> 
wrote:
>
> There are two final versions of the code.
> 
> In most cases this one (the shorter of the two) is sufficient, 
except that it shouldn't be used with illiquid tickers or very short 
time frames, like bars below one minute:
> 
> http://finance.groups.yahoo.com/group/amibroker/message/106471
> 
> For illiquid tickers and seconds long bars you need to use the 
second code. It is modified to make sure that Close Line is plotted 
even if there is no bar present at Close Time.
> 
> http://finance.groups.yahoo.com/group/amibroker/message/106487
> 
> If you need to plot the lines across midnight then further 
modifications are likely required.
> 
> Lester
> 
> --- In [email protected], "cstdc5588" <cstdc5588@> wrote:
> >
> > Lester, thank you very much for you help. I'll read and try to 
find 
> > which coding is working.
>


Reply via email to