PureBytes Links
Trading Reference Links
|
Mark,
Why would I want to provide all those parameters to TW.CalcFormula for
a moving average of closes. You specify close twice, along with unrelated
items such as volume, open interest, high, etc. This makes the code for a
simple moving average of closes very non-intuitive and unecessarily complex
for the task, at hand. I understand your comment regarding consistency
between different types of moving average calculations but your syntax looks
ugly considering the simplicity of what is being performed.
I am also puzzled why the parameter order in part reads hi,lo,open,close.
I usually see the order open,hi,low,close. Is this a new standard??
Chris Norrie
> In TraderWare this is how a simple moving average is plotted as an
> indicator. While it looks more complicated that in easy language "it is
> not".
SNIP
> mb
>
>
> ========================
>
> Sub IndicatorEntry()
>
> 'Calculate a 5 period simple moving average of the closing price
> Call TW.CalcFormula("MOV(c,5,s)", twDate, twHigh, twLow, twOpen, twClose,
> twOpenInterest, twVolume, twResults, twDates, twValid)
>
> 'Plot the result
> Call TW.PlotIndicator(twPanelID, twName, twStyle, twDates, twResults,
> twValid, twColor)
>
> End Sub
>
> =========================
|