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

[amibroker] Need some help to get plots correct



PureBytes Links

Trading Reference Links

I am running analysis on intraday composite ticker

//Scan with settings=1 minute
UseTrade = TimeNum() <= ValueWhen( Cross( TimeNum(), 160001 ), TimeNum() );
Vc = V*C/1000;
Buy=1;
Comp="~ASX100";
AddToComposite(O*usetrade,Comp,"O",1+2+4+16);
AddToComposite(H*usetrade,Comp,"H",1+2+4+16);
AddToComposite(L*usetrade,Comp,"L",1+2+4+16);
AddToComposite(C*usetrade,Comp,"C",1+2+4+16);
AddToComposite(Vc*usetrade,Comp,"V",1+2+4+16);
AddToComposite(TimeFrameExpand(TimeFrameCompress(1,inDaily),inDaily)*usetrade,Comp,"I",1+2+4+16);

Then analysing some things, this is attempt to get a running overall
average of the turnover at each intraday timezone.
numdays = Cum(DateNum()!=Ref(DateNum(),-1))+1;
numint = (6*60+15)*60/Interval();


mycolor=IIf(Hour()<12, colorBlue,
 IIf(Hour()>=12 AND Hour()<14,colorRed,
 IIf(Hour()>=14 AND Hour()<16,colorGreen,
 colorBlack)));

Filter=1;
for(x=0;x<=numint;x++)
{
timex = 100000 + int(Interval()*x/3600)*10000 + (Interval()*x/60)%60*100;
cumx = Cum( timex==TimeNum() ) +1;
//Vcum = Cum( IIf(TimeNum()==timex,V,0) )/Cumx;
Vcum = Cum( IIf(TimeNum()==timex,V,0) )/numdays;
Plot(Vcum*(timex==TimeNum()), "", mycolor, styleArea);
AddColumn(Vcum,"Vcum etc",1);
}
_N(
Title = "{{NAME}} -{{INTERVAL}} {{DATE}} - Average Activity  {{VALUES}}" );


I have some minor problems trying to get it right and hoping for some help

1. As the number of stocks inj my intraday history varies, not all
have first date of starting) I wanted to average out over the number
of stocks. This is OK if I stay at 1  minute display but in say hourly
the number of stocks (OI field) adds up each data bit so instead of
getting 20 as per the number used I can get 160. I need some way to
keep each bar as the actual number of stocks, noy summed together.

2. The plot is a small part in middle of screen, with large area above
and below. I want to make it more normal looking with bottom and top
of bars with the screen, See attached screen shot

3. The above code works to plot, but I cannot get any values to show
in the title.




-- 
Cheers
Graham
http://e-wire.net.au/~eb_kavan/


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/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/
 

Attachment: compvol.gif
Description: GIF image