Buy on Wednesday
Author: Beta4
Creation Date: 11/14/2008 7:43 AM
profile picture

Beta4

#1
Hi!
Im trying to make a strategy that buy on an specific day of the week. How could I program this?

This is the code I have:

var Bar: integer;

for Bar := 20 to BarCount - 1 do
begin
if not LastPositionActive then
{ Entry Rules }
begin
if friday then
BuyAtClose;

end
else
{ Exit Rules }
begin
if monday then
SellAtMarket;

end;
end;

----------------

Doesn't undestand Friday or monday. There is some way to program it?

Thank you very much
profile picture

Eugene

#2
Please note this forum is intended to discuss Wealth-Lab.NET. For WL4 there's a separate forum.

WLD4: see the QuickRef for DayOfWeek.

WLD5:

CODE:
Please log in to see this code.
profile picture

Beta4

#3
Thank you very much,
and sorry, i didn't saw there was a separate Wealth-Lab 4 forum.

This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).