3D Oscillator for MT4

This is a discussion on 3D Oscillator for MT4 within the MetaTrader forums, part of the Forex Discussion category; Can any coders kindly tell me if this indicator called 3D Oscillator repaints in any way? Below is the code: ...

Reply
 
LinkBack Thread Tools
Veteran Member
Forum Guides are volunteer members who help with the smooth running of the forums. Their tasks include forum housekeeping, maintaining a sticky guide to the forum topic, helping newbies and reporting offending posts but does not invole moderation.
 
Rossini's Avatar
 
Join Date: May 2008
Posts: 824
Rossini's Trading Profile
3D Oscillator for MT4

Can any coders kindly tell me if this indicator called 3D Oscillator repaints in any way?

Below is the code:


//| 3D Oscilator.mq4 |
//| |
//| |
//+------------------------------------------------------------------+
#property copyright "Author - Luis Damiani. Ramdass - Conversion only"

#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Yellow
#property indicator_color2 Red
//---- input parameters

extern int D1RSIPer=13;
extern int D2StochPer=8;
extern int D3tunnelPer=8;
extern double hot=0.4;
extern int sigsmooth=4;


//---- buffers
double sig1n[];
double sig2n[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
string short_name;
//---- indicator line
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(0,sig1n);
SetIndexBuffer(1,sig2n);
//----
SetIndexDrawBegin(0,D1RSIPer+D2StochPer+D3tunnelPe r+hot+sigsmooth);
SetIndexDrawBegin(1,D1RSIPer+D2StochPer+D3tunnelPe r+hot+sigsmooth);
//----
return(0);
}
//+------------------------------------------------------------------+
//| CCI_Woodies |
//+------------------------------------------------------------------+
int start()
{
int i,i2,counted_bars=IndicatorCounted();
double rsi,maxrsi,minrsi,storsi,E3D,
sig1,sig2,sk,ss,sk2;
double cs;
bool init=true;
//----
cs= D1RSIPer+D2StochPer+D3tunnelPer+hot+sigsmooth;
if(Bars<=cs) return(0);

//if (init)
//{
ss=sigsmooth;
if (ss<2) ss=2;
sk = 2 / (ss + 1);
sk2=2/(ss*0.8+1);
init=false;
//};


//---- initial zero
if(counted_bars<1)
{
for(i=1;i<=cs;i++) sig1n[Bars-i]=0.0;
for(i=1;i<=cs;i++) sig2n[Bars-i]=0.0;
}
//----
i=Bars-cs-1;



if(counted_bars>=cs) i=Bars-counted_bars-1;
while(i>=0)
{

rsi=iRSI(NULL,0,D1RSIPer,PRICE_CLOSE,i);
maxrsi=rsi;
minrsi=rsi;

for (i2=i+D2StochPer;i2>=i; i2--)
{
rsi=iRSI(NULL,0,D1RSIPer,PRICE_CLOSE,i2);
if (rsi>maxrsi) maxrsi=rsi;
if (rsi<minrsi) minrsi=rsi;
//maxrsi=Maximum(rsi,maxrsi);
//minrsi=min(rsi,minrsi);
}

storsi=((rsi-minrsi)/(maxrsi-minrsi)*200-100);
E3D=hot*iCCI(NULL,0,D3tunnelPer,PRICE_TYPICAL,i)+( 1-hot)*storsi;
sig1n[i]=sk*E3D+(1-sk)*sig1;
sig2n[i]=sk2*sig1+(1-sk2)*sig2;
sig1=sig1n[i];
sig2=sig2n[i];

i--;
}
return(0);
}
//+------------------------------------------------------------------+
__________________
Do, or do not, there is no such thing as try.
__________________
I'm easily pleased with perfection, and if trading is an art, then I'm painting my masterpiece.
__________________
If the margin between your goal and failure is too small then any shortfall will inevitably lead to failure.
It's far better to aim high because if you don't quite achieve your ambition you may very well be left with something worthwhile.

__________________
Rossini is online now   Reply With Quote
Veteran Member
Forum Guides are volunteer members who help with the smooth running of the forums. Their tasks include forum housekeeping, maintaining a sticky guide to the forum topic, helping newbies and reporting offending posts but does not invole moderation.
 
Rossini's Avatar
 
Join Date: May 2008
Posts: 824
Rossini's Trading Profile
Re: 3D Oscillator for MT4

Rossini started this thread 36 views and no replies. Come on guys, throw me a bone ;-)
__________________
Do, or do not, there is no such thing as try.
__________________
I'm easily pleased with perfection, and if trading is an art, then I'm painting my masterpiece.
__________________
If the margin between your goal and failure is too small then any shortfall will inevitably lead to failure.
It's far better to aim high because if you don't quite achieve your ambition you may very well be left with something worthwhile.

__________________
Rossini is online now   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
detrend oscillator danpayne General Trading Chat 0 Jun 14, 2009 8:42am
Gator Oscillator marthart Technical Analysis 17 Apr 5, 2009 4:30am
Stochastic Oscillator vilib Traderpedia 1 Dec 30, 2008 5:46pm
Stochastic oscillator julesrules Technical Analysis 27 Feb 23, 2003 4:12pm
OT oscillator buys titus-uk Technical Analysis 0 May 15, 2001 5:59pm


New To Site? Need Help?


All times are GMT -4. The time now is 8:22am.


Copyright © 2001-2010 Trade2Win.

Member, National Futures Association (NFA ID # 0402027). Please be aware that off-exchange retail foreign currency (forex) trading involves significant risk of loss and is not suitable for all investors. Increasing leverage increases risk. Before deciding to trade forex, you should carefully consider your financial goals, level of experience and risk appetite. Any opinions, news, research, analysis, prices or other information contained does not constitute investment advice.