Forex
Google
New signals service!

Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4


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 (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 08-07-2007, 06:55 AM
smalltalk's Avatar
Senior Member
 
Join Date: Apr 2006
Location: Yogyakarta
Posts: 116
smalltalk is on a distinguished road
Stochastic based EA

Hi,

Anyone knows of stochastic based EA here in forex-TSD? I'm learning to develop my own EA so I need the mq4 example of how to reference stochastic indicator in an EA.

Regards,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 08-07-2007, 07:21 AM
Administrator
 
Join Date: Sep 2005
Posts: 16,324
Blog Entries: 108
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 smalltalk View Post
Hi,

Anyone knows of stochastic based EA here in forex-TSD? I'm learning to develop my own EA so I need the mq4 example of how to reference stochastic indicator in an EA.

Regards,
We have thread about this indicator (including many EAs) Stochastic Oscillator

Thread about Parabolic SAR Parabolic SAR indicator

Thread about RSI http://www.forex-tsd.com/setup-quest...indicator.html

Thread about Momentum indicator Momentum indicator

Thread about Divergence Divergence Indicator
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-07-2007, 07:45 AM
smalltalk's Avatar
Senior Member
 
Join Date: Apr 2006
Location: Yogyakarta
Posts: 116
smalltalk is on a distinguished road
Thank you ND for your swift response...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-07-2007, 12:09 PM
Senior Member
 
Join Date: Nov 2006
Location: Ukraine
Posts: 491
Shinigami is on a distinguished road
double iStochastic( string symbol, int timeframe, int %Kperiod, int %Dperiod, int slowing, int method, int price_field, int mode, int shift)
Calculates the Stochastic oscillator and returns its value.
Parameters:
symbol - Symbol the data of which should be used to calculate indicator. NULL means the current symbol.
timeframe - Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.
%Kperiod - %K line period.
%Dperiod - %D line period.
slowing - Slowing value.
method - MA method. It can be any ofMoving Average method enumeration value.
price_field - Price field parameter. Can be one of this values: 0 - Low/High or 1 - Close/Close.
mode - Indicator line index. It can be any of the Indicators line identifiers enumeration value.
shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
Sample:

if(iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,0 )>iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL, 0))
return(0);

iStochastic - MQL4 Documentation
__________________
MQL4 programming is easy ^^
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 08-07-2007, 12:22 PM
Member
 
Join Date: Dec 2006
Posts: 67
marko [IRL] is on a distinguished road
Quote:
Originally Posted by Shinigami View Post
double iStochastic( string symbol, int timeframe, int %Kperiod, int %Dperiod, int slowing, int method, int price_field, int mode, int shift)
Calculates the Stochastic oscillator and returns its value.
Parameters:
symbol - Symbol the data of which should be used to calculate indicator. NULL means the current symbol.
timeframe - Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.
%Kperiod - %K line period.
%Dperiod - %D line period.
slowing - Slowing value.
method - MA method. It can be any ofMoving Average method enumeration value.
price_field - Price field parameter. Can be one of this values: 0 - Low/High or 1 - Close/Close.
mode - Indicator line index. It can be any of the Indicators line identifiers enumeration value.
shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
Sample:

if(iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,0 )>iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL, 0))
return(0);

iStochastic - MQL4 Documentation
Thank u just absolutly clear expl. Good man.

Marko
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 08-07-2007, 12:27 PM
Administrator
 
Join Date: Sep 2005
Posts: 16,324
Blog Entries: 108
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
May be i am wrong but it should be 1 instead of 0.
because 0 is open current bar.

For example:

if(iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,1 )>iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL , 1))
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 08-07-2007, 12:31 PM
Senior Member
 
Join Date: Nov 2006
Location: Ukraine
Posts: 491
Shinigami is on a distinguished road
If you use current bar information, you use 0. If you use closed bars only, you use 1. That example was taken from the posted link.
__________________
MQL4 programming is easy ^^
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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

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

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/expert-advisors-metatrader-4/8999-stochastic-based-ea.html
Posted By For Type Date
forex tsd: Blogs, Photos, Videos and more on Technorati This thread Refback 08-12-2007 01:55 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
RSI ADX Stochastic Shinigami Suggestions for Trading Systems 10 06-06-2008 03:54 AM
Need Help to develop new EA based on stochastic entry abrs70 Expert Advisors - Metatrader 4 2 11-24-2006 12:43 AM
stochastic danu Expert Advisors - Metatrader 4 1 06-21-2006 06:47 AM
rsi and stochastic One Indicators - Metatrader 4 5 04-01-2006 06:12 AM


All times are GMT. The time now is 01:02 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.