Can a value be added to or subtracted from Strategy arguments? For example;
var vSpread = .10;
Strategy.doLong("Long", Strategy.CLOSE + vSpread, Strategy.THISBAR);
To properly represet buy orders which take the offer and sell orders which hit the bid, the script needs to account for the spread. To do that, can the value returned to the backtester by the Strategy.CLOSE argument be affected by inserting "+ vSpread" or "- vSpread"?
var vSpread = .10;
Strategy.doLong("Long", Strategy.CLOSE + vSpread, Strategy.THISBAR);
To properly represet buy orders which take the offer and sell orders which hit the bid, the script needs to account for the spread. To do that, can the value returned to the backtester by the Strategy.CLOSE argument be affected by inserting "+ vSpread" or "- vSpread"?
Comment