Today’s Chart: FBIO

<![CDATA[ https://cdn.plot.ly/plotly-latest.min.js
https://cdn.rawgit.com/etpinard/plotlyjs-finance/master/plotlyjs-finance.js
http://stocktwits.com/addon/widget/2/widget-loader.min.js

Today’s Chart: FBIO

The chart of $FBIO is generated using the Plot.ly JS library and RapidMiner Studio. This is a daily chart from 2015-10-18 to 2016-04-18. For further news, please visit StockTwits for this symbol or follow me on StockTwits.

StockTwits

STWT.Widget({container: ‘stocktwits-widget-news’, symbol: ‘FBIO’, width: ‘700’, height: ‘380’, limit: ’15’, scrollbars: ‘true’, streaming: ‘true’, title: ‘FBIO Ideas’, style: {link_color: ‘4871a8’, link_hover_color: ‘4871a8’, header_text_color: ‘000000’, border_color: ‘cecece’, divider_color: ‘cecece’, divider_color: ‘cecece’, divider_type: ‘solid’, box_color: ‘f5f5f5’, stream_color: ‘ffffff’, text_color: ‘000000’, time_color: ‘999999’}});

function makeplot() {
Plotly.d3.csv(“/public/autocharts/FBIO_2016-04-18_data.csv”, function(data){ processData(data) } );
};

function processData(allRows) {

console.log(allRows);
var data_open = [], data_close = [], data_high = [], data_low = [], dates = [];
for (var i=0; i<allRows.length; i++) {
row = allRows[i];
data_close.push(parseFloat(row['close']));
data_high.push(parseFloat(row['high']));
data_low.push(parseFloat(row['low']));
data_open.push(parseFloat(row['open']));
}
makePlotly( data_open, data_close, data_high, data_low );
}

function makePlotly( data_open, data_close, data_high, data_low ){
var data_dates = getAllDays('2015-10-18', '2016-04-18');

var fig = PlotlyFinance.createCandlestick({
open: data_open,
high: data_high,
low: data_low,
close: data_close,
dates: data_dates
});

fig.layout.title = 'Daily Stock Chart';

fig.layout.annotations = [
{
text: "FBIO Stock",
x: '-0.05',
y: 0.5,
xref: 'paper',
yref: 'paper',
font:{
size: 18
},
showarrow: false,
xanchor: 'right',
textangle: 270
}
];

Plotly.newPlot('myDiv', fig.data, fig.layout);
};

// Utility Function to generate all days
function getAllDays(start, end) {
var s = new Date(start);
var e = new Date(end);
var a = [];

while(s < e) {
a.push(s);
s = new Date(s.setDate(
s.getDate() + 1
))
}

return a;
};

makeplot();
]]>

%d bloggers like this: