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

Notification

Icon
Error

Options
Go to last post Go to first unread
arnevanveen  
#1 Posted : Friday, November 11, 2005 1:44:59 PM(UTC)
arnevanveen

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 10/15/2005(UTC)
Posts: 31
Location: The Netherlands

Somewhere on the internet i found a Dynamic Trix indicator, which you can find below. The indicator is meant to distinguish trending and trading market phases. There is only one problem, it is not written in metastock language, but in Easy language. Is there some one who thinks this indicator is interesting and wants to write it in metastock for me? I'm unfortunately not familiar with easy language (whatever it may be). Thanks in advance! {******************************************************************* Description : This Indictor plots the DynamicTRIX Provided By : BTAC (c) Copyright 2003 ********************************************************************} Input: length1(21),length2(21),Length3(21); Variables: EMA1(0), EMA2(0), EMA3(0); Variables: DTRIX(0), TL(0); EMA1 = Xaverage(c, length1); EMA2 = Xaverage(EMA1, length2); EMA3 = Xaverage(EMA2, length3); DTRIX = iff(EMA3[1]<>0, ((EMA3-EMA3[1])/EMA3[1])*100,1); {use if function to make sure that nominator is not 0} TL = XAverage(DTRIX,5); {additional Trigger Line} Plot1(DTRIX, "DTrix"); Plot2(0); Plot3(TL, "TL"); {******************************************************************* Description : DynamicTRIX system Provided By : BTAC (c) Copyright 2003 ********************************************************************} Input: length1(21),length2(21),Length3(21); Variables: EMA1(0), EMA2(0), EMA3(0); Variables: DTRIX(0), TL(0); EMA1 = Xaverage(c, length1); EMA2 = Xaverage(EMA1, length2); EMA3 = Xaverage(EMA2, length3); DTRIX = iff(EMA3[1]<>0, ((EMA3-EMA3[1])/EMA3[1])*100,1); {use if function to make sure that nominator is not 0} TL = XAverage(DTRIX,5); {if DTRIX crosses over 0 then buy("EL1")next bar at open; If DTRIX crosses under 0 then sell("ES1") next bar at open;} {2e set tradingrules, where the TriggerLine comes in the game} if DTRIX crosses over 0 then buy("EL1")next bar at open; if DTRIX>0 and DTRIX crosses under TL then exitlong("XL") next bar at open; if DTRIX>0 and DTRIX crosses over TL then buy ("EL2")next bar at open; If DTRIX crosses under 0 then sell("ES1") next bar at open; if DTRIX<0 and DTRIX crosses over TL then exitshort ("XS")next bar at open; if DTRIX<0 and DTRIX crosses under TL then sell("ES2") next bar at open;
Patrick  
#2 Posted : Friday, November 18, 2005 9:44:13 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
arnevanveen, I noticed that you already requested this in the past ( When we first started the Forum 8) ) and I'm sorry we did not help at the time. I will try to get around to it and see if I can help you :D I'm a little busy right now but if in a week I have not helped you then send me a pm and bug me about it ;) Patrick :mrgreen:
johnl  
#3 Posted : Saturday, December 3, 2005 2:43:40 AM(UTC)
johnl

Rank: Advanced Member

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

Try this for the first one. I am assuming ema[1]=ref(ema,-1), (may be wrong) If incorrect, easy to change the code. ==================== DynamicTrix ====================
{Provided By : BTAC (c) Copyright 2003} length1 := Input("period 1",10,45,21); length2 := Input("period 2",10,45,21); length3 := Input("period 3",10,45,21); EMA1 := Mov(C, length1,E); EMA2 := Mov(EMA1,length2,E); EMA3 := Mov(EMA2,length3,E); DTRIX := If(Ref(EMA3,-1)<>0, ((EMA3-Ref(EMA3,-1))/Ref(EMA3,-1))*100,1); {use if function to make sure that nominator is not 0} TL := Mov(DTRIX,5,E); {additional Trigger Line} DTRIX; 0; TL --------------------------------
johnl  
#4 Posted : Saturday, December 3, 2005 3:25:03 AM(UTC)
johnl

Rank: Advanced Member

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

Here is the second, positive is a buy, negative is a sell. ================= DynamicTrix System ================= ------------------------- {Provided By : BTAC (c) Copyright 2003} length1 := Input("period 1",10,45,21); length2 := Input("period 2",10,45,21); length3 := Input("period 3",10,45,21); EMA1 := Mov(C,length1,E); EMA2 := Mov(EMA1,length2,E); EMA3 := Mov(EMA2,length3,E); DTRIX := If(Ref(EMA3,-1)<>0, ((EMA3-Ref(EMA3,-1))/Ref(EMA3,-1))*100,1); {use if function to make sure that nominator is not 0} TL := Mov(DTRIX,5,E); {--------} {*Buy* if DTRIX crosses over 0 then buy("EL1")next bar at open;} bbuy1 := If(Cross(dtrix,0)=1,3,0); {*exit buy* if DTRIX>0 and DTRIX crosses under TL then exitlong("XL") next bar at open;} ebuy1 := If((DTRIX>0) AND (Cross(TL,DTRIX)=1), -4,0); {-------} {*buy* if DTRIX>0 and DTRIX crosses over TL then buy ("EL2")next bar at open;} bbuy2 := If((DTRIX>0) AND (Cross(DTRIX,TL)=1), 1,0); {*sell* If DTRIX crosses under 0 then sell ("ES1") next bar at open;} ebuy2 := If(Cross(0,DTRIX)=1,-2,0); {-------------} ssel1 := If(Cross(0,DTRIX)=1,-1,0); {*exit sell* if DTRIX<0 and DTRIX crosses over TL then exitshort ("XS")next bar at open;} esel1 := If((DTRIX>0) AND Cross(DTRIX,TL)=1, -2,0); {----------} {*sell* if DTRIX<0 and DTRIX crosses under TL then sell("ES2") next bar at open;} ssel2 := If((DTRIX<0) AND (Cross(TL,DTRIX))=1, -3,0); bbuy1; ebuy1; bbuy2; ebuy2; ssel1; esel1; ssel2 ---------------------------
arnevanveen  
#5 Posted : Saturday, December 3, 2005 11:17:33 AM(UTC)
arnevanveen

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 10/15/2005(UTC)
Posts: 31
Location: The Netherlands

thank you very much!! i will try it as soon as i got time!!
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.