PureBytes Links
Trading Reference Links
|
Thanks for that Nevi
Greg
-----Original Message-----
From: nevi [mailto:nevi@xxxxxxx]
Sent: October 30, 2009 5:13 AM
To: gh
Cc: omega-list@xxxxxxxxxx
Subject: Re: EL Help please - make a signal work on all bars of a given day.
Hello gh,
Looks like you need to insert a variable to hold the buycondition open
vars: signal(0);
IF Month(date) <> Month(date[1]) then begin
if Buycondition then signal=1;
if Sellcondition then signal=-1;
end;
if signal=1 then begin
buy next bar at Price stop;
end;
if signal=-1 then begin
sell next bar at Price stop;
end;
best regards
nevi
g> I need help with a signal please.
g> on intraday trading, a specific day to trade is picked out by a function
g> which is intended to work on daily data.
g> then the entry signal only works on the second bar.
g> is there some code to make the signal work on the rest of the bars of
g> the day?
g> for instance, for the first day of the month, using
g> IF Month(date) <> Month(date[1]) then ---
g> will only enter on one bar if the condition happens to occur, but not
g> when the condition occurs during the rest of the day.
g> the if statement is only true for that second bar.
g> Thanks.
g> Greg Hunt
02:51:00
|