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 | ||
---|---|---|---|---|
Can someone turn this thinkscript into a ninjascript. 5PM CST OHL and Previous Day
by Option Whisperer
Started by Option Whisperer, Today, 09:55 AM
|
0 responses
2 views
0 likes
|
Last Post Today, 09:55 AM | ||
Started by geddyisodin, 04-25-2024, 05:20 AM
|
8 responses
58 views
0 likes
|
Last Post Yesterday, 10:45 AM | ||
Started by halgo_boulder, 04-20-2024, 08:44 AM
|
2 responses
21 views
0 likes
|
Last Post Today, 09:41 AM | ||
Started by mishhh, 05-25-2010, 08:54 AM
|
19 responses
6,189 views
0 likes
|
Last Post
by rene69851
Today, 09:29 AM
|
||
Started by gwenael, Today, 09:29 AM
|
0 responses
5 views
0 likes
|
Last Post
by gwenael
Today, 09:29 AM
|
Comment