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

RE: [amibroker] Re: Float and Sum question



PureBytes Links

Trading Reference Links




<FONT face=Arial color=#0000ff 
size=2>Dennis,
<FONT face=Arial color=#0000ff 
size=2>understood but....... the sum of the volume will never (almost never) 
equal; the exact number of the float which is why I suggested the greater than 
float solution. Now we are talking about something very different. There may be 
a solution found in looping through the bars and accumulating volume. In this 
code I have (I think) set X to the initial volume then accumulated volume each 
day until such time as the Float value was met. When this occurred I reset X to 
zero and began accumulating again. The green dots show each rollover. The 
histogram shows where you are in the current cycle. The title indicates the 
number of bars since the last turn over as well as how many bars the previous 
turn over took. Lastly I have averaged the last 2 rolls. 
<FONT face=Arial color=#0000ff 
size=2> 
I got 
carried away but used the exercise to work on my looping skills (lack of, there 
may still be problems I have missed). That said I think you will find the notion 
of rollover to be a bit subjective. In theory you would want to see significant 
moves begin/end at or near the rollover point. In practice there are many 
participants , all with their own agendas, and few actually monitoring these 
roll over points. 
<FONT face=Arial color=#0000ff 
size=2> 
Regards, 
Jayson 
 <FONT 
color=#282828 size=2>
float=<FONT face=Arial 
color=#0000ff size=2>630000000<FONT face=Arial 
color=#0000ff>; 
x[<FONT 
color=#0000ff>0]=<FONT 
size=2>Volume<FONT 
size=2>[0]; <FONT 
size=2>/*Initialise the first element here*/<FONT 
color=#282828 size=2> <FONT 
color=#800000 size=2>
for<FONT 
color=#0000ff>(i = 1; 
i<BarCount<FONT color=#282828 
size=2>; i++)
{
 
<FONT face=Arial 
color=#0000ff>if<FONT face=Arial 
color=#0000ff>(x[i]<float)
{ x[i] = x[i-<FONT 
face=Arial>1<FONT 
size=2>]+Volume<FONT 
color=#282828 size=2>[i];
}<FONT color=#800000 
size=2>
if<FONT color=#282828 
size=2>(x[i]>float)
{
x[i]=<FONT face=Arial 
color=#0000ff size=2>0<FONT face=Arial 
color=#0000ff>;
}
}<FONT color=#0000ff 
size=2>
Plot<FONT color=#282828 
size=2>(C<FONT 
color=#282828 size=2>,""<FONT 
color=#282828 size=2>,4<FONT 
color=#282828 size=2>,64<FONT 
color=#282828 size=2>);<FONT color=#0000ff 
size=2>
PlotShapes<FONT 
color=#282828 size=2>(IIf<FONT 
color=#282828 size=2>(x==0<FONT 
color=#282828 size=2>,shapeCircle<FONT 
face=Arial>,<FONT 
size=2>shapeNone<FONT color=#282828 
size=2>),5<FONT color=#282828 
size=2>,0<FONT color=#282828 
size=2>,Graph0<FONT 
color=#282828 size=2>,-30<FONT 
color=#282828 size=2>);<FONT color=#0000ff 
size=2>
Plot<FONT color=#282828 
size=2>(x,""<FONT color=#282828 
size=2>,colorLightGrey<FONT 
face=Arial>,<FONT color=#ff00ff 
size=2>2|<FONT 
size=2>styleOwnScale<FONT 
face=Arial>);
<FONT face=Arial 
color=#0000ff>//Plot(float,"",colorWhite);
GraphXSpace<FONT 
face=Arial>=<FONT 
size=2>25<FONT face=Arial 
color=#0000ff>;
Count1=<FONT 
color=#0000ff>BarIndex()-<FONT 
size=2>ValueWhen(x==0<FONT 
size=2>,BarIndex(),<FONT 
size=2>1<FONT face=Arial 
color=#0000ff>);
Count2=<FONT 
color=#0000ff>ValueWhen(x==<FONT 
size=2>0,BarIndex<FONT 
size=2>(),1)-<FONT 
size=2>ValueWhen(x==0<FONT 
size=2>,BarIndex(),<FONT 
size=2>2<FONT face=Arial 
color=#0000ff>);
Count3=<FONT 
color=#0000ff>ValueWhen(x==<FONT 
size=2>0,BarIndex<FONT 
size=2>(),2)-<FONT 
size=2>ValueWhen(x==0<FONT 
size=2>,BarIndex(),<FONT 
size=2>3<FONT face=Arial 
color=#0000ff>);
Title<FONT 
color=#0000ff>= " Bars Since the last float 
rollover "+Count1+ " The previous 
Rollover took "+Count2+ "\n The average 
of the last 2 rollovers was " +(Count2+Count3)/<FONT 
size=2>2;
<FONT face=Tahoma 
size=2>-----Original Message-----From: theoldchartreader 
[mailto:theoldchartreader@xxxxxxxxx]Sent: Sunday, December 07, 2003 
3:05 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] 
Re: Float and Sum questionHi Jason,First let me 
thank you for your help,Let me try to explain what I am trying to do.I 
will use intel for a example, I am using a weekly chart.starting from 
12/05/03 to 7/07/03 intel did one float turnover.It also did one from 
2/07/03 to 7/07/03.( it seems to do one complete float turnover every 22 to 
24 weeks for the last six float turnovers)I used a spreadsheet to total the 
volume.I would like to place shapecircle  only at the point of each 
float turnover to mark the spot.Do we need to divided the sum of 
volume by the float, for a float turnover?Anyway thank once you 
again,Dennis--- In 
amibroker@xxxxxxxxxxxxxxx, "Jayson" <jcasavant@xxxx> wrote:> 
Dennis,> the chances of the sum of volume to match the float is very slim 
indeed.> Perhaps have the sum exceed the float??> > 
float=630000000;> x=Sum(Volume,220);> 
plot(c,"Price",4,64);> 
PlotShapes(IIf(x>float,shapeCircle,shapeNone),5);> > 
Regards,> Jayson> -----Original Message-----> From: 
theoldchartreader [mailto:theoldchartreader@xxxx]> Sent: Sunday, December 
07, 2003 10:26 AM> To: amibroker@xxxxxxxxxxxxxxx> Subject: 
[amibroker] Float and Sum question> > > Hi,> I would 
like to plot a shapecircle every time the sum of volume> equals the 
float?> > What do I need to do?> > > 
float=630000000;> Sum(Volume,220);> > > thank 
you,> Dennis> > 
>       Yahoo! Groups 
Sponsor>             
ADVERTISEMENT> > > > > Send BUG REPORTS to 
bugs@xxxx> Send SUGGESTIONS to suggest@xxxx> 
-----------------------------------------> Post AmiQuote-related messages 
ONLY to: amiquote@xxxxxxxxxxxxxxx> (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)> 
--------------------------------------------> Check group FAQ at:> 
<A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html> 
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.Send 
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor












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 the Yahoo! Terms of Service.