Need AFL code for when MA cross EMA

#1
1 Startegy -

We have EMA =80 and MA =30
Plot buy signal once MA cross EMA from down to upwards
Plot sell signal once MA cross EMA from upward to downward
 
#3
Actuly I want to scan stock where current closing is above 20 SMA and all the previous 5 or 7 closing of this stock was below 20 SMA. in short this i want to scan the stock whos closing has been above 20 SMA and this has happen after previos 7 or 5 closing was below 20 SMA

Please provide this AFL i am dam sure this system will show the wonders
 

colion

Active Member
#4
Actuly I want to scan stock where current closing is above 20 SMA and all the previous 5 or 7 closing of this stock was below 20 SMA. in short this i want to scan the stock whos closing has been above 20 SMA and this has happen after previos 7 or 5 closing was below 20 SMA

Please provide this AFL i am dam sure this system will show the wonders

buy = c > ma( c, 20 ) and sum( c < ma( c, 20 ), 7 ) == 6;
 

Similar threads