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

Re: using tomorrow's data



PureBytes Links

Trading Reference Links

Hello Paul,
This code is from TS4 so the word exitlong may be different in TS5.

You can add dayofweek(date)<>2 to stop trades on tuesday,
if dayofweek(date)=5 and dayofweek(date)<>2 then buy next bar at market;
if marketposition(0)=1 then exitlong this bar on close;

this code does not give me an error when the last bar is a friday so
you shouldn't need any lastbaronchart code.
It appears traders2traders is for sale so I can send you the Anyohlc
dll if you want it, although I haven't used it I believe it can
reference both bars-back and bars-forward.

Nevi

P> Hi All,
P> I'm using TS2000i and I want to find out what happens on a particular
P> day. Eg: are Monday's up or down?
P> Normally I would write a system
P> If DOW(today) = 5 {Friday} then buy next bar on open.
P> Exitlong MOC
P> The problem is if Monday is a holiday then the results would include
P> some Tuesday data.
P> I want to create a system where....
P> If lastbaronchart = false then begin {so I don't produce an error on the
P> last bar}
P> If DOW(tomorrow) = 1 {monday} then buy tomorrow's open
P> Exitlong @ tomorrow's close
P> How would I code this up?
P> I tried to download AnyOHLC.zip from traders2traders but that site's
P> database
P> wasn't working and I'm not sure if it can reference tomorrow's date either?
P> Regards,
P> Paul