logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
felinity  
#1 Posted : Thursday, December 9, 2010 4:36:29 AM(UTC)
felinity

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 10/17/2010(UTC)
Posts: 6

Hi,

Under, this is the code of the indicator : magic trend.
Then I want to do the following thing with this code in the EA > trends.

I need to separate long and short in :
- bullish code
- bearish code

I do not know how to do. Someboy can help me ?

The code :

thisCCI := CCIE(50);
lastCCI := Ref(thisCCI,-1);
mh :=L-ATR(5);
ml :=H+ATR(5);
magicTrend:=
If(thisCCI>=0,
If(mh<PREVIOUS,PREVIOUS,mh),
If(ml>PREVIOUS,PREVIOUS,ml));

MagicTrend;

Thnaks
Regards
Gilles
johnl  
#2 Posted : Thursday, December 9, 2010 7:16:12 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602

To interpret the trend I might plot the indicator against Mov(C,25,S) and seeing if it
is above or below the MA or you might interpret a breakout from a flat area
as "the trend direction".


felinity  
#3 Posted : Friday, December 10, 2010 2:24:54 AM(UTC)
felinity

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 10/17/2010(UTC)
Posts: 6

Thank you for your answer. My problem is not in the interpretation. I just want to see sequences in the Expert Advisor.

When you edit the EA there is "name" then "trends". In it there are two areas : bullish and bearish.

With parameters you can have a ribbon in the botton of the screen. It is necessary to write the codes into :
- code bullish when magic trend is up
- code bearish when magic trend is down

I have the global code but not the two codes up and down and I do not know write them.

Thank you everybody for help ans apologies for my english in am a stranger... in the night with my codes.

a+
Gilles
vienna  
#4 Posted : Friday, December 10, 2010 5:09:45 AM(UTC)
vienna

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/14/2009(UTC)
Posts: 140
Location: Austria

Hi,

i don't know this indicator - but I would try:

Bullish:
Code:

thisCCI := CCIE(50);
lastCCI := Ref(thisCCI,-1);
mh :=L-ATR(5);
ml :=H+ATR(5);
magicTrend:=
If(thisCCI>=0,
If(mh<PREVIOUS,PREVIOUS,mh),
If(ml>PREVIOUS,PREVIOUS,ml));

MagicTrend<C;


Bearish:
Code:

thisCCI := CCIE(50);
lastCCI := Ref(thisCCI,-1);
mh :=L-ATR(5);
ml :=H+ATR(5);
magicTrend:=
If(thisCCI>=0,
If(mh<PREVIOUS,PREVIOUS,mh),
If(ml>PREVIOUS,PREVIOUS,ml));

MagicTrend>C;

henry1224  
#5 Posted : Friday, December 10, 2010 6:28:05 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
the problem is that the magic trend has to many whipsaws to make it profitable.

using VST Pro from metastocktools.com it shows that there is a negative profit and has max risk of over 70% over a 12 year period
henry1224  
#6 Posted : Friday, December 10, 2010 6:36:32 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
here is a chart of the dow

UserPostedImage

now tell me if you would want to trade this system?
vienna  
#7 Posted : Friday, December 10, 2010 6:44:42 AM(UTC)
vienna

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/14/2009(UTC)
Posts: 140
Location: Austria

hi henry,

I think a trend indicator don't have to be always used for trading signals - it can also only show you if there is a trend in the market and in which direction the trend shows...
but you are true its very lagging...
henry1224  
#8 Posted : Friday, December 10, 2010 6:45:14 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
chart of the dow but the signals are reversed

UserPostedImage
henry1224  
#9 Posted : Friday, December 10, 2010 6:53:36 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
the reason that this indicator uses the CCIE as a trend setting trigger is beyond me?
vienna  
#10 Posted : Friday, December 10, 2010 7:40:44 AM(UTC)
vienna

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/14/2009(UTC)
Posts: 140
Location: Austria

I have no idea..
felinity  
#11 Posted : Friday, December 10, 2010 10:15:17 AM(UTC)
felinity

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 10/17/2010(UTC)
Posts: 6

Hi vienna,

Your code works but I am not sure that it is the good one. I have no model on stocks but I have a model on CAC future on the log Metatradrer-4.
It is not exactly the same but they are very nearly.

On it Magic trend can be above or under the close in the same sequence, long or short.

If somebody knows Metatrader language I can give to him the code.

Vienna, thanks for your hlep.

a+
Gilles
felinity  
#12 Posted : Friday, December 10, 2010 10:21:42 AM(UTC)
felinity

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 10/17/2010(UTC)
Posts: 6

I do not expect to use it alone. Its name is TREND and it is not a signal. But perhaps it is useful as a filter. And parameters can be changed.
felinity  
#13 Posted : Friday, December 10, 2010 10:26:23 AM(UTC)
felinity

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 10/17/2010(UTC)
Posts: 6

You know all indicators are lagging. Even moving average. More the parameter is large, more the lagging is.

sorry for my english
Users browsing this topic
Guest (Hidden)
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.