Forex



Go Back   Forex Trading > Downloads > Indicators - Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 09-11-2006, 04:00 PM
Member
 
Join Date: May 2006
Posts: 47
juanchoc is on a distinguished road
Help Developing Simple Stochastic

Hello!
Im developing a automated trading platform and right now im trying to make some simple indicators.

I tryied to make a simple stochastic using a %K and %D lines, and using the following formula for the %K:

( ( Today's Close - Lowest Low in %K Periods ) / ( Highest High in %K Periods - Lowest Low in %K Periods ) ) * 100

The problem is a cant make it look as it does on other trading platforms, like Metatrader, and my best guess is that im missing something in the formula because i tried other indicators and they work just fine.

The function looks too squared, as if the metatrader one had a average or something applied to the %K =S.

Thanks in advance.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 09-11-2006, 04:24 PM
raff1410's Avatar
Senior Member
 
Join Date: May 2006
Location: 24°10' E 54°24' N
Posts: 201
raff1410 is on a distinguished road
Quote:
Originally Posted by juanchoc
Hello!
Im developing a automated trading platform and right now im trying to make some simple indicators.

I tryied to make a simple stochastic using a %K and %D lines, and using the following formula for the %K:

( ( Today's Close - Lowest Low in %K Periods ) / ( Highest High in %K Periods - Lowest Low in %K Periods ) ) * 100

The problem is a cant make it look as it does on other trading platforms, like Metatrader, and my best guess is that im missing something in the formula because i tried other indicators and they work just fine.

The function looks too squared, as if the metatrader one had a average or something applied to the %K =S.

Thanks in advance.
I see it is reversed wiliams percent range formula:
Today's Close - Lowest Low in %K Periods
vs
Highest High in %K Periods -Today's Close

Code:
//---- indicator settings
#property  indicator_separate_window
#property  indicator_buffers 1
#property  indicator_color1 Red
#property  indicator_width1 1
#property  indicator_style1 STYLE_SOLID
#property  indicator_level1 0

//---- indicator parameters
extern int  WPRPeriod     = 10;
extern int  CountBars    = 1500;

//---- indicator buffers
double      ind_buffer1[];


//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- drawing settings
   IndicatorBuffers(1);
   SetIndexStyle(0,DRAW_LINE);

//---- indicator buffers mapping
   SetIndexBuffer(0,ind_buffer1);

//---- initialization done
   return(0);
  }
//+------------------------------------------------------------------+
//| WPR                                                                                      |
//+------------------------------------------------------------------+
int start()
  {
   
   int i, limit=CountBars;
   if (limit>Bars) limit=Bars-WPRPeriod;


   for(i=0; i<limit; i++)
   {
    ind_buffer1[i]=iWPR(NULL,0,WPRPeriod, i)+100;
   }
//---- done
   return(0);
  }

Raff
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stochastic ea ajk Metatrader 4 6 01-24-2009 12:43 AM
Simple MA Cross w RSI and Stochastic filter iboersma Suggestions for Trading Systems 21 06-04-2008 09:58 AM
Help on Developing "The MOTHER of ALL" Trading System neo1001 General Discussion 25 01-28-2007 01:51 AM
Simple MA Stochastic Thruline Metatrader 4 2 08-22-2006 09:51 AM
rsi and stochastic One Indicators - Metatrader 4 5 04-01-2006 06:12 AM


All times are GMT. The time now is 01:38 PM.



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