PureBytes Links
Trading Reference Links
|
Thanks for the explanation. Imagine the pains I went through trying to
avoid this LastValue!
Just a clarification, what is the number of bars loaded when using
LastValue():
The number specified in Database settings, or
The Default number of quotations in chart (Tools Preferences)
I am pretty sure you do not mean the number of VISIBLE bars in a
chart.
This makes a huge difference in may case since I normally use only
about 50 quotations in a chart but load 200,000 bars
(which is only a few days using tick based database)
regards,
Joseph Biran
____________________________________________
_____
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of Tomasz Janeczko
Sent: Sunday, December 24, 2006 11:55 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: using LastValue() vs. [BarCount-1] (was
using say("text") (AmiBroker 4.89.0 BETA released ))
Addition MyVariable[ BarCount -1 ] is technically correct however it
does not refer to absolute LAST BAR,
but last VISIBLE bar.
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: <mailto:groups@xxxxxxxxxxxxx> Tomasz Janeczko
To: <mailto:amibroker@xxxxxxxxxxxxxxx> amibroker@xxxxxxxxxxxxxxx
Sent: Sunday, December 24, 2006 8:53 PM
Subject: Re: [amibroker] Re: using LastValue() vs. [BarCount-1] (was
using say("text") (AmiBroker 4.89.0 BETA released ))
LastValue does NOT cause loading ALL bars.
What LastValue does is to ensure that bars upto LAST BAR are loaded.
If you display say last 10 days in the chart it won't affect
performance at all.
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: J. Biran <mailto:jbiran@xxxxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Sunday, December 24, 2006 8:34 PM
Subject: RE: [amibroker] Re: using LastValue() vs. [BarCount-1] (was
using say("text") (AmiBroker 4.89.0 BETA released ))
I am always reluctant of using LastValue() as I recall it slows things
down by forcing loading all bars.
I use Myvariable[BarCount-1] instead.
1. Is there anything wrong with that?
2. Does EndValue() suffer from same drawback as LastValue() (when no
range is selected)?
Joseph Biran
____________________________________________
_____
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of Tomasz Janeczko
Sent: Sunday, December 24, 2006 2:39 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: using say("text") (AmiBroker 4.89.0 BETA
released )
I would rather suggest using LastValue, instead of EndValue because
EndValue depends on Range markers
that may or may not point to the last bar.
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Ton Sieverding <mailto:ton.sieverding@xxxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Sunday, December 24, 2006 10:35 AM
Subject: Re: [amibroker] Re: using say("text") (AmiBroker 4.89.0 BETA
released )
Why Herman ? Say() works fine for me. Next a simple MA crossing
system. Use 'Bar Replay' to walk thru the time array and you'l' get
your 'Buys' and 'Sell' ...
LongMA = EMA( C, Param("Long Period", 50, 30, 100, 5 ));
ShortMA = EMA( C, Param("Short Period", 5, 3, 50, 1 ));
Buy = Cross( ShortMA, LongMA );
Sell = Cross( LongMA, ShortMA );
if (EndValue(Buy)==1) Say("Buy");
if (EndValue(Sell)==1) Say("Sell");
Ton.
----- Original Message -----
From: Herman <mailto:psytek@xxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Saturday, December 23, 2006 12:17 PM
Subject: RE: [amibroker] Re: using say("text") (AmiBroker 4.89.0 BETA
released )
You need to store any text to ouput in a staticvar and clear this
variable after you output it, below is just one way of doing this.
This will only Say() text when is has changed. You may have to change
this when you need repetative messages, like pyramided trades that say
Buy, Buy, Buy, ...
Text = ParamStr("Enter text to synthesize","Test");
PrevText = StaticVarGetText("PrevText");
if
( Text != PrevText )
{
Say( Text );
StaticVarSetText
("PrevText", text);
}
best regards,
herman
-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]On
Behalf Of J. Biran
Sent: December 23, 2006 1:27 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Re: using say("text") (AmiBroker 4.89.0 BETA
released )
Thanks, I may be misunderstanding Flip but my guess is it should be
the opposite,
something like ExRem() to only sound message once on the first
occurrence.
but I am not even sure what to include in that statement as arrays.
if condition say("my message");
I would like to be said only once (the first time condition is true)
and only on the last bar
(which I will take care of after I figure out how to restrict this
event).
Joseph Biran
____________________________________________
_____
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of Chris DePuy
Sent: Friday, December 22, 2006 7:22 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: using say("text") (AmiBroker 4.89.0 BETA
released )
I haven't done this yet, but Flip function should work.
----- Original Message -----
From: J. <mailto:jbiran@xxxxxxxxxxx> Biran
To: amibroker@xxxxxxxxx <mailto:amibroker@xxxxxxxxxxxxxxx> ps.com
Sent: Friday, December 22, 2006 7:02 PM
Subject: RE: [amibroker] Re: using say("text") (AmiBroker 4.89.0 BETA
released )
How does one use the say("text") function such that it is only
stated once and does not repeat even if the condition that
it depends on continues to be true?
Joseph Biran
____________________________________________
--- In amibroker@xxxxxxxxx <mailto:amibroker@xxxxxxxxxxxxxxx> ps.com,
"Tomasz Janeczko" <groups@xxx>
wrote:
>
> Hello,
>
> AmiBroker 4.89.0 BETA has just been released
> http://www.amibroke
<http://www.amibroker.com/devlog/2006/12/21/amibroker-4890-beta->
r.com/devlog/2006/12/21/amibroker-4890-beta-
released/
>
> Happy Holiday Season!
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
_
Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.26/601 - Release Date: 12/24/2006 11:31 AM
|