In my strategy I use the following buy signal:
BuyAtLimit(bar , Close[bar], "BuySignal");
This always buys on the next days bar at the open price. Is there a way to get this to buy at the closing price of the current day?
Size:
Color:
To buy at the closing price, you could simply use
BuyAtClose.
QUOTE:
This always buys on the next days bar at the open price.
Can you post an example?
Size:
Color:
Of course it will buy at the open if Close > Open, but it's not doing it on the next bar; you're doing it on this bar.
BuyAtLimit(bar , Close[bar], "BuySignal"); is a mistake.
You must code it as BuyAtLimit(bar + 1, Close[bar], "BuySignal"); otherwise it's peeking.
Size:
Color: