Any Help out there available?
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Need help coming up with a solution
Collapse
X
-
Need help coming up with a solution
I want create a Sentiment indicator for day trading, that uses a set number of stocks and compares them with each other. But I want to upload the list of stocks from a File, do not really care about the extension. The reason for this is that the list may change from Broker to broker. I want to put it into an array in order to work with them. This is to use it in an automatic strategy or another indicator
Any Help out there available?Tags: None
-
Hello Yandychang,
Thank you for your post.
You can take a look at our reference sample for reading from a file at the following link: http://www.ninjatrader.com/support/f...ead.php?t=3476
Please let me know if I may be of further assistance.
-
Hello
Thanks for your help. Do i need to " Add( instruments, period types, index)" all of the symbols from the txt Files? If yes, can it be done from a For cycle in the initialize method? Or would i need to do them one by one, it would deffeat the purpose of the txt file
Comment
-
Originally posted by Yandychang View PostThanks for your help. Do i need to " Add( instruments, period types, index)" all of the symbols from the txt Files? If yes, can it be done from a For cycle in the initialize method? Or would i need to do them one by one, it would deffeat the purpose of the txt file
Comment
-
Hello
I need a few of them, because I want to compare their price to the beginning of the day. and it needs to be statistically significant. So, let me see If I got it right, I only Load the File once on FirstBarOfSession. then, I do a loop and Add all the instruments to a DataSeries. Now, is That's During initialize. ? Would that bring me any problems when running the script.?
Comment
-
Originally posted by Yandychang View PostI need a few of them, because I want to compare their price to the beginning of the day. and it needs to be statistically significant. So, let me see If I got it right, I only Load the File once on FirstBarOfSession. then, I do a loop and Add all the instruments to a DataSeries. Now, is That's During initialize. ? Would that bring me any problems when running the script.?
Comment
-
Hello
Got it to open the txt file... but Right after it starts the while loop... at the level of the String[] Split is throws an exception... I created the attached TXT file. it does not seem to be reading the Characters into a full string... I copied the code from the sample you sent me to... but might have I made a mistake. Can you see an error?
Comment
-
Originally posted by Yandychang View PostGot it to open the txt file... but Right after it starts the while loop... at the level of the String[] Split is throws an exception... I created the attached TXT file. it does not seem to be reading the Characters into a full string... I copied the code from the sample you sent me to... but might have I made a mistake. Can you see an error?
Comment
-
OK
Thank you very, its seems to be debugged, the entire Initialize Method runs well. I appreciate your help. I have been trying to write this for a long time now... Thank you...
Comment
-
Comment
-
Originally posted by Yandychang View PostGuys Im having to Debug my OnBarUpdate Method. It seems to work Up to the point Highlightted in blue and attached is the error I get, Apparently I get a result out of range specifically on bar 20... any errors you might see?
Comment
-
Hello
I fixed the 1 and changed it to a zero, the other value in the loop i, is less than i... i returns the amount of symbols I have on the file i read, the actual value is 55... I think I found where My error is... I need to do a CurrentBar for All my BarArrays... I did an
(if Currentbars[a]< BarsRequired Return) inside a loop for my 55 instruments, then I come up with the issue i'm having now... it seems like my BarsArray[1] does not receive values . Because its CurrentBars[0] Value is always -1, while BarsArray[0] CurrentBars[0] value changes up to 1640s. so it constantly loops and returns at BarsArray[1]. I am actually running the indicator and everytime a new bar forms it gives me my Print Message I put to debug it. when I try to pull up the instrument that gives me the CurrentBars[]=-1 the chart is blank,so maybe the error is not on the programming side, maybe is from the data feed...
Comment
-
Originally posted by Yandychang View PostI fixed the 1 and changed it to a zero, the other value in the loop i, is less than i... i returns the amount of symbols I have on the file i read, the actual value is 55... I think I found where My error is... I need to do a CurrentBar for All my BarArrays... I did an
(if Currentbars[a]< BarsRequired Return) inside a loop for my 55 instruments, then I come up with the issue i'm having now... it seems like my BarsArray[1] does not receive values . Because its CurrentBars[0] Value is always -1, while BarsArray[0] CurrentBars[0] value changes up to 1640s. so it constantly loops and returns at BarsArray[1]. I am actually running the indicator and everytime a new bar forms it gives me my Print Message I put to debug it. when I try to pull up the instrument that gives me the CurrentBars[]=-1 the chart is blank,so maybe the error is not on the programming side, maybe is from the data feed...
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Lele2k24, Yesterday, 11:24 AM
|
10 responses
31 views
0 likes
|
Last Post Today, 01:04 PM | ||
Started by Padan, Today, 02:02 AM
|
7 responses
19 views
0 likes
|
Last Post Today, 12:59 PM | ||
Started by Adam Klaus, 03-26-2024, 07:43 PM
|
2 responses
22 views
0 likes
|
Last Post
by mcosta72
Today, 12:54 PM
|
||
Started by spottysallrite, Today, 11:31 AM
|
4 responses
10 views
0 likes
|
Last Post Today, 12:53 PM | ||
Started by cozypinto, 12-22-2023, 10:13 AM
|
4 responses
94 views
0 likes
|
Last Post
by Harvard
Today, 12:50 PM
|
Comment