Forex



Go Back   Forex Trading > Discussion Areas > 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 02-17-2006, 11:04 PM
006 006 is offline
Member
 
Join Date: Jan 2006
Posts: 77
006 is on a distinguished road
Smoothed Demark

Anyone have a smoothed demark indicator?

Not the TD, just the standard but smoothed. Could have some use.

Many many thanks.
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 02-18-2006, 12:58 AM
006 006 is offline
Member
 
Join Date: Jan 2006
Posts: 77
006 is on a distinguished road
mt4 formula

Worst case, can someone provide the mt4 demark code so i can work on it?

muchos gracias
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
  #3 (permalink)  
Old 02-18-2006, 07:57 AM
Administrator
 
Join Date: Sep 2005
Posts: 20,058
Blog Entries: 241
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 006
Worst case, can someone provide the mt4 demark code so i can work on it?

muchos gracias
It is here:

Code:
//+------------------------------------------------------------------+
//|                                                     DeMarker.mq4 |
//|                      Copyright © 2005, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_separate_window
#property indicator_minimum 0
#property indicator_maximum 1
#property indicator_buffers 1
#property indicator_color1 DodgerBlue
#property indicator_level1 0.3
#property indicator_level2 0.7
//---- input parameters
extern int DeMarkerPeriod=14;
//---- buffers
double DeMarkerBuffer[];
double DeMaxBuffer[];
double DeMinBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   string short_name;
//---- 2 additional buffers are used for counting.
   IndicatorBuffers(3);
   SetIndexBuffer(0, DeMarkerBuffer);
   SetIndexBuffer(1, DeMaxBuffer);
   SetIndexBuffer(2, DeMinBuffer);
//---- indicator line
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,DeMarkerBuffer);
//---- name for DataWindow and indicator subwindow label
   short_name="DeM("+DeMarkerPeriod+")";
   IndicatorShortName(short_name);
   SetIndexLabel(0,short_name);
//----
   SetIndexDrawBegin(0,DeMarkerPeriod);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| DeMarkerM                                                         |
//+------------------------------------------------------------------+
int start()
  {
   DeMaxBuffer[Bars-1] = 0.0;
   DeMinBuffer[Bars-1] = 0.0;
   int i=Bars-2;
   while(i>=0)
     {
      if(High[i] > High[i+1])
        DeMaxBuffer[i] = High[i] - High[i+1];
      else
        DeMaxBuffer[i] = 0.0; 
      if(Low[i] < Low[i+1])
        DeMinBuffer[i] = Low[i+1] - Low[i];
      else
        DeMinBuffer[i] = 0.0; 
      i--;
     }   
   int counted_bars=IndicatorCounted();
//---- 
   if(Bars<=DeMarkerPeriod) return(0);
//---- initial zero
   if(counted_bars<1)
      for(i=1;i<=DeMarkerPeriod;i++) DeMarkerBuffer[Bars-i]=0.0;   
//----
   i=Bars-DeMarkerPeriod-1;
   if(counted_bars>=DeMarkerPeriod) i=Bars-counted_bars-1;
   while(i>=0)
     {
      double SumiMAOnArray = iMAOnArray(DeMaxBuffer, 0, DeMarkerPeriod, 0, MODE_SMA, i) + iMAOnArray(DeMinBuffer, 0, DeMarkerPeriod, 0, MODE_SMA, i);
      if(!bCompareDouble(SumiMAOnArray,0.0))
         DeMarkerBuffer[i] = iMAOnArray(DeMaxBuffer, 0, DeMarkerPeriod, 0, MODE_SMA, i)/ SumiMAOnArray;
      else
         DeMarkerBuffer[i] = 0.0;
      i--;
     }
   return(0);
  }
//+------------------------------------------------------------------+
 bool bCompareDouble (double dNumber1, double dNumber2)
    {
     bool bCompare=NormalizeDouble(dNumber1 - dNumber2,8) == 0;
     return(bCompare);
    }
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

Tags
DeMarker, demark


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
Another Demark Trendline Trader Linuxser Indicators - Metatrader 4 50 11-13-2009 01:55 PM
Ind-TD-Demark-3-1 sky_forex Suggestions for Trading Systems 63 10-24-2009 11:04 AM
Demark Auto Trader newdigital Expert Advisors - Metatrader 4 23 09-23-2009 08:21 AM
Demark documentation and code MainPIP Documentation 3 12-29-2007 09:55 PM
Demark arrow please explain toddanderson Indicators - Metatrader 4 0 12-22-2006 03:52 PM


All times are GMT. The time now is 09:55 AM.



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