Click here to Login





                                                   Dynamic Checklist to Compare Open to yesterday's Close

  0

0
Mark
2010-10-31 09:14:26


Hi,

I wanted to generate a dynamic watchlist by comparing the open price (today's intraday) to yesterday's close.

The formula would be create a watchlist

- for stocks that has a open below yesterday's close
- for stocks that has a open below yesterday's low

and vice versa for stocks that have open price above yesterday's high or close.

Thanks.



QuantShare
2010-11-01 07:02:52

  0

Here are the trading rules:

- stocks that has a open below yesterday's close
open < ref(close, 1)

- stocks that has a open below yesterday's low
open < ref(low, 1)

- stocks that has a open above yesterday's close
open > ref(close, 1)

- stocks that has a open above yesterday's high
open > ref(high, 1)



Mark
2010-11-01 07:33:26

  0

Thanks for the reply.

Actually I tried it earlier and it works very well for EOD data.

What I wanted is to check yesterday's close which is an EOD data to today's open which is intraday data (early in the morning 15 minutes after the market opens). Of course after downloading the latest quotes for the day.

It does not work in this scenario.

The purpose of this is I would like to know 15 minutes after the market open, which stocks have opened below their prior days close.

On a separate note, how do i refer to intraday data in a formula? If i know this I can write the formula myself. With the above trading rules, it takes the open from the last EOD available data and not the intraday data.

I hope I was clear in explaining what I wanted.

Thanks,

Mark



QuantShare
2010-11-01 10:01:20

  0

Best Answer
Ok, first you will need to change the watchlist time-frame to intraday.

Then you can use the following function to get the last day close price from the historical database.
TimeframeGetSeries1(Name(), 1, close, LastData, 1)

- stocks are below yesterday's close
close < TimeframeGetSeries1(Name(), 1, close, LastData, 1)

In intraday data, "open" do not refers to the day's open but to the open of the current bar.
We will create a function that gets today and past days open, high, low and close prices when working with intraday data.

Another solution is to use the following downloader to get the last quotes (historical with 15-minutes delay), and then apply the above rules.
Daily Stock Quotes - Stock Market EOD Data





Daily Stock Quotes - Stock Market EOD Data (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

Mark
2010-11-14 05:40:50

  0

Thanks a ton. I will try it out. Great software. Would love it if this could update the intraday data automatically say every minute or so.

Thanks once again.



Mark
2010-11-14 06:01:58

  0

Thanks once again. I found the trick to get the intraday data automatically from your answer to ezygames query in the forum.

Thanks ... will check out the script performance on Monday.

Regards,

Mark



No more messages
0




Reply:

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"










QuantShare

Trading Items
Simple pattern detection rules using close and open prices
% bars in last N trading days where stock close price increased
Market Rule based on the Crossover Between Stock Close prices and...
VIDYA - Variable Index Dynamic Average
Relative Performance/Return Chart - Compare Several Assets/Stocks

How-to Lessons
How to create a volatility-based Stop - Dynamic stop based on the...
How to create a watchlist
How to download historical EOD data for penny stocks
How to remove a chart pane's margins
How to plot the number of stock tweets per day

Related Forum Threads
How to force simulator to close open positions when data ends?
Setsimtiming -- Buy signal day open and sell signal day close
Open charts in multiple separate windows
MMScript - Exit at the close of a bar
Backtest Buy Open/Sell Close Every Day

Blog Posts
Industry Analysis - How to Compare Stocks with their Industries
Compare stocks and securities by creating a relative performance ...
Dynamic Position Sizing in your Trading System
Compare Multiple Securities in a Single Chart
QuantShare Programming Language Tutorial









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

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
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.