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

Re: Coding Question entries today



PureBytes Links

Trading Reference Links

Another Solution: value1 = ExitsToday(date);

The ExitsToday function returns the number of strategy position exits that
occurred throughout the date specified by the input parameter Date0.

The ExitsToday function only works in Strategies, and will not work in any
other indicator or analysis technique study type. The function is limited to
looking back 10 positions, so the maximum number of ExitsToday that could be
reported is 10, if there were 10 entries today.

Usage
ExitsToday(TargetDate_YYYMMDD)

Returns (Integer)
A numeric value for a target date.

Parameters
      TargetDate_YYYMMDD
     A numeric date value. This is the target date, entered in the format
"YYYMMDD" or a date related function or calculation.


Remarks
The input parameter Date0 can be a constant value like such as 1020601
(6-1-2002), where 102 = 2002, 103 = 2003, 99 = 1999, and so on. It can also
reference date related keywords like Date, (which returns the current bar
date), and CurrentDate, (which returns the datafeed date.)

Examples
Assigns to Value1 the number of exits throughout each day on the chart:

Value1 = ExitsToday (Date);

Assigns to Value1 the number of exits throughout the current day only and
then checks for three exits:

Value1 = ExitsToday (CurrentDate);

if Value1 = 3 then .

----- Original Message ----- 
From: "RU" <ru@xxxxxxxxxxxxxx>
To: "Roger L. Shepherd" <mailrs@xxxxxxxxxx>; "Omega list"
<Omega-list@xxxxxxxxxx>
Sent: Thursday, December 16, 2004 10:45 AM
Subject: Re: Coding Question entries today


> 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
> >
> >
>