Problem with greater then function

hansgust

Newbie
Messages
4
Likes
0
Hi
I have a problem with Metastock. I’m trying to create a highlight to show when Mov(ADXR(14), 100, e) sloping upwards and its greater than last value. I have tried Mov(ADXR(14), 100, e) > Prev, but the whole chart stays true.
What’s wrong? How do I solve this problem?

Best regards
 
Hi hansgust,

To solve this problem you will need to use the "Ref" function.

Ref(Data Array,Periods)

Therefore your code to create the highlight will look like this:-

Mov(ADXR(14),100,E)>Ref(Mov(ADXR(14),100,E),-1);

When using the Ref function -1 references yesterdays bar.
 
Top