Hi,
I am new to AFL and would request help regarding the following condition:
I want a buy signal every time:
a. EMA 5 does a +ve cross over EMA 20 provided:
b. EMA 20 is greater than EMA 50
c. Both MACD(12,26) line and signal(12,26,9) line are above 0
d. MACD line is above signal line
Following is my AFL. Unfortunately does not generate results in the backtest for the period HCLTECH in the last 1 year
Please advice
Buy = Cross(EMA(Close, 5) , EMA(Close, 20))
AND EMA(Close, 20) > EMA(Close, 50)
AND MACD( 12, 26 ) > 0
AND Signal( 12, 26, 9) > 0
AND MACD( 12, 26 ) > Signal( 12, 26, 9);
Sell = Cross (0, MACD( 12, 26 ))
OR Cross (0, EMA(MACD( 12, 26 ),9))
OR Cross (Signal( 12, 26, 9), MACD( 12, 26 ));
Thanks!
I am new to AFL and would request help regarding the following condition:
I want a buy signal every time:
a. EMA 5 does a +ve cross over EMA 20 provided:
b. EMA 20 is greater than EMA 50
c. Both MACD(12,26) line and signal(12,26,9) line are above 0
d. MACD line is above signal line
Following is my AFL. Unfortunately does not generate results in the backtest for the period HCLTECH in the last 1 year
Please advice
Buy = Cross(EMA(Close, 5) , EMA(Close, 20))
AND EMA(Close, 20) > EMA(Close, 50)
AND MACD( 12, 26 ) > 0
AND Signal( 12, 26, 9) > 0
AND MACD( 12, 26 ) > Signal( 12, 26, 9);
Sell = Cross (0, MACD( 12, 26 ))
OR Cross (0, EMA(MACD( 12, 26 ),9))
OR Cross (Signal( 12, 26, 9), MACD( 12, 26 ));
Thanks!