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

Re: Coding Question entries today



PureBytes Links

Trading Reference Links

Hi Roger

use UserFunction


{Function: TradesTodayIES }
If Date <> Date[1] and Time < Time[1] then Value3 = 0; { reset at beginning
of day }
Value1 = TotalTrades + CurrentEntries; { closed out + open trades }
Value2 = Value1 - Value1[1]; { change in relation to previous bars value1 }
Value3 = Value3 + Value2;
TradesTodayIES = Value3;


It will give you the number of Trades for the day.


Greetings from Austria
Robert


----- Original Message ----- 
From: "Roger Shepherd" <mailrs@xxxxxxxxxx>
To: "Omega list" <Omega-list@xxxxxxxxxx>
Sent: Wednesday, December 15, 2004 6:30 PM
Subject: Coding Question entries today


> 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.
>
>
> -- 
> Best regards,
>  Roger                          mailto:mailrs@xxxxxxxxxx
>
>