[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EL Help please - make a signal work on all bars of a given day.


  • Date: Fri, 30 Oct 2009 03:13:25 -0600
  • From: nevi <nevi@xxxxxxx>
  • Subject: Re: EL Help please - make a signal work on all bars of a given day.

PureBytes Links

Trading Reference Links

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