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

Re: Trade Day of the Month EL Programming



PureBytes Links

Trading Reference Links

> I'm looking for a way to code a specific trading day
> of the month into Tradestation. For example, buy bonds
> on the 20 trading day of the month. 

This won't be accurate during the first month on the chart, but after 
that it will be fine.

vars:  TradeDay(0);

{ This Date test isn't necessary for EOD data, but it doesn't hurt }

if Date <> Date[1] then
  if Month(Date) <> Month(Date[1]) 
    then TradeDay = 1
    else TradeDay = TradeDay + 1;

if (whatever) and TradeDay = 20 then ...

Gary