Hi,
I am trying to create my first strategy which is practically a direct copy of the turtle rules. Got to start somewhere!
I think I have nearly completed a first draft however I'm having a little trouble with the exit part e.g.;
I'm struggling with profitable exits which should exit on a 10 day high/low.
Does any one have any ideas how i do this?
Here is my attempt;
Is there an error on the 2nd line after the OR symbol?
Any help will be appreciated.
Thanks
I am trying to create my first strategy which is practically a direct copy of the turtle rules. Got to start somewhere!
I think I have nearly completed a first draft however I'm having a little trouble with the exit part e.g.;
I'm struggling with profitable exits which should exit on a 10 day high/low.
Does any one have any ideas how i do this?
Here is my attempt;
PHP Code:
if (Strategy.isLong() == true && (Strategy.isInTrade() == true));
if (low() <= nStopLevelLong) ||
if (low(-1) >=vDonchExitLong.getValue (DonchianStudy.LOWER, -1) && low() <vDonchExitLong.getValue (DonchianStudy.LOWER)) {
Strategy.doSell("Sell", Strategy.LIMIT, Strategy.THISBAR, Strategy.ALL, nStopPriceLong);
}
Any help will be appreciated.
Thanks
Comment