Re: MT4 Indicator requests and ideas

13021
mrtools wrote: Tue Jun 08, 2021 5:24 am Mainly the problem is the negative shift.
I suspected that.. found a few more though, some may have been modified by you in the past elsewhere but I could be wrong, could you kindly take a look at them? These versions don't seem to have the shift function




Re: MT4 Indicator requests and ideas

13029
mrtools wrote: Thu Jan 09, 2020 3:48 am Added mtf and arrows.
Does this MHL average oscillator (mtf + arrows).mq4 support enPrices, enColorOn, and enLevelType upgrades?

Code: Select all

enum enPrices
{
   pr_close,      // Close
   pr_open,       // Open
   pr_high,       // High
   pr_low,        // Low
   pr_median,     // Median
   pr_typical,    // Typical
   pr_weighted,   // Weighted
   pr_average,    // Average (high+low+open+close)/4
   pr_medianb,    // Average median body (open+close)/2
   pr_tbiased,    // Trend biased price
   pr_tbiased2,   // Trend biased (extreme) price
   pr_haclose,    // Heiken ashi close
   pr_haopen ,    // Heiken ashi open
   pr_hahigh,     // Heiken ashi high
   pr_halow,      // Heiken ashi low
   pr_hamedian,   // Heiken ashi median
   pr_hatypical,  // Heiken ashi typical
   pr_haweighted, // Heiken ashi weighted
   pr_haaverage,  // Heiken ashi average
   pr_hamedianb,  // Heiken ashi median body
   pr_hatbiased,  // Heiken ashi trend biased price
   pr_hatbiased2  // Heiken ashi trend biased (extreme) price
};
enum enColorOn
{
   cc_onSlope,   // Change color on slope change
   cc_onMiddle,  // Change color on middle line cross
   cc_onLevels   // Change color on outer levels cross
};
enum enLevelType
{
   lev_float, // Floating levels
   lev_quan   // Quantile levels
};

Re: MT4 Indicator requests and ideas

13030
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);
}


Who is online

Users browsing this forum: Amazon [Bot], doolfrews, fibo7818, IBM oBot [Bot], lean, Nabs, Shabba23 and 57 guests