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
|
|
|
|
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".
|
|
|
|
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
|
|
|
|
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;
|
|
|
|
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
|
|
|
|
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 now tell me if you would want to trade this system?
|
|
|
|
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...
|
|
|
|
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
|
|
|
|
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?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 12/14/2009(UTC) Posts: 140 Location: Austria
|
|
|
|
|
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
|
|
|
|
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.
|
|
|
|
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.