Translate from Metastock: Compare DataSeries
Author: novaege
Creation Date: 3/4/2011 4:22 AM
profile picture

novaege

#1
Hi all,

Is there a function to compare tow DataSeries object.
For example in metastock
CODE:
Please log in to see this code.
profile picture

Eugene

#2
What do you mean by comparing two DataSeries? What makes sense is to compare their values at some bar.

Re: Metastock PREV statement --

How to program MetaStock's PREV function in Wealth-Lab?
profile picture

novaege

#3
Hi,

Some trading systems require the closing price to be above two different moving averages to return a valid buy signal.
I want to implement something like that.
profile picture

Eugene

#4
Based on your description, no PREV is required. It's very easy to do even using the Rule Wizard. Insert an entry signal, then go to Conditions, expand "Moving Average", drag and drop (or double click on) "Price is above moving average" twice, selecting a different MA for each Condition.

In the end, you'll get something like this:
CODE:
Please log in to see this code.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).