Programming a stock charting program with CodePen has not been without errors.
My program (here), appears to be encountering an error with running both the Finance API (Finnhub.io) and P5.
Particularly, only the finance API’s code is run when both P5 (added independently using the option) and the finance API are called within the program.
Comments have been marked within the code, which you can view using the ‘view in editor’ option.
Solving my problem would enable me to use JSON data from the finance API’s function call in my p5 sketch to generate the placement of the stock candle tickers. Now, the P5 sketch simply does not even appear.
Any and all help with this will be greatly appreciated.
Since my last problem was solved, I have made progress on the stock candlestick charting program.
Currently, I am encountering a problem when calculating the y-axis indicators. Specifically, it appears that the program is iterating a for loop without properly calling the values of variable ‘window.yAxisAutoRange’.
Careful observation shows however (as per the sketch and console) that a successful full iteration of the loop is completed and presumably returns the intended results.
Thanks to all in advance for any help with my problem discerning why I am receiving a NaN value.
Ryan
*The code is quite long, so I have linked the online editor page I am working on.
EDIT: I should note, I also experience an error whereby I am prompted a number of two times for what I programmed as a single prompt function. Any help with that matter would be greatly appreciated as well.