[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Intraday Intensity



PureBytes Links

Trading Reference Links

A little help, but slow because of the two loops
stephane


/* Intraday Intensity*/


for( i = 0 ; i < 22; i++ )
{
xSum[0] =Null;
ySum[0] =Null;
diff[0]=Null;
}
for( i = 22 ; i < BarCount; i++ )
{
	for(j=1;j<22;j++)
	{
	diff[i] =(H[i-j] - L[i-j]);
		if (diff[i] != 0)
		{
xSum[i] = (xSum[i] + (2 * C[i-j] - H[i-j]- 
L[i-j]) / 
( H[i-j] - L[i-j]) * V[i-j]);
ySum[i] = (ySum [i]+ V[i-j]);
		}
	}
}

Graph0= xSum/ySum * 100;
> I am getting error in the following code. Please help me
> 
> /* Intraday Intensity*/
> xSum = 0;
> ySum = 0;
> 	
> for(i = -21; i <= 0; i++)
>  {
> diff1 =(Ref(High,i) - Ref(Low,i));
> if (diff1 != 0)
> {
> 
> xSum = (xSum + (2 * Ref(Close,i) - Ref(High,i) - Ref(Low,i)) /  (Ref
> (High,i) - Ref(Low,i)) *  Ref(Volume,i));
> ySum = (ySum+  Ref(Volume,i));
> 
> }
> }
> 	
> if(ySum == 0)
>    Graph0=0; 
> else
>     Graph0= xum / ySum * 100;


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/