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

Day of Week Code



PureBytes Links

Trading Reference Links

Can anyone help with some DayofWeek code?

I'd like to buy at open and sell at the close of a certain day of the 
week. 
So, using Monday as an example,  considering that Easy Language only allows
market orders to be placed for the *next* bar and that the "next bar" could
be a Tuesday or even a Wednesday.
 , the obvious way around this is to write:

If DayofWeek(Date)=5 and DayofWeek(Date of next bar)=1 then buy next bar
at open;

But if I consider a second series of data (example t-bond or Bund, data
2) and insert a line like this:

If close data2 > open data2 and DayofWeek(Date)=5 and DayofWeek(Date of
next bar)=1 then buy next bar at open;

It appears an error message like this: "Cannot mix next bar prices with
data streams
other than data1"



Is there any way around this?

Thanks

Alessandro