I am making a Tradingchart
with data returned from Financialdata
. I find I cannot add a line to the chart by giving the option Epilog
. (For example, to draw a line from the 1st day to the 50th day.) So which coordinate shall I tell Epilog?
data = FinancialData["SP500", "OHLCV", {2014, 1, 1}];
TradingChart[data,
{Style[FinancialIndicator["SimpleMovingAverage", 5], Blue],
Style[FinancialIndicator["SimpleMovingAverage", 20], Red],
Style[FinancialIndicator["Volume"], Black],
Style[FinancialIndicator["MACD"], {Green, Purple}]},
Epilog -> Line[{data[[1]], data[[50]]}]]
When I tried this, it doesn't work. Anybody have some ideas?
TradingChart
. So, the plot coordinates are not the same as the final coordinates which is whereEpilog
operates. I'm not sure if there is a straightforward way to accomplish this. $\endgroup$