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

Re: [amibroker] 1-minute data question



PureBytes Links

Trading Reference Links

Yuki,
 
maybe the code below is usefull. It shows how I would find the first volume bar of each day when doing an explore. You have to set the settings within explore to 1 minute,
 
rgds, Ed
 
 
// set timeframe
TimeFrameSet( inDaily
);

// generate a ramp array

rampDaily =
Cum(1
);

// restore to current time frame

TimeFrameRestore
();

// expand daily ramp to intraday timeframe

rampIntraday =
TimeFrameExpand( rampDaily, inDaily,mode = expandFirst
  );

// make an array with "1" at the first bar of each day

firstBarOfDay = rampIntraday -
Ref(rampIntraday,-1
);

Plot(firstBarOfDay,"",colorWhite,1
);

Filter
= firstBarOfDay;
AddColumn(V,"Volume at first bar of the day");
 
 
 
 
 
 
----- Original Message -----
From: "Yuki Taga" <yukitaga@xxxxxxxxxxxxx>
Sent: Monday, February 27, 2006 11:59 PM
Subject: [amibroker] 1-minute data question

> I'm trying to do a simple exploration on one-minute data with the
> following: (most of this is simply left over from a daily
> exploration)
>
> What I'm really after is the volume on the first bar each day, and
> the 50-day MA of that volume.
>
> if (GetDatabaseName() == "eSignal")
> x = 157;
> else
> x = 70;
>
> SetOption("NoDefaultColumns", True);
>
> Filter=Close > 0 AND Name() != "^IXJ" AND Name() != "@NIKO.1" AND
> Name() != "^225" AND Name() != "~~~EQUITY" AND StrLeft(Name(),1) != "~" AND
> StrLeft(Name(),1) != "$" AND Day() != Ref(Day(),-1);
>
>
> AddTextColumn(Name(), "Symbol" ,format=1.0, -1, -1, width = 70);
> AddTextColumn(Date(), "Date" ,format=1.0, -1, -1, width = x);
> AddTextColumn(FullName(), "Full Name" ,format=1.0, -1, -1, width = 290);
> AddColumn (V, "Volume", format = 1.0, -1, -1, width = 82);
> AddColumn((V / MA(V,50)) * 100, "50 MA %", 1.0, -1, -1, width = 55);
> AddColumn(C,"Last",format = 1.0, -1, -1, width = 70);
> AddColumn((C / Ref(C,-1) -1) * 100,"% Chg.", format = 1.2, -1, -1, width = 50);
> AddColumn(O,"O", format = 1.0, -1, -1, width = 70);
> AddColumn(H,"Hi", format = 1.0, -1, -1, width = 70);
> AddColumn(L,"Lo", format = 1.0, -1, -1, width = 70);
>
> I'm getting part of what I want, which is the volume on the first
> one-minute bar each day.  And I'm getting it sequentially, meaning
> that the last line of output is indeed the first-bar volume for
> yesterday, and the previous is for the day before.  But, the dates
> displayed are all for yesterday, even though the volumes are clearly
> correct for the day before.  And I'm not getting realistic MA
> figures.
>
> Can anyone assist?
>
> Please see snap1.png for the exact output I'm getting.
>
> Yuki
>
> ------------------------ Yahoo! Groups Sponsor --------------------~-->
> Try Online Currency Trading with GFT. Free 50K Demo. Trade
> 24 Hours. Commission-Free.
>
http://us.click.yahoo.com/RvFikB/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/

>


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





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS