Continuing my effort. I've made a lot of progress. I put a selected column name in my formula and can now make an overlay graph of the selected column with its Moving Average using MA parameters from a dialog box. Nice. Very nice. I'm using the "Overlay Plot" function. I can modify all the points on both graphs, but cannot figure out how to modify just one of the plot's attributes.
Here's a code snippet to illustrate. This works:
cn1 = colName || "";
cn2 = colName || " Moving Average";
dt << New Column( colName || " Moving Average",
Numeric,
Formula( Eval( Parse( formulaString ) ) )
);
oc = Column( cn1 );
nc = Column( cn2 );
nw2 << Close Window;
funny = Overlay Plot( Y( oc, nc ), );
funny << (Connect Points( 1 ));
The resulting plot has both the MA and original points connected.
However, if I change the last line to modify just one of the plots, say, this, it doesn't work:
funny << oc( Connect Points( 1 ) );
No points are connected.
So, "oc" is recognized in the "Overlay Plot" function to be one of the Y columns, but not recognized in the above statement.
Can someone help please? My mental health is at stake.:) I've attached a data table with my whole script embedded. There is an additional small auto-generated script to make the plot the way I'd like the whole script to make it; I could only make this plot by manually changing the legend.
Kevin