PureBytes Links
Trading Reference Links
|
Thanks Dima ..well over my head :)
-- IIF (fromEntry < fromExit, 1, IIF (fromEntry
> fromExit, 0, IIF (ref (fromEntry < fromExit,
- (lastvalue (barssince (lgentry)) + 1)), ---
how do u define the fromEntry and fromExit
?
<BLOCKQUOTE
>
Original Message -----
<DIV
>From:
Dima
Rasnitsyn
To: <A title=amibroker@xxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx ;<A
title=tj@xxxx href="">'Tomasz Janeczko'
Sent: Saturday, March 24, 2001 2:55
PM
Subject: RE: [amibroker] buy sell
signals
<FONT face=Arial color=#0000ff
size=2>David,
<FONT face=Arial color=#0000ff
size=2>
I'm
using the following code to filter out extra buy/sell
signals:
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>lgentry = xxx; // Signals to open long position
<FONT face=Arial color=#0000ff
size=2>lgexit = xxx; // Signals to exit from long position
//
inlgtrd = 1 when in long, 0 otherwise; 'cum(lgentry)>0' and
cum(lgexit)>0 are necessary to
//
filter out the cases when lgentry or lgexit is undefined, i.e. '{empty}'.
These expressions will be
//
replaced by ' lgentry != {EMPTY}' and 'lgexit != {EMPTY}' once Tomasz
implements that.
<FONT face=Arial color=#0000ff
size=2> // If Entry and exit happen at the same
day // If was in trade before, exit the trade
// Else (was not in trade) If the market closed above open (i.e. the low was
done before the high), consider in long trade // Else ( closed
below open ), consider entry and exit at the same day and not in
tradeinlgtrd = IIF (NOT (cum (lgentry) > 0), 0, IIF (NOT (cum (lgexit)
> 0), 1,
<FONT face=Arial color=#0000ff
size=2> IIF (fromEntry < fromExit, 1, IIF (fromEntry >
fromExit, 0, IIF (ref (fromEntry < fromExit, -
(lastvalue (barssince (lgentry)) + 1)), 0,IIF (close > open, 1,
0))))));lgexit = IIF (ref (inlgtrd, -1) > inlgtrd, 1, 0);lgentry
= IIF (CUM (lgentry) < 1, 0, IIF (CUM (lgentry) == 1, lgentry,
ref (inlgtrd, -1) < inlgtrd));
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>Note: I'm using lgentry/lgexit rather then buy/sell to separate
entering/exiting long trade from exiting/entering a short
one.
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>Regards,
<FONT face=Arial color=#0000ff
size=2>Dima.
<FONT face=Tahoma
size=2>-----Original Message-----From: David Holzgrefe
[mailto:dtholz@xxxx]Sent: Friday, March 23, 2001 3:55
PMTo: Tomasz Janeczko;
amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] buy sell
signals
Hi all Tomasz is there a way to filterout buy
sell signals if there is already an open signal
eg if buy condition meet don't print new signal
?
thanks DavidYour use
of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Your
use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
|