Page 69 of 131

Re: Stochastic indicators for MT4

Posted: Mon Jun 07, 2021 12:14 pm
by 太虚一毫
mrtools wrote: Thu Jun 03, 2021 9:20 amTry!
Expect the teacher to add MTF to Stoch Candle OverBought-Sold button.mq4. Boundless merit!

Re: Stochastic indicators for MT4

Posted: Wed Jun 09, 2021 6:55 am
by mrtools
matias barcelo wrote: Wed Jun 09, 2021 1:17 am Que tal, me gustaria que alguien me ayude a agregar mtf a este indicador

//+------------------------------------------------------------------+
//| Double_Smoothed_MACD_Stochastic.mq4 |
//| Copyright © 2015, Gehtsoft USA LLC |
//| http://fxcodebase.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2015, Gehtsoft USA LLC"
#property link "http://fxcodebase.com"

#property indicator_separate_window
#property indicator_buffers 4
#property indicator_color1 clrGreen
#property indicator_color2 clrRed
#property indicator_level1 0
#property indicator_level2 50
#property indicator_level3 100
#property indicator_levelcolor clrGray



extern int Stoch_Length=10;
extern int Smooth_EMA=3;
extern int Signal_EMA=3;
extern int MACD_Fast=12;
extern int MACD_Slow=26;
extern int Price=0; // Applied price
// 0 - Close
// 1 - Open
// 2 - High
// 3 - Low
// 4 - Median
// 5 - Typical
// 6 - Weighted

double DSS[], Signal[];
double DDS2[], MACD[];

double alpha, beta;

int init()
{
IndicatorShortName("Double smoothed MACD Stochastic oscillator");
IndicatorDigits(Digits);
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,DSS);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,Signal);
SetIndexStyle(2,DRAW_NONE);
SetIndexBuffer(2,DDS2);
SetIndexStyle(3,DRAW_NONE);
SetIndexBuffer(3,MACD);

alpha=2./(1.+Signal_EMA);
beta=2./(1.+Smooth_EMA);

return(0);
}

int deinit()
{

return(0);
}

int start()
{
if(Bars<=3) return(0);
int ExtCountedBars=IndicatorCounted();
if (ExtCountedBars<0) return(-1);
int limit=Bars-2;
if(ExtCountedBars>2) limit=Bars-ExtCountedBars-1;
int pos;
double FastEMA, SlowEMA;
pos=limit;
while(pos>=0)
{
FastEMA=iMA(NULL, 0, MACD_Fast, 0, MODE_EMA, Price, pos);
SlowEMA=iMA(NULL, 0, MACD_Slow, 0, MODE_EMA, Price, pos);

MACD[pos]=FastEMA-SlowEMA;

pos--;
}

double Min, Max;
double DDS1, DDS3;
pos=limit;
while(pos>=0)
{
Min=MACD[ArrayMinimum(MACD, Stoch_Length, pos)];
Max=MACD[ArrayMaximum(MACD, Stoch_Length, pos)];

if (Min!=Max)
{
DDS1=100.*(MACD[pos]-Min)/(Max-Min);
}
else
{
DDS1=0.;
}

DDS2[pos]=DDS2[pos+1]+beta*(DDS1-DDS2[pos+1]);

pos--;
}

pos=limit;
while(pos>=0)
{
Min=DDS2[ArrayMinimum(DDS2, Stoch_Length, pos)];
Max=DDS2[ArrayMaximum(DDS2, Stoch_Length, pos)];

if (Min!=Max)
{
DDS3=100.*(DDS2[pos]-Min)/(Max-Min);
}
else
{
DDS3=0.;
}

DSS[pos]=DSS[pos+1]+beta*(DDS3-DSS[pos+1]);

Signal[pos]=Signal[pos+1]+alpha*(DSS[pos]-Signal[pos+1]);

pos--;
}

return(0);
}
Mtf added and updated and optimized the code.

Re: Stochastic indicators for MT4

Posted: Thu Jun 10, 2021 6:48 pm
by talaate
mrtools wrote: Wed Jun 09, 2021 6:55 am Mtf added and updated and optimized the code.
hi mrtools
what is the name of indicator shown in the main chart?

Re: Stochastic indicators for MT4

Posted: Thu Jun 10, 2021 7:28 pm
by RomanUkraine
mrtools wrote: Wed Jun 09, 2021 6:55 am Mtf added and updated and optimized the code.
Can I take a screenshot with a list of all indicators on the chart (and, if possible, with settings)?
Please!

Re: Stochastic indicators for MT4

Posted: Thu Jun 10, 2021 8:05 pm
by kvak
talaate wrote: Thu Jun 10, 2021 6:48 pm hi mrtools
what is the name of indicator shown in the main chart?
Another gem from Mrtools :)
viewtopic.php?p=1295436800#p1295436800

Re: Stochastic indicators for MT4

Posted: Fri Jun 11, 2021 1:41 am
by mrtools
talaate wrote: Thu Jun 10, 2021 6:48 pm hi mrtools
what is the name of indicator shown in the main chart?
The background is one of Xard's indicators and the other is rsi adaptive ema levels.

Re: Stochastic indicators for MT4

Posted: Fri Jun 11, 2021 1:59 am
by talaate
mrtools wrote: Fri Jun 11, 2021 1:41 am The background is one of Xard's indicators and the other is rsi adaptive ema levels.
Very nice combinations :thumbup:

Re: Stochastic indicators for MT4

Posted: Sat Jun 12, 2021 8:02 pm
by sal
mr.tools
can you please make arrows only when the reversal stoch an signal crosses at OB/OS ZONE 70/30

Re: Stochastic indicators for MT4

Posted: Tue Jun 15, 2021 7:24 pm
by natsuya
Hi.
I love this indicator, but when I use it on multiple charts, it runs very slowly.
Can someone please make this indicator run lighter?

Re: Stochastic indicators for MT4

Posted: Wed Jun 16, 2021 7:51 pm
by samuelhudson
MACD and RSI make a suitable combination. I use RSI to find if an asset is overbought or oversold and when MACD confirms it, I make the move.