Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Data want;
- set test;
- lagPrice=lag(Price);
- lag10Price=lag10(Price);
- if Price>lagPrice and not missing(lagPrice) then Increasing ++ 1 ;
- else Increasing=0 ;
- if Increasing > 9 then TrendUp=1 ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement