crossover system filtered by daily impulse system
Author: jsinjur
Creation Date: 8/11/2011 8:00 PM
profile picture

jsinjur

#1
When I use this program on wealth-lab pro, it shows green lines where clearly the macd histogram shows downward movement. I am trying to only use the impulse system. Have I done something wrong or is it because by implementing the crossover system, it changes the results?
profile picture

Eugene

#2
For example?
profile picture

jsinjur

#3
Thanks for getting back. Here are two quick examples.

ANF turns green on 8-8, green on 8-9, 8-10, yet EMA goes from 70.53 on 8-8, to 69.87 on 8-9, and 69.27 on 8-10

SM turns green on 8-8, still green on 8-9, and 8-10. MACD is -.76 on 8-8, then -.93 on 8-9, and -1.04 on 8-10

Thanks again
Joe
profile picture

Eugene

#4
Although our MACD-H numbers are in agreement on this chart of SM, I fail to see what turns green here?



If you're talking about the 08/11 bar, there's nothing wrong with it. EMA is greater than previous day's EMA, MACD is above previous day's MACD = green bar.
profile picture

jsinjur

#5
Eugene:

On Fidelity Active Trader Pro charts, I show EMA for SM at 76 on 8-10 (red), 76.16 on 8-11 (green).

On Wealth-lab pro charts, I show EMA for SM at 77.05 on 8-8 (red), 76.52 on 8-9 (green), 76 on 8-10 (green) and 76.15 on 8-11 (green).
profile picture

Eugene

#6
Joe,

A good question contains half the answer as they say. How on Earth would I know that for whatever reason, you're comparing an otherwise fine WLP's EMA to EMA in a totally different software, be it ATP, eSignal, Metastock or whatever? :) It could have been a good idea to formulate your question accordingly, like "ATP EMA numbers different from WLP" rather than picking an arbitrary strategy.

Comparing apples to oranges makes no sense as WLP and ATP are different. EMA is an unstable indicator, and I'm sure you'll get a solution after:

1. Reading the WealthScript Programming Guide (Help menu) > Indicators > Stability of indicators
2. Reviewing your data loading settings in both WLP and ATP.

Good luck!
profile picture

jsinjur

#7
We can let this go but the question remains. Just using wealth-lab pro, the ema for SM was down from 8-8, to 8-9, to 8-10 (77.05-76.52-76) yet the line for impulse turned green on 8-9 and remained green 8-10.

I also see results for the MACD that do the same, MACD declining yet the impulse line turns green. Previous example ANF, macd goes from -.93 to -1.23 to -1.44 yet line turns green.These are wealth-lab pro numbers.
profile picture

Eugene

#8
Do not just let this question go please: stability of indicators is a key concept that explains many such disparities.

What kind of "impulse line turning green" should I be looking for? I fail to find an "impulse line" in my code. On the other hand, a bar might be colored green like on my screenshot above, if you mean that. When a bar is green, it does so only when it should:
QUOTE:
Just using wealth-lab pro, the ema for SM was down from 8-8, to 8-9, to 8-10 (77.05-76.52-76) yet the line for impulse turned green on 8-9 and remained green 8-10.

As I already explained, EMA is greater than previous day's EMA, MACD is above previous day's MACD = green bar. It's the movement on 8-10 to 8-11 that counts. This is the reason why something turns green: the code looks at the penultimate bar (bar-1) and the current bar (bar).
profile picture

jsinjur

#9
I am starting to believe that I am interpreting the chart wrong. As I said in my original question, I trade Elders Impulse system. To date, I manually look at the MACD and EMA to come up with my daily read (ATP). I began to use the Elder Impulse chart on StockCharts.com but noticed the strategy on Wealth lab using the words Impulse System. When I read your code I saw the use of MACD and EMA with daily lines changing green, red, I assumed you were replicating Elders system (but adding the sma crossover).

Yesterday, when I reviewed charts (StockCharts) I saw buy signals. I reviewed those new signals with my ATP numbers and compared them to Wealth-lab. In doing so, I discovered that wealth-lab had shown buy signals days before any indication on other sites. On other stocks, wealth-lab was showing buys where other mediums did not indicate any buy signals. I am new to wealth-lab and was confused by the discrepancy. That is what I was questioning.

Thanks for your help.
Joe
profile picture

Eugene

#10
Joe,

I have no idea which exact rules you're following but the rules implemented in my code are all open and documented. I believe they were derived, as usually, from the original author's text. Please take a chance to read the WealthScript code, strategy description (if available) and the TSL article.
profile picture

jsinjur

#11
I have read all that you mentioned (the author text, the strategy description and the article). I do not know code but have seen the references. The strategy is simple. If the 13-day ema is rising (a reading today higher than yesterday) and the MACD is rising (I use the histogram, a reading higher than yesterday, a long position is taken. When either of those two indicators turn down (an ema reading lower or a macd histogram reading that is lower) the postion is liquidated. I am referencing long positions only. the opposite would be for short positions. For some reason the indicator on the wealth-lab charts shows different results than either ATP or StockCharts. I do not know why but I look at the wealth-lab charts and see a lower ema yet the line is green or I see a lower macd histogram reading yet the line is still green. I am stumped. Thanks for trying to explain.

joe
profile picture

Eugene

#12
At Wealth-Lab charts, everything is correct. For one reason of possible differences with other systems, please refer to the Programming Guide chapter.