Can anyone tell me why this will not trigger any trades?...
ill add other stuff later, what i want right now is just to buy when a W4 is labeled, and Sell when a W5 is labeled...
I can put return "This is a Wave 4" where the Strategy code is, and it will show when the bar is moused over...
if (study.getValue(GetElliottStudy.MOSTRECENTWAVE) == 4) {
if (!Strategy.isLong) {
Strategy.doLong("", Strategy.OPEN, Strategy.NEXTBAR, 100);
Strategy.setStop(low(Math.abs(GetElliottStudy.MOST RECENTWAVEBARINDEX)));
}
} else if (study.getValue(GetElliottStudy.MOSTRECENTWAVE) == 5) {
if (Strategy.isLong) {
Strategy.doSell("", Strategy.CLOSE, Strategy.THISBAR, 100);
}
}
Thanks
ill add other stuff later, what i want right now is just to buy when a W4 is labeled, and Sell when a W5 is labeled...
I can put return "This is a Wave 4" where the Strategy code is, and it will show when the bar is moused over...
if (study.getValue(GetElliottStudy.MOSTRECENTWAVE) == 4) {
if (!Strategy.isLong) {
Strategy.doLong("", Strategy.OPEN, Strategy.NEXTBAR, 100);
Strategy.setStop(low(Math.abs(GetElliottStudy.MOST RECENTWAVEBARINDEX)));
}
} else if (study.getValue(GetElliottStudy.MOSTRECENTWAVE) == 5) {
if (Strategy.isLong) {
Strategy.doSell("", Strategy.CLOSE, Strategy.THISBAR, 100);
}
}
Thanks
Comment