PureBytes Links
Trading Reference Links
|
thanks much. any ideas on why i get a syntax error with the code
below? If i include the code within the "IF" clause with out the
actualy "IF" block, it works fine. but with the "IF" clause there i
get the following error:
"Line 15, Column 2:
AddColumn(fCumVol,"fCumVol", 1.0);
AddColumn(bBuy,"Buy", 1.0);
Buy = True;
}
-^
Error 3.
Condition in IF, WHILE, FOR statements
has to be Numeric or Boolean type.
You can not use array here,
please use [] (array subscript operator)
to access array elements"
Here is the code:
---------------------------------------------------------
stockFloat = 19100000;
fCumVol = Ref( fCumVol = Sum( V, 5 ), -1);
bBuy = ( V > ( stockFloat ) ) AND
( fCumVol < stockFloat ) AND
( C > O ) ;
if ( bBuy )
{
Filter = 1;
AddColumn(fCumVol,"fCumVol", 1.0);
AddColumn(bBuy,"Buy", 1.0);
Buy = True;
}
--- In amibroker@xxxxxxxxxxxxxxx, Terry <MagicTH@xxxx> wrote:
> Try this:
> CumVol = Sum( ref(V,-1), 5 );
>
> An Explore is like a back test in that you get the same results
without the
> Report. You can add as many AddColumn statements as you want to
see things
> like your Buy/Sell/Short/Cover signals, Volume, Close, any
variable you have
> in your code.
> --
> Terry
>
>
> From: "virtuouz_pagan" <dimension@xxxx>
> Reply-To: amibroker@xxxxxxxxxxxxxxx
> Date: Thu, 21 Oct 2004 03:34:17 -0000
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Summing volume
>
>
> actually, it's almost what i needed.
> I am using the BackTest function and would like to see the fCumVol
> value at each signal. I was trying to use the "printf" function,
but
> do not see anything printed in the Interpretation or NotePad
window.
> What would be better however, is if i could add a column to the
> backtest grid/table, similar to what you suggested for the Explore
> function. Is that possible?
>
> sorry for the barrage of questions...
>
> --- In amibroker@xxxxxxxxxxxxxxx, Terry <MagicTH@xxxx> wrote:
> > Correct
> >
> > Filter = 1;
> > AddColumn(fCumVol,"fCumVol",1.0);
> >
> > Then click Explore in AA
> > --
> > Terry
> >
> >
> > From: "virtuouz_pagan" <dimension@xxxx>
> > Reply-To: amibroker@xxxxxxxxxxxxxxx
> > Date: Thu, 21 Oct 2004 03:08:05 -0000
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Summing volume
> >
> >
> > On processing the current bar, i would like to determine the
> > cumulative volume of the last 5 bars (including the current).
> > Would the folliwng do this?
> >
> > fCumVol = Sum( V, 5 );
> >
> > Second question. If i wanted to print out debug statements to
see
> > the above value as each bar is processed, how can i do that?
> >
> > thank you.
> >
> >
> >
> >
> >
> >
> >
> > Check AmiBroker web page at:
> > http://www.amibroker.com/
> >
> > Check group FAQ at:
> > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> >
> >
> > Yahoo! Groups Sponsor
> >
> > ADVERTISEMENT
> >
>
<http://us.ard.yahoo.com/SIG=129a4dsog/M=295196.4901138.6071305.30011
> 76/D=g
> >
>
roups/S=1705632198:HM/EXP=1098414491/A=2128215/R=0/SIG=10se96mf6/*htt
> p://com
> > panion.yahoo.com>
> >
> >
> > 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
> > <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?
subject=Unsubscribe>
> > *
> > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service
> > <http://docs.yahoo.com/info/terms/> .
>
>
>
>
>
> Check AmiBroker web page at:
> http://www.amibroker.com/
>
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
>
> Yahoo! Groups Sponsor
>
> ADVERTISEMENT
>
<http://us.ard.yahoo.com/SIG=129jnevc3/M=315388.5500238.6578046.30011
76/D=g
>
roups/S=1705632198:HM/EXP=1098416071/A=2372354/R=0/SIG=12id813k2/*htt
ps://ww
> w.orchardbank.com/hcs/hcsapplication?
pf=PLApply&media=EMYHNL40F21004SS>
>
>
> 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
> <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
> *
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service
> <http://docs.yahoo.com/info/terms/> .
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/
|