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
02-17-2006, 11:04 PM
Member
Join Date: Jan 2006
Posts: 77
Smoothed Demark
Anyone have a smoothed demark indicator?
Not the TD, just the standard but smoothed. Could have some use.
Many many thanks.
02-18-2006, 12:58 AM
Member
Join Date: Jan 2006
Posts: 77
mt4 formula
Worst case, can someone provide the mt4 demark code so i can work on it?
muchos gracias
02-18-2006, 07:57 AM
Administrator
Join Date: Sep 2005
Posts: 20,058
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);
}
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT. The time now is 09:55 AM .