You are searching about How To Create A Formula Without Using A Function, today we will share with you article about How To Create A Formula Without Using A Function was compiled and edited by our team from many sources on the internet. Hope this article on the topic How To Create A Formula Without Using A Function is useful to you.

How to Use MetaStock’s Reference Function

The MetaStock reference function is one of the most used functions, because it allows us to refer to the value of any expression, or selected ‘data array’, even if it is future or future periods.

It is important to note that if you use the reference function to refer to a future period it is obviously dynamic, meaning it can change. So be careful when using it in system tests, as it can produce misleading results.

MetaStock Syntax: Ref (Data series, Period)

Data array = The data array value that will be returned from ‘x’ number of times in the past.

Period = This specifies how many periods forward or backward to reference the data row value. A negative number will represent a value in the past, while a positive number will represent a value in the future.

Here’s how it would look in an example. The following formula describes yesterday’s closing price:

Ref(C,-1)

In the MetaStock formula above:

Data series = C

Period = -1

Here’s how you would use the formula in a more useful application of this example:

C> Ref(C,-1) AND Ref(C,-1)>Ref(C,-2)

This MetaStock formula states that the closing price of the current period should be above the closing price of the previous period; and the closing price from the previous period must be greater than the closing price from the period before that. In this example, we have used the closing price as the data set, but you can use almost any function or indicator.

Another common application of the reference function is to accurately define peaks and troughs, without using the peak and trough functions within MetaStock. A simple definition of a peak is a bar that has had 2 previous periods with lower highs and 2 subsequent periods with lower highs. Using the reference function, we can correctly code as follows:

H>Ref(H,-1) AND Ref(H,-1)>Ref(H,-2) AND H>Ref(H,1) AND Ref(H,1)>Ref(H,2)

Note that since we are using a positive application of the Reference function (denoted by ‘H> REF(H,1)’), the signal only appears after the event has passed. In other words, you only know that a peak has occurred after it has occurred.

If you are new to the MetaStock formula then this may seem complicated or complicated but once you ‘get it’ you will understand why it is used by many professional traders.

Video about How To Create A Formula Without Using A Function

You can see more content about How To Create A Formula Without Using A Function on our youtube channel: Click Here

Question about How To Create A Formula Without Using A Function

If you have any questions about How To Create A Formula Without Using A Function, please let us know, all your questions or suggestions will help us improve in the following articles!

The article How To Create A Formula Without Using A Function was compiled by me and my team from many sources. If you find the article How To Create A Formula Without Using A Function helpful to you, please support the team Like or Share!

Rate Articles How To Create A Formula Without Using A Function

Rate: 4-5 stars
Ratings: 3417
Views: 31989113

Search keywords How To Create A Formula Without Using A Function

How To Create A Formula Without Using A Function
way How To Create A Formula Without Using A Function
tutorial How To Create A Formula Without Using A Function
How To Create A Formula Without Using A Function free
#MetaStocks #Reference #Function

Source: https://ezinearticles.com/?How-to-Use-MetaStocks-Reference-Function&id=2173233

Có thể bạn quan tâm: