Hellow, herewith i am keeping the code, i do not know why this is not working. Request for help
buy = cross(MA(c,10),MA(c,30));
sell = cross(MA(c,30),MA(c,10));
buy = ( MA(C,10) == MA(c,30) and close > MA(c,30));
Sell = ( MA(C,10) == MA(c,30) and close < MA(c,30));
The first buy is working fine, but second one is not working. Am i missing something? I want to explore where MA10 & MA30 are equal ( or about cross) & price is above/below MA30.
Many thanks in advance
I agree with Peter, it will not happen many time when use MA. But if you use ichimoku system, this condition happen many a times. Its called swardsen ie two componnets of ichimoku ie tenkensen(TL) & kijunsen(KL) move up or down together when trend is very strong & also it stays for long without crossing. In ichimoku terms, let me put the question here so that one can understand & help me.
Hi, I tried this, it should work but invain, can anybody help me please
Buy1 = IIf(TenkanSen == KijunSen AND Close > KijunSen,1,0 );
Sell1 = IIf(TenkanSen == KijunSen AND Close < KijunSen,1,0 );
In otherwords,
buy1 = iif(MA(c,10) == MA(c,30) and close > MA(c,30),1,0);
Sell1 = iif(MA(c,10) == MA(c,30) and close < MA(c,30),1,0);