Realtime data NOW,ODIN,TradeTiger,Google,Yahoo > AmiBroker, Fcharts, Qtstalker

Status
Not open for further replies.

josh1

Well-Known Member
Josh1 sir,

Thank you for your free utility, I am able to get RT data to amibroker, but the problem is the NSE NOW often disconnects and reconnects due to that the excel file freezes and when i again start the RT data to Amibroker it starts as fresh then in between data vanishes, is there any solution for this problem.
Excel file freezes if it cannot connect with Yahoo or Google. Say "No" to that option in RT31.xlsm or RTG31.xlsm whichever you are using. There is no impact of NSENOW disconnecting. You will have to backfil whenever data vanishes.

Change your ISP (internet Service Provider). Use an internet connection that does not break down frequently. If ISPs in your area are not You can use 2G connection or even FWP connection from Tata or Reliance will do.
 

sr114

Well-Known Member
Excel file freezes if it cannot connect with Yahoo or Google. Say "No" to that option in RT31.xlsm or RTG31.xlsm whichever you are using. There is no impact of NSENOW disconnecting. You will have to backfil whenever data vanishes.

Change your ISP (internet Service Provider). Use an internet connection that does not break down frequently. If ISPs in your area are not You can use 2G connection or even FWP connection from Tata or Reliance will do.
Joshi

the default time lag is 3 sec. for a decent market watch of max 6 scrips can this delay be brought down to 1.5 sec without hampering the efficient working of RT3/RTG3/RTG31?

sr
 

josh1

Well-Known Member
Joshi

the default time lag is 3 sec. for a decent market watch of max 6 scrips can this delay be brought down to 1.5 sec without hampering the efficient working of RT3/RTG3/RTG31?

sr
It has to be in multiple of seconds. Half second cannot be configured. You can reduce interval to 2 and 1 second. It will work efficiently if you configure RAM disk. You may change setting and try yourself. Code is open
 

josh1

Well-Known Member
like we can see 30days tick/tick price change in TT, if we can store the data some were in ami, next time we open the ami we can see the last 30+ days data and live market ,,
You have to bakfill from TT for 30 days TICK data. Export data from TT and import in Amibroker.
Otherwise update for 30 days and you will have your own database.
 

mrkanitkar

Well-Known Member
Hi Josh,
This is for Metastock code, which you helped. It works for one script but when I add more, it gives generate following csv. I think we need to add some code to write next symbol on next line. Something is missing. Can you please help?
Here is output.
------------
TICKER,PER,DATE,TIME,OPEN,HIGH,LOW,CLOSE,VOLUME,OPEN INTEREST
SILVERM12AUGFUT,I,20120714,14:00:00,52819,52819,52819,52819,0,287345,
SILVERM12AUGFUT,I,20120714,14:00:00,52819,52819,52819,52819,0,287345,GOLD12AUGFUT,I,20120714,13:59:59,29272,29272,29272,29272,0,15218,
SILVERM12AUGFUT,I,20120714,14:00:00,52819,52819,52819,52819,0,287345,GOLD12AUGFUT,I,20120714,13:59:59,29272,29272,29272,29272,0,15218,SILVERMIC12AUGFUT,I,20120714,14:00:00,52831,52831,52831,52831,0,150826,
SILVERM12AUGFUT,I,20120714,14:00:00,52819,52819,52819,52819,0,287345,GOLD12AUGFUT,I,20120714,13:59:59,29272,29272,29272,29272,0,15218,SILVERMIC12AUGFUT,I,20120714,14:00:00,52831,52831,52831,52831,0,150826,COPPER12AUGFUT,I,20120714,14:00:00,426.15,426.15,426.15,426.15,0,29564,
SILVERM12AUGFUT,I,20120714,14:00:00,52819,52819,52819,52819,0,287345,GOLD12AUGFUT,I,20120714,13:59:59,29272,29272,29272,29272,0,15218,SILVERMIC12AUGFUT,I,20120714,14:00:00,52831,52831,52831,52831,0,150826,COPPER12AUGFUT,I,20120714,14:00:00,426.15,426.15,426.15,426.15,0,29564,CRUDEOIL12AUGFUT,I,20120714,13:59:57,4833,4833,4833,4833,0,609500,
SILVERM12AUGFUT,I,20120714,14:00:00,52819,52819,52819,52819,0,287345,GOLD12AUGFUT,I,20120714,13:59:59,29272,29272,29272,29272,0,15218,SILVERMIC12AUGFUT,I,20120714,14:00:00,52831,52831,52831,52831,0,150826,COPPER12AUGFUT,I,20120714,14:00:00,426.15,426.15,426.15,426.15,0,29564,CRUDEOIL12AUGFUT,I,20120714,13:59:57,4833,4833,4833,4833,0,609500,CRUDEOIL12JULFUT,I,20120714,13:59:58,4790,4790,4790,4790,0,2157200,
SILVERM12AUGFUT,I,20120714,14:00:00,52819,52819,52819,52819,0,287345,GOLD12AUGFUT,I,20120714,13:59:59,29272,29272,29272,29272,0,15218,SILVERMIC12AUGFUT,I,20120714,14:00:00,52831,52831,52831,52831,0,150826,COPPER12AUGFUT,I,20120714,14:00:00,426.15,426.15,426.15,426.15,0,29564,CRUDEOIL12AUGFUT,I,20120714,13:59:57,4833,4833,4833,4833,0,609500,CRUDEOIL12JULFUT,I,20120714,13:59:58,4790,4790,4790,4790,0,2157200,ZINCMINI12JULFUT,I,20120714,13:59:48,103.5,103.5,103.5,103.5,0,7299,
SILVERM12AUGFUT,I,20120714,14:00:00,52819,52819,52819,52819,0,287345,GOLD12AUGFUT,I,20120714,13:59:59,29272,29272,29272,29272,0,15218,SILVERMIC12AUGFUT,I,20120714,14:00:00,52831,52831,52831,52831,0,150826,COPPER12AUGFUT,I,20120714,14:00:00,426.15,426.15,426.15,426.15,0,29564,CRUDEOIL12AUGFUT,I,20120714,13:59:57,4833,4833,4833,4833,0,609500,CRUDEOIL12JULFUT,I,20120714,13:59:58,4790,4790,4790,4790,0,2157200,ZINCMINI12JULFUT,I,20120714,13:59:48,103.5,103.5,103.5,103.5,0,7299,ZINC12JULFUT,I,20120714,13:59:57,103.45,103.45,103.45,103.45,0,18340,
SILVERM12AUGFUT,I,20120714,14:00:00,52819,52819,52819,52819,0,287345,GOLD12AUGFUT,I,20120714,13:59:59,29272,29272,29272,29272,0,15218,SILVERMIC12AUGFUT,I,20120714,14:00:00,52831,52831,52831,52831,0,150826,COPPER12AUGFUT,I,20120714,14:00:00,426.15,426.15,426.15,426.15,0,29564,CRUDEOIL12AUGFUT,I,20120714,13:59:57,4833,4833,4833,4833,0,609500,CRUDEOIL12JULFUT,I,20120714,13:59:58,4790,4790,4790,4790,0,2157200,ZINCMINI12JULFUT,I,20120714,13:59:48,103.5,103.5,103.5,103.5,0,7299,ZINC12JULFUT,I,20120714,13:59:57,103.45,103.45,103.45,103.45,0,18340,NATURALGAS12JULFUT,I,20120714,13:59:58,158.7,158.7,158.7,158.7,0,11212500,
SILVERM12AUGFUT,I,20120714,14:00:00,52819,52819,52819,52819,0,287345,GOLD12AUGFUT,I,20120714,13:59:59,29272,29272,29272,29272,0,15218,SILVERMIC12AUGFUT,I,20120714,14:00:00,52831,52831,52831,52831,0,150826,
--------
1. Next symbol quotes are written on same line
2. I think data is getting appended in csv instead start with blank, not sure as markets are close now.

Thanks in advance.
 

josh1

Well-Known Member
Hi Josh,
This is for Metastock code, which you helped. It works for one script but when I add more, it gives generate following csv. I think we need to add some code to write next symbol on next line. Something is missing. Can you please help?
1. Next symbol quotes are written on same line
2. I think data is getting appended in csv instead start with blank, not sure as markets are close now.

Thanks in advance.
I wondered where you vanished.

Yes!!! Next Symbol line in Excel is getting appended to the first line. :lol:
We have to initialise the variable "S" after every Symbol.
In subroutine MakeCSV()
After this line in code -- For r = 7 To Range("A65536").End(xlUp).Row

Add this line -- S = ""

Euverything will work fine. Let me know when you succeed. We shall host the utility on 4shared or you can do it and give a link here. You may also start a separate thread for Metastock. This one does not contain Metastock in the Heading.

Please Note:- The files created by asc2ms.exe are in Metastock format. They can be read by AmiBroker.

Database setting will be like this -- In the configure plugin window, give the folder where you are creating MS files. Intraday auto refresh to be checked. You can use same set of files for both MS and Ami
 
Last edited:

mrkanitkar

Well-Known Member
I am here only. :rofl:
Here is update.
Please find new code below. The problem is
1. If you add -- S = "" on next line, it gives compiler error.
2. If you add on same line, it writes nothing in csv file, excel launch Amibroker and excel crashes after 1 min.
Please let me know.
----------
Sub MakeCSV()

Dim fs As Object, a As Object, y As Object, C As Integer, i As Integer, r As Integer, S As String, t As Variant, CellValue As String
'Create a file object for writing
Set fs = CreateObject("Scripting.FileSystemObject")
On Error Resume Next
MkDir ("C:\RT") 'This will create a folder RT in C Drive.
FileName = "C:\RT\MyCSVMS.txt" 'This file is used to write quotes
Set a = fs.CreateTextFile(FileName, True) 'Here we create the file MyCSV.csv

If NSENOW = "Yes" Then
a.writeline "TICKER,PER,DATE,TIME,OPEN,HIGH,LOW,CLOSE,VOLUME,OPEN INTEREST"
MyBook.Sheets("Now").Select 'Selects sheet containing quotations

For r = 7 To Range("A65536").End(xlUp).Row
-- S = ""
C = 1
While Not IsEmpty(Cells(r, C))
If C = 1 Then
CellValue = Cells(r, C).Value & ",I," & Format$(Date, "yyyymmdd") ' ' (Insert comma and I after ticker name)
ElseIf C = 3 Then 'Insert Last Traded Price 4 times for O,H,L,C
CellValue = Cells(r, C).Value & "," & Cells(r, C).Value & "," & Cells(r, C).Value & "," & Cells(r, C).Value
ElseIf C = 4 Then
CellValue = Cells(r, C).Value - Vol(r, 1)
Vol(r, 1) = Cells(r, C).Value

' Debug.Print Cells(r, 1).Value & " - " & CellValue & " - " & Vol(r, 1)
Else
CellValue = Cells(r, C).Value '
End If

' CellValue = Cells(r, C).Value '
S = S & CellValue & "," 'Add contents of current cell to string 's' and a comma
C = C + 1
Wend
a.writeline S 'write line
Next r
End If
------------
 
Status
Not open for further replies.

Similar threads