Discussions
»
Product and Service Development
»
Formula Assistance
»
How to achieve consistant MACD crossovers [RESOLVED]
Rank: Newbie
Groups: Registered, Registered Users Joined: 2/5/2006(UTC) Posts: 2
|
Hello,
Please execus this v. simple question; I am running an exploration to find the macd cross over it's trigger, but not getting consistant results when verifying with chart. The syntax am using is:
Cross(MACD(), Mov( MACD(),9 ,E ))
Sometimes I get 1 day delay.
Thanks vm
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
VM
Load at least 150 bars to get accurate results from MACD explorations. Any function using an exponential moving average (including those with Wilders Smoothing such as RSI and ADX) needs much more data than that provided by a "Minimum Records" setting. As a rule of thumb I suggest using at least 5 times more data than the longest EMA "periods" parameter - 5x26=130 for MACD.
Roy
MetaStock Tips & Tools
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 2/5/2006(UTC) Posts: 2
|
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 11/11/2005(UTC) Posts: 12 Location: INDIA
|
Hi...... vm/Roy
does the exploration using the crossover formula generate weekly sell signal also.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Views messages in topic : 2,995
Was thanked: 14 time(s) in 10 post(s)
|
anejanitin-
If you run the exploration on weekly data, you will get a weekly signal.
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 11/11/2005(UTC) Posts: 12 Location: INDIA
|
dear gs
the MACD crossover exploration run on weekly data is generating incorrect signals.
When these buy or sell signals are compared to weekly MACD CHARTS, they
reflect different values.
This makes these explorations misleading & erroneous.
How do i rectify this.
i generally load 250 or more records while running these explorations
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Views messages in topic : 2,995
Was thanked: 14 time(s) in 10 post(s)
|
Well, I'd follow Roy's advice about the 5X rule above... maybe you need more than 250 records. Just for the heck of it, try 500 or more. Are your results still inaccurate? How are you determining that the results are inaccurate. If you plot your criteria as an indicator, is the MACD correct then? Can we narrow this down to an Exploration-only problem?
Give us a security and your Exploration code here... let's see if we can sort throught it with you.
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 11/11/2005(UTC) Posts: 12 Location: INDIA
|
What to say of 500 loading even 1000 records doesn't work.
ok let's start with the exploration formula being used by me.
it follows
CALCULATION PARAMETERS
Periodicity : Weekly
COLUMN FORMULAS
Column A : Close
CLOSE
Column B : MACD
macd()
Column C : Previous MACD
ref(macd(),-1)
Column D : Mov Ave
mov(macd(),9,EXPONENTIAL)
Column E : Previous Mov Ave
ref(mov(macd(),9,EXPONENTIAL),-1)
Column F : % above
((macd() - mov(macd(),9,EXPONENTIAL))/abs(mov(macd(),9,EXPONENTIAL))) * 100
FILTER FORMULA
Filter Enabled: Yes
Formula:
when(macd(),>,mov(macd(),9,EXPONENTIAL)) AND when(ref(macd(),-1),
<,ref(mov(macd(),9,EXPONENTIAL),-1))
This exploration is being applied for weekly data.
The formula used in MACD indicator is same as included by Equis in Metastock.
Now it is here where the inconsistency begins...
The values generated by the above exploration are different from the values
that MACD indicator generated when applied choosing the weekly data and hence
difference in signals.
Further i observe no difference in the MACD formula & exploration except the
periodicity to which it is applied.
i'm unable to figure out the reasons hope that u will help.......
apply it to any data and check the results
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Niten
Is the exploration date set to the current bar or a specific date. You haven't been specific as to which values are diffent between exploration result and chart (6 values in all), but if Column A (CLOSE) is different then the only cause I can think of is that your exploration is set to the wrong date.
If you open a chart from the exploration report window then you'll need to switch the chart to weekly - it doesn't open automatically in weekly periodicity, and that could suggest that your values are different when you're actually looking at the wrong periodicity chart.
I've just run a scan using your exploration and the chart of ATG shows a weekly MACD value of 0.09949, and the exploration shows 0.0995 (rounded to 4 decimal places). That's exactly what I would expect it to be. The MACD() reported value of 0.0995 doesn't change until I drop the number of bars scanned to around 130 (5 times 26), when it changes to 0.0996.
What you need to understand is that MetaStock is (almost certainly) not at fault here. If that's your attitude then a problem can be very hard to isolate. Adopt the attitude that the mistake is yours and that will free you up to check things that you would otherwise continue to overlook.
Roy
MetaStock Tips & Tools
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 11/11/2005(UTC) Posts: 12 Location: INDIA
|
THANKS mstt
error found..............
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Views messages in topic : 2,995
Was thanked: 14 time(s) in 10 post(s)
|
anejanitin-
What was the error?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
It looks like the error was located somewhere between keyboard and chair... ;)
jose '-)
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 11/11/2005(UTC) Posts: 12 Location: INDIA
|
Hi
let me put across one more issue.
when i run the exploration the value of [color=red:06a2c3cb1f]MACD[/color] as
in the exploration REPORT is different from
[color=red:06a2c3cb1f]MACD value [/color]shown in the [color=red:06a2c3cb1f]'INSPECT' option [/color]
available in the [color=red:06a2c3cb1f]REPORT.[/color]
Though the value shown in the 'INSPECT' option
is correct. but why this difference????????
is there any option which is not being used correctly by me.
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
How to achieve consistant MACD crossovers [RESOLVED]
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.