Forex
Google

Go Back   Forex Trading > Downloads > Indicators - Metatrader 4
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack (4) Thread Tools Display Modes
  4 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 05-29-2006, 06:36 PM
Devil2000 Devil2000 is offline
Senior Member
 
Join Date: Dec 2005
Location: In front of my trading desk
Posts: 340
Devil2000 is on a distinguished road
Linear Regression Indicator

Hi all, I just found a Linear Regression Indicator for metatrader, unfortunately it's in mql, can somebody convert it to mq4? Any help is very appreciated.

Here is the code :

/*[[
Name := linear regression indicator
Author := Copyright e 2004, Nick Bilak, beluck[at]ukr.net
Link := http://bilak.port5.com
Separate Window := No
First Color := Red
First Draw Type := Line
Use Second Data := No
]]*/
Inputs : Rperiod(5);
Variables : shift(0), cnt(0), loopbegin(0), first(True), prevbars(0);
Variables : sum(0), length(0), i(0), mt(0), WT(0), vWT2(0),value(0);

SetLoopCount(0);
// initial checkings
If RPeriod < 1 Then Exit;
length=RPeriod;
loopbegin = 206-length-1;
For shift = loopbegin Downto 0 Begin
sum=0;
For i = length downTo 1 Begin
sum = sum + (i-(length+1)/3)*Close[length-i+shift];
End;
WT=sum*6/(length*(length+1));
SetIndexValue(shift,WT);
End;


Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-30-2006, 07:25 AM
newdigital newdigital is online now
Administrator
 
Join Date: Sep 2005
Posts: 15,414
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
Check this indicator for MT4 (attached). It should be the same or very similar with yours (attached as well) with iPeriod 5.

Also please look at this post.
Attached Images
File Type: jpg regression_mt3.jpg (87.2 KB, 1631 views)
File Type: gif regression_mt4.gif (25.8 KB, 1712 views)
Attached Files
File Type: mql linear regression indicator.mql (706 Bytes, 297 views)
File Type: mq4 Regression_Channel .mq4 (8.6 KB, 514 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-30-2006, 08:02 AM
Devil2000 Devil2000 is offline
Senior Member
 
Join Date: Dec 2005
Location: In front of my trading desk
Posts: 340
Devil2000 is on a distinguished road
Thank you Newdigital. your help is highly appreciated.

I already check your links twice, but I'm looking for exactly the same Linear Regression which I found on netdania's chart. LSMA so far looks so similar, but I'm afraid that I have to test it for a couple of month or more. And I'm looking for similar Oscillator Indicator which I found on netdania's chart also. Hope you can help me. Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-28-2006, 11:33 PM
sashazz sashazz is offline
Junior Member
 
Join Date: Apr 2006
Posts: 6
sashazz is on a distinguished road
linear regression

hi newdigital,
now i am hoping to meet you here. this is the indicator (linear regression) that seemingly works like the one i need. i am copying it into indicators folder and nothing happens. any idea why?
thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-29-2006, 08:10 AM
newdigital newdigital is online now
Administrator
 
Join Date: Sep 2005
Posts: 15,414
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
Quote:
Originally Posted by sashazz
hi newdigital,
now i am hoping to meet you here. this is the indicator (linear regression) that seemingly works like the one i need. i am copying it into indicators folder and nothing happens. any idea why?
thanks.
You mean post #2?
The first indicator is for MT3.
The second one is for MT4.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 06-29-2006, 08:21 AM
newdigital newdigital is online now
Administrator
 
Join Date: Sep 2005
Posts: 15,414
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
It works. I just attach indicator to the chart (MT4) and it works (see image).
Attached Images
File Type: gif 1.gif (21.9 KB, 1543 views)
Attached Files
File Type: mq4 Regression_Channel .mq4 (8.6 KB, 296 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 06-29-2006, 08:22 AM
Devil2000 Devil2000 is offline
Senior Member
 
Join Date: Dec 2005
Location: In front of my trading desk
Posts: 340
Devil2000 is on a distinguished road
Hi sashazz, I found it on Indonesian forum, it's soo similar with LSMA indicator which I found it here. But with this LSMA you can see color changing if trend is changing too.
Attached Files
File Type: mq4 Linear_Jose_Regression.mq4 (3.1 KB, 381 views)
File Type: mq4 LSMA_in_Color3.mq4 (3.4 KB, 268 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 06-30-2006, 01:33 AM
sashazz sashazz is offline
Junior Member
 
Join Date: Apr 2006
Posts: 6
sashazz is on a distinguished road
it does not look like what i want

thanks devil,
i saw your name somewhere over here looking for linear regression, too. i tried both of your indicators, and i am not sure they can do what i want.
i am not really too much into indicators, this just happen to be the one i need to find in order to follow other guy trading class.
the idea is to use BB together with linear regression, like the one you can see on the picture attached, where white thick line is what i need. then, when it penetrates the BB plus something else, you are getting a trading signal.
i tried probably 20 regression indicators that i found on this forum and they all do something different, from what i need.
the one i need has a setting 4 on this picture, and that is the only setting this indicator has.
to my surpise the other tons of linear regressions i found here, all do something different. maybe after you look at the picture attached you have some idea?

newdigital, thank you for your help. you must be a supernultitasker to cope with all this flow. i tried that one before and it is not what i need. still thanks.
Attached Images
File Type: gif lenear regr.GIF (9.5 KB, 1601 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 06-30-2006, 02:24 AM
Devil2000 Devil2000 is offline
Senior Member
 
Join Date: Dec 2005
Location: In front of my trading desk
Posts: 340
Devil2000 is on a distinguished road
Have you try it with different parameter?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 06-30-2006, 11:52 AM
sashazz sashazz is offline
Junior Member
 
Join Date: Apr 2006
Posts: 6
sashazz is on a distinguished road
yeah, i will continue to change parameters, but it looks like whatever i do it never penetrates the BB. For BB i need a setting 10, 2 and sma. the whole idea here is to trade from penetrations. again, if you already spent some time playing with different linear regressions, maybe you can come up with somehting. the 2 indicators you suggested are very similar to what i need i just cannot get them to pop up from BBs. thanks for your help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/indicators-metatrader-4/2310-linear-regression-indicator.html
Posted By For Type Date
Linear Regression Channel - Visual TRading Charts Forum This thread Refback 06-20-2008 02:16 AM
Search:linear+regression+mq4 - InfoSpace This thread Refback 11-15-2007 07:26 PM
Visual TRading Charts Forum - View Single Post - Linear Regression Channel This thread Refback 10-01-2007 06:36 PM
Linear Regression Channel - Visual TRading Charts Forum This thread Refback 07-05-2007 12:11 PM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linear Regression symtec23 Metatrader 4 4 07-08-2008 07:44 AM
Linear Regression Indicator valnie Indicators - Metatrader 4 3 08-06-2006 06:59 PM
linear regression channel kidhudi Indicators - Metatrader 4 2 07-20-2006 05:25 PM
Looking for Linear Regression Curve Paul_Morin Metatrader 4 5 05-12-2006 10:39 AM


All times are GMT. The time now is 06:33 AM.