It worked ! Thanks a lot . :)

On Tue, Jun 14, 2011 at 8:15 PM, G See <gsee000@gmail.com> wrote:

> You probably need to specify an endDateTime since it has been expired every
> day for the last 5 days!  ;-)
>
> This works:
> WPRO <- reqHistoricalData(tws, t, bar="1 min",dur="5 D",
> endDateTime='20110501 15:00:00')
>
>
>
> On Tue, Jun 14, 2011 at 9:36 AM, G See <gsee000@gmail.com> wrote:
>
>> Sorry, the file has nothing to do with it it.  It works for daily data,
>> but not intra-day.
>>
>>
>> On Tue, Jun 14, 2011 at 9:31 AM, G See <gsee000@gmail.com> wrote:
>>
>>> hmmm. It works for me if I don't specify a file, but not if I do.
>>>
>>> t <-
>>> twsFUT(symbol="WPRO",exch="NSE",expiry="201105",currency="INR",include_expired="1")
>>> > tws <- twsConnect()
>>> > WPRO <- reqHistoricalData(tws, t)
>>> > WPRO <- reqHistoricalData(tws, t)
>>> TWS Message: 2 -1 2104 Market data farm connection is OK:usfuture
>>> TWS Message: 2 -1 2104 Market data farm connection is OK:usfarm
>>> TWS Message: 2 -1 2106 HMDS data farm connection is OK:ushmds2a
>>> waiting for TWS reply on WPRO ...... done.
>>> > head(WPRO)
>>>            WIPRO11MAYFUT.Open WIPRO11MAYFUT.High WIPRO11MAYFUT.Low
>>> 2011-05-16             442.00             444.80            435.45
>>> 2011-05-17             436.15             440.40            435.40
>>> 2011-05-18             439.50             450.00            439.30
>>> 2011-05-19             445.75             448.15            440.00
>>> 2011-05-20             443.10             448.50            439.55
>>> 2011-05-23             446.00             446.00            436.00
>>>            WIPRO11MAYFUT.Close WIPRO11MAYFUT.Volume WIPRO11MAYFUT.WAP
>>> 2011-05-16              439.30               559500           438.745
>>> 2011-05-17              439.50               556500           437.825
>>> 2011-05-18              445.75               785000           446.845
>>> 2011-05-19              443.10               349500           442.960
>>> 2011-05-20              446.00               412000           445.020
>>> 2011-05-23              441.00               407000           438.995
>>>            WIPRO11MAYFUT.hasGaps WIPRO11MAYFUT.Count
>>> 2011-05-16                     0                 956
>>> 2011-05-17                     0                 952
>>> 2011-05-18                     0                1424
>>> 2011-05-19                     0                 647
>>> 2011-05-20                     0                 792
>>> 2011-05-23                     0                 723
>>>
>>> #######################
>>>
>>>  WPRO <- reqHistoricalData(tws, t, file="Wipro.csv",bar="1 min",dur="5
>>> D")
>>> waiting for TWS reply on WPRO ....failed.
>>> Warning message:
>>> In errorHandler(con, verbose, OK = c(165, 300, 366, 2104, 2106,  :
>>>   Historical Market Data Service error message:HMDS query returned no
>>> data: WIPRO11MAYFUT@NSE Trades
>>>
>>> -Garrett
>>>
>>>
>>> On Mon, Jun 13, 2011 at 11:44 PM, Gautam Garg <gautam20feb@gmail.com>wrote:
>>>
>>>> Thanks that helped but now it is giving another error.
>>>>
>>>> here is the code:
>>>>
>>>>
>>>> t<-twsFUT(symbol="WPRO",exch="NSE",expiry="201105",currency="INR",include_expired
>>>> = '1')
>>>> >        WPRO <- reqHistoricalData(tws,t ,file="Wipro.csv" ,bar="1 min",
>>>> > dur="5 D")
>>>> TWS Message: 2 -1 2104 Market data farm connection is OK:hkfarm
>>>> waiting for TWS reply on WPRO ......failed.
>>>> Warning message:
>>>> In errorHandler(con, verbose, OK = c(165, 300, 366, 2104, 2106,  :
>>>>   Historical Market Data Service error message:HMDS query returned no
>>>> data:
>>>> WIPRO11MAYFUT@NSE Trades
>>>>
>>>> Is it something to do the ticker?
>>>>
>>>> --
>>>> View this message in context:
>>>> http://r.789695.n4.nabble.com/problem-with-getting-Historical-data-for-futures-using-I-Brokers-package-tp3593480p3595654.html
>>>> Sent from the Rmetrics mailing list archive at Nabble.com.
>>>>
>>>> _______________________________________________
>>>> R-SIG-Finance@r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>>>> -- Subscriber-posting only. If you want to post, subscribe first.
>>>> -- Also note that this is not the r-help list where general R questions
>>>> should go.
>>>>
>>>
>>>
>>
>


-- 
-
Gautam Garg
3rd Year student
Integrated M.tech in Mathematics and Computing
IIT Delhi
gautam20feb@gmail.com
Ph. no. - 9312777431

	[[alternative HTML version deleted]]

