# FinancialData plot that is based on imported CSV data

Is it possible to use the FinancialData such as the PSAR indicator on imported CSV file ?

• Akcmok, welcome to mma.se. Our standard welcome message: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) If you haven't already done so please Take the [tour! ](mathematica.stackexchange.com/tour) ...
– kglr
Commented Jul 6, 2018 at 7:02
• ... 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign!
– kglr
Commented Jul 6, 2018 at 7:02

1. You can use your imported data as input to TradingChart and InteractiveTradingChart as long as its structure conforms to the pattern {datelist, {open, high, low, close, volume}}:
dates = DateRange[{2010, 1, 1}, {2010, 4, 30}];
ohlc = Sort /@ RandomReal[100, {Length@dates, 4}];
ohlc = ohlc[[All, {3, 4, 1, 2}]];
vol = RandomInteger[100, Length@dates];
data = Transpose[{dates, Join[ohlc, List /@ vol, 2]}];

Appearance -> "Line", ImageSize -> 400]


1. You can use a built-in FinancialIndicator function, e.g. "ParabolicStopAndReversal", outside TradingChart or InteractiveTradingChart to create a list that you can use with, say, DateListPlot:

ParabolicStopAndReversal

ClearAll[psar]
psar[a_: .02, b_: .2] := FinancialIndicator["ParabolicStopAndReversal", a, b];
dlp = DateListPlot[{Transpose[{data[[All, 1]], data[[All, 2, 4]]}],
Transpose[{data[[All, 1]], psar[][data]}] },
Joined -> {True, False}, ImageSize -> 400, ImagePadding -> Scaled[.03]];


• kglr, this is of great help Commented Jul 6, 2018 at 6:37
• @Akcmok, glad it was useful. Welcome to mma.se.
– kglr
Commented Jul 6, 2018 at 7:03