PureBytes Links
Trading Reference Links
|
Without solving your problem I think that first I have to point out that the
code is notfree running. It only executes at the end of a bar. So it is next
to impossible that the time would ever be = to a value. Perhaps since you
only specified minutes and your calculation happened to occur on that minute
it would meet the criteria. I think its always best to specify ranges for
time.
Jim Bronke
Phoenix, AZ
Go Diamondbacks
----- Original Message -----
From: "David Folster" <mr_bond@xxxxxxxxx>
To: <omega-list@xxxxxxxxxx>
Sent: Tuesday, November 06, 2001 8:30 PM
Subject: What's wrong with this code?
: Omega List,
:
: Can anyone tell me what is wrong with this code? It is meant to be an
: opening range breakout day trading system which defines a channel high and
: low between 9:30 and 11:00 am and buys/sells the breakout/breakdown of
this
: channel and exits on the close. For some reason though, it doesn't do
that.
: For one thing, it buys before the channel is complete, often on the first
: bar of the day (?). Also, it sometimes buys/sells after the channel at
the
: proper point, but also at some arbitrary points as well. HELP!
:
: Thanks in advance for your help,
:
: David Folster
:
:
:
: INPUT:BEGINCH(930),ENDCH(1100);
:
: VARS:CH(H),CL(L);
:
: IF TIME = BEGINCH + BARINTERVAL THEN BEGIN
: CH = H;
: CL = L;
: END;
:
: IF TIME >= BEGINCH AND TIME <= ENDCH THEN BEGIN
: IF H > CH THEN CH = H;
: IF L < CL THEN CL = L;
: END;
:
:
: IF TIME > ENDCH THEN BUY AT CH + 1 STOP;
: IF TIME > ENDCH THEN SELL AT CL -1 STOP;
:
: SetExitOnClose;
:
:
|