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

[amibroker] Help with indicator



PureBytes Links

Trading Reference Links

I would like to know if there is AB indicator that resembles this 
TradeStation indicator:

This indicator plots the cumulative intraday volume through the time 
of each bar (VolSum) and the average cumulative intraday volume 
through the same time of day (VolSumAvg). This allows the user to 
compare the day's volume up to the current time with the average 
volume of the last N days through the same time of day. An input 
allows the user to set the number of days of data to average into 
the VolSumAvg.

Input: DaysToAvg(3);
Vars: LenOfDay(0), BarsPerDay(0), VolSumToAvg(0), VolSum(0), 
VolSumAvg(0);

If BarType = 1 then begin
	
	LenOfDay = TimeToMinutes(Sess1EndTime) - TimeToMinutes
(Sess1StartTime);
	BarsPerDay = LenOfDay/BarInterval;
	VolSumToAvg = 0;

	If Date <> Date[1] then
		VolSum = Ticks
	else
		VolSum = VolSum + Ticks;
		
	For Value1 = 1 to DaysToAvg begin
		VolSumToAvg = VolSumToAvg + VolSum
[BarsPerDay*Value1];
	end;

	VolSumAvg = VolSumToAvg / DaysToAvg;
	
	Plot1(VolSum, "VolSum");
	If BarNumber > BarsperDay * DaysToAvg then
		Plot2(VolSumAvg, "VolSumAvg");

end;

Al,
Thanks.




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/DldnlA/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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