Click here to Login





                                                   MM script: getting Daily prices of index from Intraday Interval

  0

0
Vangelis M.
2013-08-11 19:35:48


I am working on an intraday MM strategy (1 minute interval).
From the MM script I need to check Daily prices of an Index that has only Daily prices.

The idea is that if the index today opens above the index yesterday, then buy at minutes 3, 6 9, etc...). Is that possible?
I tried data.GetPriceSeries("myIndex","close") to no avail.

Thank you,
V.



QuantShare
2013-08-12 12:27:55

  0

Best Answer
You should use the "ParseFormula" function to get daily prices from an intraday strategy:

TimeSeries result = Data.ParseFormula("a = TimeframeGetSeries1('myIndex', -1, close, LastData);").GetTimeSeries("myIndex", "a");




Vangelis M.
2013-08-12 20:50:42

  0

Thank you. That works, but I can only get yesterday's close on the index. Is it possible to get today's close?
Assume we trade at the close of US session, while the index closes with the European session. So by the end of the US session the index has "closed". Can I get that value?

Thanks



QuantShare
2013-08-13 11:18:25

  0

You can use this QS formula to reference past and future bars:

a = timeframedecompress(ref(Timeframecompress(TimeframeGetSeries(-1, close, LastData)), -1));




Vangelis M.
2013-08-16 02:12:06

  0

Works. Thank you. This is what I ended up using:

yesterdayDailyClose = TimeframeGetSeries1('MyDailyIndex', -1, close, LastData,0);
TodayDailyClose = timeframedecompress(ref(Timeframecompress( yest ), -1));



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
Intraday Trading System with Daily Ranking
Combination Element from Lexicographical Index
How far are the close prices from the support line
Intraday Data for Major Stock Exchanges
Accumulation Swing Index

How-to Lessons
How to screen for stocks having a high correlation with the Dow J...
How to hide a trading indicator from a particular time frame
How to generate buy/sell signals from a trading system
How to import trading items from other accounts
How to get trading orders from a portfolio programmatically

Related Forum Threads
Creat a Composite Index from few stock symbol
Script to remove Symbols from an Index
Historical intraday data for the AEX index
Access intraday data while working on daily chart
Daily Beta Intraday

Blog Posts
4 Links to Download Free Historical Stock Prices Data by Date
Diversify your portfolio by investing in stocks from various indu...
4 different weighted index calculation methods
How to Backtest an Intraday Stock Trading System with EOD Ranking
Backtesting trading strategies using intraday data









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.