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

Re: Coding Question entries today



PureBytes Links

Trading Reference Links

Roger,

Without bothering to find out why your code isn't working from the code portions you have provided, here's something that I use and it works just fine:

if(Cond1 and Cond2 and ...... and EntriesToday(Date) < MaxEntriesInADay) then
begin
Buy ...
Sell ...
end;

MaxEntriesInADay is set to 1 in this case.

Abhijit


Roger Shepherd wrote:

Hello List,
I have an intraday strategy that I want to be able to take multiple
trades but never more than 1 trade per day. I am using a
variable Tradestoday to keep track of whether a trade has
taken place today. The variable should return 0 if no
trades have taken place so far today. I have tried the
following, neither of which works.

Trgtdate = date;
Tradestoday = EntriesToday(TRGTDATE);

or

If Entrydate(0) = Date then Tradestoday = 1 else Tradestoday =
0;

any help would be greatly appreciated.