PureBytes Links
Trading Reference Links
|
> Has anyone noticed such dramatic inconsistencies from the same
> calculation between indicators and signals? From code that's
> essentially identical?
My immediate suspicion would be different MaxBarsBack settings.
EMAs can take a long time to settle into a stable value. If you
don't have many bars on your chart -- and, for an EMA of length
90, "many" might be 300 or more -- the EMAs might not have
stabilized. If they're working with different starting
conditions due to different MBB settings, that could explain the
different values. You've got 3min day-only data, with 135 bars
per day. How many days are in your chart?
Try lengthening the chart to include, say, 1000 or so bars and
see if the values converge.
Or try making the MBB settings on the indicators & signal
identical. Don't use the "auto-detect" setting on the
indicators, but set it and the signal MBB to a fixed value. This
won't result in "correct" values, but they should all be the
same.
Obviously this could have a big impact on systems and indicators
if you try to run them on short charts -- like, say, a 60min
chart of a 3-month-long futures contract, with only 400-500 bars
in the entire front-contract period, and even less data at the
start of the contract. Continuous data is a better answer, so
the EMAs settle into valid values before the current contract
starts trading.
Because of this settling issue, I often write my signals to start
trading on a particular day, but set up the chart to start well
before that date. That way the signal's EMAs have a chance to
stabilize before I rely on them for trading.
Gary
|