See below the reply that I got on this from Neil Singer after asking the same question as a sequel in the discussion titled "Choose dates dynamically with a slider?". Both programs turn out to work beautifully.
Laurens,
Your posted code did not have matching delimiters but I got the same behavior (once fixing it) because the FinancialData call is time consuming.
I fixed it one way (the easy way --- but more limiting) with this code by using a Manipulate.
Manipulate[
ListLinePlot[FinancialData[p, {2017, 10, 1}][[All, 2]]], {p, "ge"},
ControlType -> InputField]
You can use Dynamic directly but you must handle more details this way:
DynamicModule[{p, plotfun, plot}, p = "ge";
plotfun[a_, b_] :=
plot = ListLinePlot[FinancialData[a, {2017, 10, 1}][[All, 2]]];
plotfun[p, p];
Column[{InputField[Dynamic[p, {Automatic, plotfun}], String],
Dynamic[plot]}]]
The way this works is to make the variables p, plotfun (the function for plotting), and the plot itself local . This is so we do not mess with global variables (although you can make them global if you want). I define a function to make the plot called "plotfun" so I can call it two times -- once at initialization so we start with a default plot and once in operation. Note that I used String as the second argument to InputField so we do not need to deal with the quotation marks. I use the optional arguments to Dynamic {fstart,f,fend}. Read about these but I defined them to be {Automatic, plotfun} -- during editing the inputfield MMA automatically updates the variable "p" but at the end (when you hit tab or return) it runs the function "plotfun" (which updates our plot --- only once!!! so we do not bring the machine to its knees repeatedly getting financial data.
Regards
Neil