PureBytes Links
Trading Reference Links
|
This message has been processed by Symantec's AntiVirus Technology.
Unknown00000000.data was not scanned for viruses because too many nested levels of files were found.
For more information on antivirus tips and technology, visit
http://ses.symantec.com/
Reply-To: <MagicTH@xxxxxxxxxxx>
From: "Terry" <MagicTH@xxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Subject: Re: using say("text") (AmiBroker 4.89.0 BETA released )
Date: Tue, 26 Dec 2006 10:16:48 -0700
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.6626
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
Importance: Normal
Yep, I missed a ).
You won't have a problem without R/T because there are no intervening data
as your finest resolution is 1 day. You don't see the day
"progressing/changing" with each new piece of data and your condition is
only executed once, thus Say() is only executed once. If you have R/T data
then you will get multiple recalculations of your formula while sitting on
the same bar as each new piece of data comes in.and Say() will repeat --
provided the condition is still True, which is why I used the example with
Ref(cond,-1) as this condition is always True for the duration of the new
bar.
Since the market is open again, I can test for myself. I suspect Herman's
tracking solution with StaticVars will be required.
--
Terry
-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of Ton Sieverding
Sent: Tuesday, December 26, 2006 01:44
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: using say("text") (AmiBroker 4.89.0 BETA
released )
Answer : I'm an EOD trader. So I am not using R/T data. 'My example' code
works fine and does not give me repeating SAY's. But with you're code I do
have a problem. It's called 'syntax error' because of an expecting "(" :
Buy=Ref(Cross(C,MA),-1);
So assuming you want something like "Buy=Cross(C,MA(C,10));" I have no
problems with the SAY() clause. 'My example' code :
LongMA = EMA( C, Param("Long Period", 50, 30, 200, 5 ));
ShortMA = EMA( C, Param("Short Period", 5, 3, 50, 1 ));
Buy = Cross( ShortMA, LongMA );
Sell = Cross( LongMA, ShortMA );
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
// Now use "Bar Replay" to walk thru the time series ....
if (LastValue(Buy)) Say("Buy");
if (LastValue(Sell)) Say("Sell");
Ton.
----- Original Message -----
From: Terry <mailto:MagicTH@xxxxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Monday, December 25, 2006 3:38 PM
Subject: RE: [amibroker] Re: using say("text") (AmiBroker 4.89.0 BETA
released )
Question: Let's say you are trading 5 minute intervals, but you're getting
R/T data every second. Your condition was True on the last bar (or the
current one). Aren't you going to get Say() repeating itself every second
for five minutes?
Buy = Ref(Cross(C,MA),-1);
if (LastValue(Buy)) Say("Buy");
--
Terry
-----Original Message-----
From: amibroker@xxxxxxxxx <mailto:amibroker@xxxxxxxxxxxxxxx> ps.com
[mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Ton Sieverding
Sent: Monday, December 25, 2006 01:35
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: using say("text") (AmiBroker 4.89.0 BETA
released )
Just the famous example with Cross() to let Say() work. Interesting to know
that I am not the only one having problems with AlertIf(). Thanks and happy
holidays for you too, Ton.
----- Original Message -----
From: Herman <mailto:psytek@xxxxxxxx>
To: amibroker@xxxxxxxxx <mailto:amibroker@xxxxxxxxxxxxxxx> ps.com
Sent: Sunday, December 24, 2006 2:38 PM
Subject: RE: [amibroker] Re: using say("text") (AmiBroker 4.89.0 BETA
released )
In Real-Time I rarely use Cross() and I may want to Say() things that are
unrelated to signals, are unrelated to the last bar, and that could become
repetitive. Like error msgs, warnings, alerts before I enter a automated
trade, even synthesized voice debug output. My eyes can only look at one
screen at the time but sound can be picked up from anywhere, allows you to
multi-task much more efficiently :-)
So Static variables solve the problem for me. S0, I am very happy with the
new Say(), I never got the Alert() working for this.
happy holidays,
herman
-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]On Behalf
Of Tomasz Janeczko
Sent: December 24, 2006 5: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 <mailto:ton.sieverding@xxxxxxxxxx> Sieverding
To: amibroker@xxxxxxxxx <mailto:amibroker@xxxxxxxxxxxxxxx> ps.com
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(< /FONT>"Buy");
if (EndValue(Sell)==1) Say("Sell");
Ton.
----- Original Message -----
From: Herman <mailto:psytek@xxxxxxxx>
To: amibroker@xxxxxxxxx <mailto:amibroker@xxxxxxxxxxxxxxx> ps.com
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. Biran <mailto:jbiran@xxxxxxxxxxx>
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.28/604 - Release Date: 12/26/2006 12:23 PM
|