Help with buy, sell rule in Amibroker

mrm

New Member
#1
Please help,
I have this buy sell rules
Long = Diff>0 AND Ref(Diff,-1)<0;
Shrt = Diff<0 AND Ref(Diff,-1)>0;

BuyPrice = ValueWhen(Long,High+0.01,1);
SellPrice = ValueWhen(Long | Shrt,Low-0.01,1);

Buy = Cross(High,BuyPrice) AND Diff>0;
Sell = Cross(SellPrice,Low);

Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
I need to change this to buy and sell at closing price of the day
Anybody know how to do it?
Thank you