Click here to Login

Trading Software Trading objects Features How-to Blog Search



Anchored Indicator

by The trader, 780 days ago
Share |

This function calculates the number of bars, value, sum, average and rate of return of a specified vector and using reference points. For example, if you use the rate of return indicator (ROC), the function accepts as input a vector and a lookback period (number of bars). If we choose 10 as lookback period and we are in the bar number 20, we then will calculate the rate of return using the current bar (20) and the bar number (10). On the next bar (21), the reference bar will move also to the bar number (11).
This function instead uses a fixed reference bar. This fixed reference bar is calculated using a rule you provide as an input to the function.

Let us say, you want to use a fixed bar that is calculated using the following rule: rsi(14) > 70. The bars where the RSI rule is met will be chosen as reference bars. Therefore, the lookback period used to calculate the ROC will change and will not be fixed as it is using the standard functions. Each time the rule is met the lookback period will be re-initialized (set to zero).

The function has three inputs: The rule used to calculate the reference point, the vector to use for the calculation, and a string that defines the type of calculation that will be made.
The third input can accept the following values:
nb: Calculates the number bars
value: Calculates the value of the provided vector on the bar the last time the rule was true
sum: Calculates the sum
avg: Calculates the average
roc: Calculates the rate of return

-----
Example: anchor(rsi(14) > 70, 1, 'nb');

This function will calculate the number of bars since the RSI rule was true.
In this particular case, the function could be translated to: barssince(rsi(14) > 70);


Share This ->
Share |


You have to log in to bookmark this object
What is this?
Additional Information



>>>> More trading objects? click here to search for trading sytems, downloaders, screens, custom drawing tools, indicators... by country, market or style.

>>>> To get this item and hundreds of other items, click here to join and download the Best Trading Software for Free .



No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Write a review no reviews Number of downloads 3 downloads Notes Report an item


Type: Trading Indicator

Object ID: 301


Country:
All

Market: All

Style:
Technical Analysis




Related Trading Objects



Country
Page 1
Trading the Equity Curve
by QuantShare, uploaded several months ago


No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 4 Notes Report an item
Opening Range Breakout Indicator
by QuantShare, uploaded several months ago
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 3 Notes Report an item
Wilder's Smoothing - Moving Average
by QuantShare, uploaded several months ago
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 9 Notes Report an item
Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object









Join now
and get instant access for free to the trading software, the Sharing server and the Social network website.
Click here


Related objects

Empty

Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object

Technical Analysis


Fundamental Analysis


Forum Threads



Random Blog Posts

How scripts communicate with each other

How to simulate options strategies

Organizing Trading Objects

Creating a download item: Initial Jobless Claims

How to search for a download item

Trading orders - Part 2

Trading Orders - Part 1

The average maximum drawdown metric

Show All

Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object






QuantShare
Product
QuantShare
Features
Create an account
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2012 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items