Click here to Login

                                                   Access all the elements of a custom db during screening


2010-09-30 04:33:54

I want to access the last 4 data elements from a custom database. I am currently using GetData and ref(GetData, -1) does not work.

2010-09-30 04:50:21


In "ref" function negative values in the argument refer to future bars; you should use 1 instead.

To get the previous value:
ref(GetData("database", "field"), 1)

2010-09-30 05:03:01



My custom database is loaded with quarter ending rather than every bar. Is there any way I can access the past quarter data? I am currently using 64, 128 and 192.

2010-09-30 05:19:16


Yes it is possible but it requires a custom indicator. I will create and upload one for you tomorrow.

2010-10-01 05:47:47


Best Answer
Here is your trading indicator: Lagged Data From a Custom Database

Lagged Data From a Custom Database (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 Notes Report an item

No more messages


No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"


Trading Items
Lagged Data From a Custom Database
Adaptive Trading System - Percent Winning Trades for the Last N-D...
Trading Rules based on the Relative Strength Index - RSI Indicato...
Stocks with the highest Volume Increase
Average Performance of a trading rule during that past N days

How-to Lessons
How to quickly select stocks based on the last value of a databas...
How to add custom position-based metrics to your trading system
How to dynamically change the number of positions in a portfolio?
What is the Bookmark Panel?
How to improve the performance of QuantShare databases?

Related Forum Threads
Can you access custom functions from the downloader script events...
How do I find the close price for an entry matching a custom DB
Plotting the data from custom -Intraday data base
Custom Exits in the QS Rules Analyzer
How to import the list of of all mutual funds tickers?

Blog Posts
Create custom metrics for the statistical data analysis tool
Custom Shortcuts - Move a Chart to Display the Last Quotes/Data
The custom trading indicators tool explained
Screening with the composite indicators
Introduction to the Events Monitor Tool

Create an account
Affiliate Program
Contact Us
Trading Forum
How-to Lessons
About Us
Terms of Use

Copyright 2020
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Follow us on Google+
RSS Trading Items

Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.