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

Notification

Icon
Error

Options
Go to last post Go to first unread
FXLearning  
#1 Posted : Sunday, January 1, 2006 6:21:43 PM(UTC)
FXLearning

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/1/2006(UTC)
Posts: 39

Hi, I am new to this community, and I am seeking some help. I was wondering if anyone knows if there is an indicator for Laguerre, itrend, and for time cycles. By time cycles, I mean an indicator that will predict a time window to enter into a trade and to exit from it using only time. Regards, FXLearning
FXLearning  
#2 Posted : Wednesday, January 4, 2006 11:41:17 PM(UTC)
FXLearning

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/1/2006(UTC)
Posts: 39

I found the Laguerre indicator in the Trader's Tips from TASC Magazine in this site; however, when I plot the indicator it has a different value in the 1-min chart than the one shown. Anyone knows how to fix this? I am still looking for the other two indicators itrend and time cycles. If anyone knows of them, I would very much appreciate your feedback. Regards, FXLearning
FXLearning  
#3 Posted : Sunday, January 8, 2006 1:46:45 PM(UTC)
FXLearning

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/1/2006(UTC)
Posts: 39

This is the code from Equis' Metastock's Traders' Tips from TASC Magazine for the Laguerre Filter: g:=0.8; L0:=((1-g)*MP()) + (g*PREV); L1:=(-g*L0) + Ref(L0,-1) + (g*PREV); L2:=(-g*L1) + Ref(L1,-1) + (g*PREV); L3:=(-g*L2) + Ref(L2,-1) + (g*PREV); (L0 + (2*L1) + (2*L2) + L3)/6 This will basically move above or below the price, and in addition, it has a problem in term of its visual location and its true value. However, if you look at the Laguerre indicator that I have included in the chart (this chart is not Metastock -- for those curious enough), you will notice that it behaves quite differently. In this chart you can see that movements below 0.75 are good to sell and movements above 0.15 are good to buy. Now, the one that works real nice is itrend. Whenever, the green line is above the zero line, then you go in, and when the red line is above the zero line, you get out. Both of them together confirm the move, but itrend is usually first. These are two of the indicators that I have been trying to find here at the forum, but so far no luck. Here is the code for itrend, in case anyone wants to try to give it a go with Metastock: /+------------------------------------------------------------------+ //| iTrend.mq4 | //| Copyright © 2004, MetaQuotes Software Corp. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "Copyright © 2004, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 LimeGreen #property indicator_color2 Red //---- input parameters extern int Bands_Mode_0_2=0; // =0-2 MODE_MAIN, MODE_LOW, MODE_HIGH extern int Power_Price_0_6=0; // =0-6 PRICE_CLOSE,PRICE_OPEN,PRICE_HIGH,PRICE_LOW,PRICE_MEDIAN,PRICE_TYPICAL,PRICE_WEIGHTED extern int Price_Type_0_3=0; // =0-3 PRICE_CLOSE,PRICE_OPEN,PRICE_HIGH,PRICE_LOW extern int Bands_Period=20; extern int Bands_Deviation=2; extern int Power_Period=13; extern int CountBars=300; //---- buffers double value[]; double value2[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { // string short_name; //---- indicator line IndicatorBuffers(2); SetIndexStyle(0,DRAW_LINE); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(0,value); SetIndexBuffer(1,value2); //---- //---- return(0); } //+------------------------------------------------------------------+ //| Trend | //+------------------------------------------------------------------+ int start() { SetIndexDrawBegin(0,Bars-CountBars+Bands_Period+1); SetIndexDrawBegin(1,Bars-CountBars+Bands_Period+1); int i,CurrentBar,Bands_Mode,counted_bars=IndicatorCounted(); double Power_Price,CurrentPrice; //---- if(Bars<=Bands_Period) return(0); //---- initial zero if(counted_bars<Bands_Period) { for(i=1;i<=Bands_Period;i++) value[Bars-i]=0.0; for(i=1;i<=Bands_Period;i++) value2[Bars-i]=0.0; } //---- i=CountBars-Bands_Period-1; // if(counted_bars>=Bands_Period) i=Bars-counted_bars-1; if (Bands_Mode_0_2==1) Bands_Mode=MODE_LOW; if (Bands_Mode_0_2==2) Bands_Mode=MODE_HIGH; if (Bands_Mode_0_2==0) Bands_Mode=MODE_MAIN; if (Power_Price_0_6==1) Power_Price=PRICE_OPEN; if (Power_Price_0_6==2) Power_Price=PRICE_HIGH; if (Power_Price_0_6==3) Power_Price=PRICE_LOW; if (Power_Price_0_6==4) Power_Price=PRICE_MEDIAN; if (Power_Price_0_6==5) Power_Price=PRICE_TYPICAL; if (Power_Price_0_6==6) Power_Price=PRICE_WEIGHTED; if (Power_Price_0_6==6) Power_Price=PRICE_CLOSE; for (i=CountBars-1; i>=0; i--) { if (Price_Type_0_3==1) CurrentPrice=Open; if (Price_Type_0_3==2) CurrentPrice=High; if (Price_Type_0_3==3) CurrentPrice=Low; if (Price_Type_0_3==0) CurrentPrice=Close; value=CurrentPrice-iBands(NULL,0,Bands_Period,Bands_Deviation,0,Bands_Mode,Power_Price,i); value2=-(iBearsPower(NULL,0,Power_Period,Power_Price,i)+iBullsPower(NULL,0,Power_Period,Power_Price,i)); } return(0); } //+------------------------------------------------------------------+
pumrysh  
#4 Posted : Sunday, January 8, 2006 6:38:31 PM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

FXLearning, The Laquerre Indicator that you have posted is a smoothing method and not an indicator. It can be approximated by using Mov(Mov(C,Period1,E),Period2,S). The chart that you have posted looks strickingly similar to -DI and +DI or ADX chart with some sort of oscillator. If you could post a bit more information about the TASC article maybe we can figure out what's going on Preston
FXLearning  
#5 Posted : Sunday, January 8, 2006 7:48:14 PM(UTC)
FXLearning

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/1/2006(UTC)
Posts: 39

Preston , According to the Trader's Tips from TASC Magazine in this site the Laguerre Filter appeared in Mar 2003. I don't have access to the TASC article since I started to subscribe to it back in early 2004. This is the address where I got the code: https://www.metastock.co...Article.aspx?c=&p=&Id=42 However, I did look back the trader's tips and it had nothing to do with the Laguerre indicator. Apparently in March of 2003 the TASC code had to do with the following: "Ingo Bucher's article in this issue, "Fibonacci Retracements and the RSI," describes the advantages of considering Fibonacci retracement levels for use with the classic RSI indicator. Bucher reviews six charts, each displaying Fibonacci retracement levels for the RSI associated with each chart." However, I don't know if itrend and Laguerre were ever discussed in TASC. These are indicators that I use in another program called Metatrader (a chart of the same is shown above). This program is only for forex trading. Regards, FXLearning
pumrysh  
#6 Posted : Sunday, January 8, 2006 9:17:04 PM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

FXLearning, I have the article and find no mention of the indicator. Sometimes the magazine and the Equis dates don't match. No matter though, I believe if you go back to the index listed on the Equis site you will see another indicator called: {Laguerre RSI} g:=0.5; L0:=((1-g)*C) + (g*PREV); L1:=(-g*L0) + Ref(L0,-1) + (g*PREV); L2:=(-g*L1) + Ref(L1,-1) + (g*PREV); L3:=(-g*L2) + Ref(L2,-1) + (g*PREV); cu:= If(L0>L1, L0-L1,0) + If(L1>L2, L1-L2,0) + If(L2>L3, L2-L3,0); cd:= If(L0<L1, L1-L0,0) + If(L1<L2, L2-L1,0) + If(L2<L3, L3-L2,0); temp:= If(cu+cd=0, -1,cu+cd); If(temp=-1,0,cu/temp) {end} I can't speak for Metatrader or any of its indicators but the Laquerre RSI and the DI (-&+) should get you what you want in Metastock. Preston
FXLearning  
#7 Posted : Monday, January 9, 2006 8:42:46 AM(UTC)
FXLearning

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/1/2006(UTC)
Posts: 39

Preston, Thank you very much :D The Laguerre RSI looks almost the same as in Metatrader after changing the weight of g to 0.7. I am now testing it to see if I keep the weight of 0.5 or the weight I had in Metatrader of 0.7. In my infinite wisdom, I noticed that last week I had downloaded both the Laguerre filter and the Laguerre RSI; however, I got so stuck with the Laguerre filter that I forgot to work with the Laguerre RSI. :oops: I am also checking the iTrend indicator, and I am comparing it to the +-DI indicator. On first inspection, they appear to react similarly; however, I have included in this post the ADX bar indicator of Metatrader. This works pretty much the same as the regular ADX indicator. If you look at the graph above, you will see that the iTrend indicator when crossing the zero line acts very similar to the ADX bars; however, the iTrend indicator has another interesting property. If you notice the peaks or troughs of the red and green lines, then you will see that they precede the change in the ADX color of the bars. These peaks or bottoms of the itrend let you get a little bit earlier into a trade or a little bit earlier out of a trade. This is not always the case; however, in extreme overbought or oversold conditions (as in the chart), then it is a good early indicator. :wink: Moreover, the Laguerre indicator in the graph (now identified as the Laguerre RSI) does not capture these changes in trend as easily. This indicator works better for normal conditions as a confirming signal to the iTrend indicator. When greater than 0.15 enter a trade, when less than 0.75 exit a trade, for instance. Regards, FXLearning
kingsley29  
#8 Posted : Monday, January 9, 2006 3:49:09 PM(UTC)
kingsley29

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/30/2005(UTC)
Posts: 14

Has anyone be able to convert the Metacode for ITREND to Metastock Or any Metastock code similar to this indicator? Thank you
pumrysh  
#9 Posted : Monday, January 9, 2006 3:57:56 PM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

FXLearning, At first glance I would say that the DI and Laquerre RSI are the same as those used by Metatrader. There may be some timeframe issues that you will need to adjust to get the identical results. For instance, in the RSI formula you may need to smoothe first by using the filter. As you have already found out making a few adjustments will get you closer to the values of Metatrader. There are a couple of issues using the ADX. It does demonstrate divergence and you will need to use caution because of this. Otherwise I'd say that you are on the right track. Preston
FXLearning  
#10 Posted : Monday, January 9, 2006 5:21:09 PM(UTC)
FXLearning

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/1/2006(UTC)
Posts: 39

Preston, Thank you for your ideas. I was somewhat puzzled by them so if you don't mind I had some questions.
pumrysh wrote:
For instance, in the RSI formula you may need to smoothe first by using the filter.
Would you mind sharing an example of what you meant by smoothing first by using the filter?
pumrysh wrote:
There are a couple of issues using the ADX. It does demonstrate divergence and you will need to use caution because of this.
Did you mean divergence in this case as in the chart or in general when using ADX? Preston
pumrysh  
#11 Posted : Monday, January 9, 2006 11:45:29 PM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

FXLearning, Here's the formula: {Laguerre Smoothing} g:=0.8; L0:=((1-g)*MP()) + (g*PREV); L1:=(-g*L0) + Ref(L0,-1) + (g*PREV); L2:=(-g*L1) + Ref(L1,-1) + (g*PREV); L3:=(-g*L2) + Ref(L2,-1) + (g*PREV); x:=(L0 + (2*L1) + (2*L2) + L3)/6; {Laguerre RSI} g:=0.5; L0:=((1-g)*X) + (g*PREV); L1:=(-g*L0) + Ref(L0,-1) + (g*PREV); L2:=(-g*L1) + Ref(L1,-1) + (g*PREV); L3:=(-g*L2) + Ref(L2,-1) + (g*PREV); cu:= If(L0>L1, L0-L1,0) + If(L1>L2, L1-L2,0) + If(L2>L3, L2-L3,0); cd:= If(L0<L1, L1-L0,0) + If(L1<L2, L2-L1,0) + If(L2<L3, L3-L2,0); temp:= If(cu+cd=0, -1,cu+cd); If(temp=-1,0,cu/temp) {end} Notice that all I've done is use the output of the Laquerre Smoothing (in this case X) as the input for the value of the close that would normally be used in the RSI formula. You will need to adjust the g settings to suit your taste. As far as the ADX, the divergence occurs with the DI, so you may see a change in the DI that is not reflected in the ADX. Preston
guara_riua  
#12 Posted : Tuesday, January 10, 2006 2:04:36 AM(UTC)
guara_riua

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/24/2005(UTC)
Posts: 77
Location: Canada

FXLearning I bought the ADSI package and the Laguerre function/s are available in the product's DLL format. Is much more faster and more precise in the same time. You can apply it to other indicators as well, plus is coming with a set of a lot more tools. You can check it out at: http://www.thedml.com The manual that comes with the product explains quite well the functions and their utilisation, providing quite a substantial amount of customized indicators as examples, that can be used as provided. The "ITrend" indicator from this package is quite different from what you've posted, and is mainly a low-pass or band-pass filter that the user can control its parameters. I hope my comments have helped you to find a professional tool reference. Regards Guara
FXLearning  
#13 Posted : Tuesday, January 10, 2006 7:36:45 AM(UTC)
FXLearning

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/1/2006(UTC)
Posts: 39

Preston, Thanks. That was great. :D I have included your formula with user inputs (this is one of my first ever attempts to program anything -- so I hope I did it right). I tried comparing it with the original RSI formula (without smoothing). There appear to be some very small differences. Regards, FXLearning {Laguerre Smoothing} { User Inputs } g:=Input("Enter the smoothing value ",0,1,.8); g2:=Input("Enter the RSI weight ",.1, 1,.5); L0:=((1-g)*MP()) + (g*PREV); L1:=(-g*L0) + Ref(L0,-1) + (g*PREV); L2:=(-g*L1) + Ref(L1,-1) + (g*PREV); L3:=(-g*L2) + Ref(L2,-1) + (g*PREV); x:=(L0 + (2*L1) + (2*L2) + L3)/6; {Notice that all I've done is use the output of the Laquerre Smoothing (in this case X) as the input for the value of the close that would normally be used in the RSI formula.} {Laguerre RSI} g:=g2; L0:=((1-g)*X) + (g*PREV); L1:=(-g*L0) + Ref(L0,-1) + (g*PREV); L2:=(-g*L1) + Ref(L1,-1) + (g*PREV); L3:=(-g*L2) + Ref(L2,-1) + (g*PREV); cu:= If(L0>L1, L0-L1,0) + If(L1>L2, L1-L2,0) + If(L2>L3, L2-L3,0); cd:= If(L0<L1, L1-L0,0) + If(L1<L2, L2-L1,0) + If(L2<L3, L3-L2,0); temp:= If(cu+cd=0, -1,cu+cd); If(temp=-1,0,cu/temp) {end}UserPostedImage
FXLearning  
#14 Posted : Tuesday, January 10, 2006 8:07:20 AM(UTC)
FXLearning

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/1/2006(UTC)
Posts: 39

guara_riua wrote:
The "ITrend" indicator from this package is quite different from what you've posted, and is mainly a low-pass or band-pass filter that the user can control its parameters.
Guara, Thank you for the idea. At this point my main interest would be the itrend indicator. I am not a programmer so I don't know if the code I posted has anything to do with Ehlers ideas. However, I am guessing that perhaps the itrend indicator of Metatrader is the Instantaneous Trendline of Ehler. On the other hand, it could be something entirely different. What makes me think that it could be this last indicator is the fact that it appears to have zero lag. How are you using the add-on tools if my ask? Have you found something special or remarkable about this add-on? Regards, FXLearning PS The EasyLanguage for iTrend is the following (from Cybernetic Analaysis for Stocks and Futures by John Ehlers, page 24): Inputs: Price(H+L)/2, alpha (0.7); Vars: Smooth(0), ITrend(0), Trigger(0); ITrend = (alpha - alpha*alpha/4)*Price+0.5*alpha*alpha*Price[1] - alpha - 0.75*alpha*alpha)*Price[2] + 2*(1-alpha)*ITrend[1] - (1-alpha)*(1-alpha)*Itrend[2]; If current bar<7 then ITrend = (Price + 2*Price[1] + Price[2]/4 Trigger:=2*Itrend - ITrend[2}; Plot1(Itrend, "ITrend"); Plot2(Trigger, "Trig"); Perhaps you might be able to tell them apart.
guara_riua  
#15 Posted : Tuesday, January 10, 2006 11:58:24 PM(UTC)
guara_riua

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/24/2005(UTC)
Posts: 77
Location: Canada

FXLearning As I know, the DML implementation of the Dr.J.Ehlers version published in the "Cybernetics..." is quite the same, maybe with the only exception of the 7 bars initialization code segment. I was able to implement it by using a linear compensation slope for Alpha with a length (in bars) that is a parameter for the user (the initialization period is an 'Input' variable). The smaller the ITrend "Alpha" parameter (meaning the higher the cutt-off frequency), the wider the difference between the ITrend start value vs. the median price will be. This is the time segment where the initialization code is required. I don't know the MetaTrader formula language so I cannot comment if their version is the same as Dr.Ehlers function. "TheDML" is providing 2 versions for the ITrend: one based on the "Rocket Science...." algorithm (adaptive SMA by the CyberCycle Period) and the version explained in "Cybernetics..." which is based on an adaptive median filter algorithm (by the CyberCycle period). The lag between the 2 version is quite different because of the different algorithms that were used. The latest is smoother and has less lag, but needs a longer initialization period. What I perceive as the most beneficial advantage of this package is that the vast majority of the functions are ADAPTIVE. The user can call any function with parameters that are indicator values instead of scalar values (fixed value numbers). They accept even other DLL's function calls output. This is one of the most versatile packages I know. I hope the info I've prtovided was of use. Regards Guara
FXLearning  
#16 Posted : Friday, January 13, 2006 11:49:22 AM(UTC)
FXLearning

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/1/2006(UTC)
Posts: 39

guara_riua wrote:
. I hope the info I've prtovided was of use.
Guara, Thank you for the info. I will keep it in mind if I decided to implement this strategy further using Ehlers' ideas. Regards, FXLearning
bradulrich  
#17 Posted : Tuesday, January 17, 2006 1:20:38 AM(UTC)
bradulrich

Rank: Advanced Member

Groups ready for retrieval: Registered, Registered Users
Joined: 6/5/2005(UTC)
Posts: 35

FXLearning, As the developer for ASI and ADSI, I can say I agree with Radu's comments about the packages. He knows the package's abilities and limitations very well. Please let me know if you have any specific quesitons regarding the indicators. Regards, Brad Ulrich www.thedml.com
FXLearning  
#18 Posted : Sunday, January 22, 2006 5:39:58 PM(UTC)
FXLearning

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/1/2006(UTC)
Posts: 39

Brad, Thank you for your post. Regards, FXLearning
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.