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

Re: first day of the month



PureBytes Links

Trading Reference Links

> Anybody know how to get TradeStation 2000i to buy the first bar of
> every month? 
> The problem is TradeStation 2000i keeps selecting the second day
> (Go figure).
> If DayOfMonth(date)=1 then Buy at open;

TS system code runs at the ***CLOSE*** of the bar.  So your test 
isn't true until the end of the first day.  Then you buy the NEXT day 
at the open.

Try

if Month(Date) <> Month(Date of next bar) then buy at open;

Gary