Did we drop the RSI and put the MACD in its place? Unless I am reading this wrong. the coding is refering that the Stochastics were dropped. If not, I apologize. I think I am spiraling into an abyss here.
[PHP]//long cci
if (cci1 < cciL && cci0 > cciL ) a1= +1;
//short cci
if (cci1 > cciS && cci0 < cciS ) a1= -1;
//long rsi
if (rsi1 < rsiL && rsi0 > rsiL ) a2= +1;
//short rsi
if (rsi1 > rsiS && rsi0 < rsiS ) a2= -1;
//long stoch
if (sto1 < stochL && sto0 > stochL ) a3= +1;
//short stoch
if (sto1 > stochS && sto0 < stochS ) a3= -1;
//long macd
if (macd1 < macdL && macd0 > macdL ) a4=+1;
//short macd
if (macd1 > macdS && macd0 < macdS ) a4=-1;
//BackTest code by Alexis
if(Strategy.isLong()==false&&a1+a2+a3==+3 && dir == -1)
Strategy.doLong("Long",Strategy.CLOSE, Strategy.THISBAR);
if(Strategy.isShort()==false&&a1+a2+a3==-3 && dir == +1)
Strategy.doShort("Short",Strategy.CLOSE, Strategy.THISBAR);
//long signal = +3?
if(a1+a2+a4==+3 && dir == -1) onAction11();
//short signal = -3?
if(a1+a2+a4==-3 && dir == +1) onAction14();
[PHP]//long cci
if (cci1 < cciL && cci0 > cciL ) a1= +1;
//short cci
if (cci1 > cciS && cci0 < cciS ) a1= -1;
//long rsi
if (rsi1 < rsiL && rsi0 > rsiL ) a2= +1;
//short rsi
if (rsi1 > rsiS && rsi0 < rsiS ) a2= -1;
//long stoch
if (sto1 < stochL && sto0 > stochL ) a3= +1;
//short stoch
if (sto1 > stochS && sto0 < stochS ) a3= -1;
//long macd
if (macd1 < macdL && macd0 > macdL ) a4=+1;
//short macd
if (macd1 > macdS && macd0 < macdS ) a4=-1;
//BackTest code by Alexis
if(Strategy.isLong()==false&&a1+a2+a3==+3 && dir == -1)
Strategy.doLong("Long",Strategy.CLOSE, Strategy.THISBAR);
if(Strategy.isShort()==false&&a1+a2+a3==-3 && dir == +1)
Strategy.doShort("Short",Strategy.CLOSE, Strategy.THISBAR);
//long signal = +3?
if(a1+a2+a4==+3 && dir == -1) onAction11();
//short signal = -3?
if(a1+a2+a4==-3 && dir == +1) onAction14();
Comment