Rank: Member
Groups: Registered, Registered Users Joined: 3/24/2008(UTC) Posts: 22
|
1) the nr of days macd > than its signal line.
2)the nr of days macd > 0
3)the nr of days close > parabolic stop & reversal (0.2, 0.02)
4)the nr of days ema20 > ema5
5)the nr of days counting backwards from today golden cross(ema20cross over & cut above ema50) has taken place.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/7/2005(UTC) Posts: 602
|
I am assuming "nr" = number so you would want to use the BarsSince() function which gives you the # bars since the function was last true.
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 3/24/2008(UTC) Posts: 22
|
Are these correct? :
barssince(c-sar(0.02,0.2)>0)
barssince((mov(c,26,e))-(mov(c,12,e))>0)
Pls adv
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/7/2005(UTC) Posts: 602
|
Yes, if that is what you are looking for. Now put them in two new indicators and plot them to find out: Like: a1:=barssince(c-sar(0.02,0.2)>0); a1
and b1:=barssince((mov(c,26,e))-(mov(c,12,e))>0); b1
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 3/24/2008(UTC) Posts: 22
|
I have tried above 2 formulae,but do not work.
the chart shows closing price is above sar,yet the result is 0 or the price is below sar,the result is 5 days above sar.
there are even NA
by the way why got na,data explored are > 200days.
it is the same for macd,conflicting & wrong results
any expert can adv futher ?
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.