![]() ![]() If[currentPrice = $Failed || historicalPrice = $Failed ||ĬurrentPrice = Missing || Some very very basic code to get you started: StartDate = DatePlus, ], $Failed] You need a construction to repeat the calculations for every NYSE member.Also, when current price is between your two signals the program provides conflicting advice. You might think of selling when prices are historically high, but you're doing it when they are above the historic low watermark. I don't think your buy and sell signals are very smart.Though it is allowed to start a variable with an uppercase letter you better avoid doing that in order to prevent using Mathematica's own keywords (which all start with an uppercase letter).You are also trying to average the dates and find their standard deviation. The data you receive from some of the calls include both prices and dates.a*b, a b, a 2, 2 a and 2a (without a space) are all correct multiplications. An asterisk for multiplication is unnecessary.You may suppress output using ' ' (which also acts to separate compound statements) You probably don't want to see all the output of all the lines.The earlier date calculation can be better done with the dedicated DatePlus function, which takes things like leap years etc. ![]() The ,False part in If and the next line is unnecessary and can be deleted here.You probably don't intend to have these brackets there *2, and the one following it contain function call brackets without corresponding function names. You say you've been "scouring the internet for help" but did you tried Mathematica's on-board documentation center? It has thousands pages of help, just one key press away. Very brave to jump straight in the deep waters, but I'd suggest trying to learn the basics first.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |