hi ahutosh
thanks for your help. it works fine for me now.
Mean while i developed another system with the following conds.
Buy when
RSI( 14 ) < 50, MACD( 12, 26 ) > 0 and
MA( Close , 4 ) > MA( Close , 17 ) and
MA( Close , 17 ) > EMA( Close , 34 ) and
EMA( Close , 34 ) > MA( Close , 50 ); and vice versa for sell.
i developed the afl and am attaching the same with the chart so far i get.
i have taken only buy1 and sell3 to print as i don't know how should i do this.
i need a buy only when all the ma's cond get satisfied or sell only when all fails. kindly see to this and help me ashutosh. hope am not bugging u much.
ramash
thanks for your help. it works fine for me now.
Mean while i developed another system with the following conds.
Buy when
RSI( 14 ) < 50, MACD( 12, 26 ) > 0 and
MA( Close , 4 ) > MA( Close , 17 ) and
MA( Close , 17 ) > EMA( Close , 34 ) and
EMA( Close , 34 ) > MA( Close , 50 ); and vice versa for sell.
i developed the afl and am attaching the same with the chart so far i get.
i have taken only buy1 and sell3 to print as i don't know how should i do this.
i need a buy only when all the ma's cond get satisfied or sell only when all fails. kindly see to this and help me ashutosh. hope am not bugging u much.
ramash
try this for your buy and sell conditions:
Code:
RSI14 = RSI(14);
MACD1226 = MACD(12,26);
MA4 = MA(C, 4);
MA17 = MA(C, 17);
EMA34 = EMA(C, 34);
MA50 = MA(C, 50);
Buy = IIf(RSI14 < 50,IIf(MACD1226>0,IIf(MA4 > MA17,IIf(MA17>EMA34,IIf(EMA34>MA50,1,0),0),0), 0),0);
Sell = IIf(RSI14 > 50,IIf(MACD1226<0,IIf(MA4 < MA17,IIf(MA17<EMA34,IIf(EMA34<MA50,1,0),0),0), 0),0);