Many thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Historical data
Collapse
X
-
Historical data
Hi there, I am new to Ninja. I have just worked out how to upload 1min historical data in USDCHF which uploaded successfully, using the suggested format. I am now trying to link the master instrument code to this data so that I can plot my chart and then apply my strategy. Can anyone please tell me how to link my data to the master instrument please...
Many thanksTags: None
-
Hello,
Thanks for your forum post.
Can you please rephrase what it is your trying to do and where your at so that I may further assist.
What data feed provider are you connected too or are you importing data in manually.
If you inport data this will show up under the instrument name you imported.
Can you pull the data up in a chart?
Finally, What do you refer to with Master Instrument code? Are you trying to run an automated strategy?
I look forward to assisting you further.
-
Following on from earlier i realise that i wasn't very clear...ok
What I am trying to do is to format the historic data that I have which looks like this:
USDCHF,20010102,230100,1.5989,1.5990,1.5988,1.5988 ,4
USDCHF,20010102,230200,1.5988,1.5988,1.5988,1.5988 ,4
USDCHF,20010102,230300,1.5990,1.5991,1.5990,1.5991 ,4
USDCHF,20010102,230400,1.5991,1.5991,1.5991,1.5991 ,4
USDCHF,20010102,230500,1.5991,1.5991,1.5990,1.5990 ,4
And I am trying to put it into a format that Ninja can read. I have managed to put some of it into Notepad using the script below, the only thing is I can't manage to replace the commas above with ";". If you can shed some light so I can format my data so I can then start building my strategies i'd be hugely greatful...or otherwise tell me I am completely wrong...:-) Many thanks
vPathToFileIn = "C:\EURUSD2.txt"
vPathToFileOt = "C:\$EURUSD2.txt"
'rename the output file to the standard Ninja Trader file name, then Import
Dim oFSO, oFileIn, oFileOt, vLineIn, vLineCnt, vLineOt
'get link to file system support
Set oFSO = CreateObject("Scripting.FileSystemObject")
'open both files (in and out)
Err = 0
Set oFileIn = oFSO.OpenTextFile(vPathToFileIn, 1) '1=read
Set oFileOt = oFSO.CreateTextFile(vPathToFileOt, True) 'true=overwrite
If Err <> 0 Then
Wscript.Echo "Error on file open: " & Err.Number & ", " & Err.Description
Wscript.Echo "stopping"
Wscript.Quit
End If
'
'do the reformat
'input format
'EURUSD,20010102,230100,0.9507,0.9507,0.9507,0.950 7,4'
'output format
'20090819 230600;1.4225;1.4225;1.4223;1.4224;171100000
vLineCnt = 0
Do Until oFileIn.AtEndOfStream
vLineIn = ""
vLineIn = oFileIn.ReadLine
vLineCnt = vLineCnt + 1
'if vLineCnt > 10 Then Exit Do
vLineOt = ""
vLineOt = Mid(vLineIn,8,8) & " " 'date
vLineOt = vLineOt (vLineIn,17,22) & "." 'time
vLineOt = vLineOt & Mid(vLineIn,18,99) 'O,H,L,C,V
'Wscript.Echo "about to write: " & vLineOt
Err = 0
oFileOt.WriteLine(vLineOt)
If Err <> 0 Then
Wscript.Echo "Error on file write: " & Err.Number & ", " & Err.Description
Wscript.Echo "stopping"
Wscript.Quit
End If
Loop
'
'close the files
oFileIn.Close
oFileOt.Close
'
'tell user count and quit
Wscript.Echo "transferred " & vLineCnt & " lines. stopping now."
Wscript.Quit
'
' **************************** END OF SCRIPT ******************************************
Comment
-
Hello,
Thanks for that clarification.
So your unable to import in the historical data since its in the wrong format. In this case you would need to fix the market errors so that it looks like this:
Unfortunately how you specifically do this is outside the level of support I would be able to provide but it looks like your on the right track. You would need to use some sort of batch editor to change the data into a format NinjaTrader can read.
Let me know if I can be of further assistance.
Comment
-
Sorry to be a bother and I know this probably isn't the right section to ask this
but I have no where else to ask this...
For the life of me, I cannot figure out how to create a new post.
I would like to open a new discussion for an issue I am having.
I can only find how to Reply to existing posts.
Please help. Thank you.
Comment
-
Hello,
When you are in a section that you can post just like you can see the Post Reply button here you will see a new thread button in the same spot.
If you are still having trouble email me at support at ninjatrader dot com and let me know your question and I can help from their also.
I look forward to assisting you further.
Comment
-
Hi again, Sorry but I still can't seem to locate a section that has "new thread" button.
I did read somewhere that I may have to have permission to post a new thread.
Could it be that I need permission? which may be why the button is not displaying?
You referred to "section" (see below) Maybe you could send me a link to a section that displays the "New Thread" button? Then I can take from there. I'm sure this should be pretty straight forward, I am very computer savy, this is really embarrassing. Thanks again for your assistance.
When you are in a section that you can post just like you can see the Post Reply button here you will see a new thread button in the same spot.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Yasharandom, Today, 07:45 AM
|
0 responses
5 views
0 likes
|
Last Post
by Yasharandom
Today, 07:45 AM
|
||
Started by llanqui, Yesterday, 09:59 AM
|
4 responses
24 views
0 likes
|
Last Post
by llanqui
Today, 07:22 AM
|
||
Started by smartromain, 03-13-2024, 01:42 AM
|
5 responses
96 views
0 likes
|
Last Post
by AndreiBig
Today, 06:08 AM
|
||
Started by Noerclou, Today, 04:55 AM
|
0 responses
5 views
0 likes
|
Last Post
by Noerclou
Today, 04:55 AM
|
||
Started by ThoriSten, Today, 03:56 AM
|
0 responses
6 views
0 likes
|
Last Post
by ThoriSten
Today, 03:56 AM
|
Comment