when creating a Strategy that will run in backtest, how would i specify the strategy.isShort / Long lines so that i can enter with 2 Contracts and exit with 1 Contract at one target and the last Contract at the second target
i have tried the following which does not work,
function main(Contracts) {
var Contracts = 2;
Strategy.doLong("Crossing Up", Strategy.CLOSE, Strategy.THISBAR,Contracts);
Strategy.doSell("Sell1", Strategy.CLOSE, Strategy.THISBAR,Contracts/2);
i have tried the following which does not work,
function main(Contracts) {
var Contracts = 2;
Strategy.doLong("Crossing Up", Strategy.CLOSE, Strategy.THISBAR,Contracts);
Strategy.doSell("Sell1", Strategy.CLOSE, Strategy.THISBAR,Contracts/2);
Comment