Mladen Rakic
196825
Mladen Rakic  
emmany4:
Hello Mladen, pls help to add pop up alerts to this indicator, to include pair names with option of alert on current/close candle. Thanks in Advance.

It s a crippled version of some of the macd indicators, Will try to find out what is the original indicator

banta
8
banta  
mrtools:
Hi Iu500, it's already alerting on color change.

Thank you ver much, Mrtools.

rpasupathy
108
rpasupathy  

Dear Mladen,

Can you please look into this request ...

https://www.mql5.com/en/forum/180648/page787

Thanks a lot

William Snyder
9541
William Snyder  
rpasupathy:
Dear Mladen,

Can you please look into this request ...

https://www.mql5.com/en/forum/180648/page787

Thanks a lot

Rpasupathy, the indicator posted is a decompiled version, any chance you have the original source code of it?

rpasupathy
108
rpasupathy  
mrtools:
Rpasupathy, the indicator posted is a decompiled version, any chance you have the original source code of it?

No ... I don't think so I have it ...

Thanks for taking time and looking into it ..

FXnitroC
10
FXnitroC  
mrtools:
Rpasupathy, the indicator posted is a decompiled version, any chance you have the original source code of it?

Hi Mr Tools,

since i have very limited knowledge in coding what seems to be the problem with decompiled indicators ?

could you enlighten me about this

thanks

topi
111
topi  

hi mrtools and mladen where can i get a proper darvas box indicator.. can u plz help ?

Mladen Rakic
196825
Mladen Rakic  
topi:
hi mrtools and mladen where can i get a proper darvas box indicator.. can u plz help ?

topi

Did you check this thread : https://www.mql5.com/en/forum/general

sara
370
sara  

Stochastic email alert

Can somebody help my providing an alert to my indicator stochastic?

Thanks in advance

sara
370
sara  

void CatchBullishDivergence(int shift)

{

if(IsIndicatorTrough(shift) == false)

return;

int currentTrough = shift;

int lastTrough = GetIndicatorLastTrough(shift);

//--CLASSIC DIVERGENCE--//

if (DisplayClassicalDivergences == true)

{

if(mainLine[currentTrough] > mainLine[lastTrough] && Low[currentTrough] < Low[lastTrough])

{

bullishDivergence[currentTrough] = mainLine[currentTrough] - arrowsDisplacement;

divergencesType[currentTrough] = 1; //"Classic Bullish";

divergencesStochasticsDiff[currentTrough] = MathAbs(mainLine[currentTrough] - mainLine[lastTrough]);

divergencesPriceDiff[currentTrough] = MathAbs(Low[currentTrough] - Low[lastTrough]);

if(drawPriceTrendLines == true)

DrawPriceTrendLine(Time[currentTrough], Time[lastTrough],

Low[currentTrough],

Low[lastTrough], Green, STYLE_SOLID);

if(drawIndicatorTrendLines == true)

DrawIndicatorTrendLine(Time[currentTrough],

Time[lastTrough],

mainLine[currentTrough],

mainLine[lastTrough],

Green, STYLE_SOLID);

if(displayAlert == true)

DisplayAlert("Classical Stochastics bullish divergence on: ", currentTrough);

}

}

//-----HIDDEN DIVERGENCE--//

if (DisplayHiddenDivergences == true)

{

if (mainLine[currentTrough] Low[lastTrough])

{

bullishDivergence[currentTrough] = mainLine[currentTrough] - arrowsDisplacement;

divergencesType[currentTrough] = 2; //"Hidden Bullish";

divergencesStochasticsDiff[currentTrough] = MathAbs(mainLine[currentTrough] - mainLine[lastTrough]);

divergencesPriceDiff[currentTrough] = MathAbs(Low[currentTrough] - Low[lastTrough]);

if(drawPriceTrendLines == true)

DrawPriceTrendLine(Time[currentTrough], Time[lastTrough],

Low[currentTrough],

Low[lastTrough], Green, STYLE_DOT);

if(drawIndicatorTrendLines == true)

DrawIndicatorTrendLine(Time[currentTrough],

Time[lastTrough],

mainLine[currentTrough],

mainLine[lastTrough],

Green, STYLE_DOT);

if(displayAlert == true)

DisplayAlert("Hidden Stochastics bullish divergence on: ", currentTrough);

}

}

}

void CatchBearishDivergence(int shift)

{

if(IsIndicatorPeak(shift) == false)

return;

int currentPeak = shift;

int lastPeak = GetIndicatorLastPeak(shift);

//-- CLASSIC DIVERGENCE --//

if (DisplayClassicalDivergences == true)

{

if(mainLine[currentPeak] High[lastPeak])

{

bearishDivergence[currentPeak] = mainLine[currentPeak] + arrowsDisplacement;

divergencesType[currentPeak] = 3; //"Classic Bearish";

divergencesStochasticsDiff[currentPeak] = MathAbs(mainLine[currentPeak] - mainLine[lastPeak]);

divergencesPriceDiff[currentPeak] = MathAbs(Low[currentPeak] - Low[lastPeak]);

if(drawPriceTrendLines == true)

DrawPriceTrendLine(Time[currentPeak], Time[lastPeak],

High[currentPeak],

High[lastPeak], Red, STYLE_SOLID);

if(drawIndicatorTrendLines == true)

DrawIndicatorTrendLine(Time[currentPeak], Time[lastPeak],

mainLine[currentPeak],

mainLine[lastPeak], Red, STYLE_SOLID);

if(displayAlert == true)

DisplayAlert("Classical Stochastics bearish divergence on: ", currentPeak);

}

}

//----HIDDEN DIVERGENCE----//

if (DisplayHiddenDivergences == true)

{

if(mainLine[currentPeak] > mainLine[lastPeak] && High[currentPeak] < High[lastPeak])

{

bearishDivergence[currentPeak] = mainLine[currentPeak] + arrowsDisplacement;

divergencesType[currentPeak] = 4;//"Hidden Bearish";

divergencesStochasticsDiff[currentPeak] = MathAbs(mainLine[currentPeak] - mainLine[lastPeak]);

divergencesPriceDiff[currentPeak] = MathAbs(Low[currentPeak] - Low[lastPeak]);

if(drawPriceTrendLines == true)

DrawPriceTrendLine(Time[currentPeak], Time[lastPeak],

High[currentPeak],

High[lastPeak], Red, STYLE_DOT);

if(drawIndicatorTrendLines == true)

DrawIndicatorTrendLine(Time[currentPeak], Time[lastPeak],

mainLine[currentPeak],

mainLine[lastPeak], Red, STYLE_DOT);

if(displayAlert == true)

DisplayAlert("Hidden Stochastics bearish divergence on: ", currentPeak);

}

}

}

bool IsIndicatorPeak(int shift)

{

if(mainLine[shift] >= mainLine[shift+1] && mainLine[shift] > mainLine[shift+2] && mainLine[shift] > mainLine[shift-1])

return(true);

else

return(false);

}

bool IsIndicatorTrough(int shift)

{

if(mainLine[shift] <= mainLine[shift+1] && mainLine[shift] < mainLine[shift+2] && mainLine[shift] < mainLine[shift-1])

return(true);

else

return(false);

}

int GetIndicatorLastPeak(int shift)

{

for(int i = shift + 5; i < Bars; i++)

{

if(mainLine >= mainLine && mainLine >= mainLine &&

mainLine >= mainLine && mainLine >= mainLine)

{

return(i);

}

}

return(-1);

}

int GetIndicatorLastTrough(int shift)

{

for(int i = shift + 5; i < Bars; i++)

{

if(mainLine <= mainLine && mainLine <= mainLine &&

mainLine <= mainLine && mainLine <= mainLine)

{

return(i);

}

}

return(-1);

}

void DisplayAlert(string message, int shift)

{

if(shift <= 2 && Time[shift] != lastAlertTime)

{

lastAlertTime = Time[shift];

Alert(message, Symbol(), " , ", Period(), " minutes chart");

}

}

void DrawPriceTrendLine(datetime x1, datetime x2, double y1, double y2, color lineColor, double style)

{

string label = "Stochastics_DivergenceLine_v1# " + DoubleToStr(x1, 0);

ObjectDelete(label);

ObjectCreate(label, OBJ_TREND, 0, x1, y1, x2, y2, 0, 0);

ObjectSet(label, OBJPROP_RAY, 0);

ObjectSet(label, OBJPROP_COLOR, lineColor);

ObjectSet(label, OBJPROP_STYLE, style);

}

void DrawIndicatorTrendLine(datetime x1, datetime x2, double y1, double y2, color lineColor, double style)

{

int indicatorWindow = WindowFind(indicatorName);

if(indicatorWindow < 0)

return;

string label = "Stochastics_DivergenceLine_v1$# " + DoubleToStr(x1, 0);

ObjectDelete(label);

ObjectCreate(label, OBJ_TREND, indicatorWindow, x1, y1, x2, y2, 0, 0);

ObjectSet(label, OBJPROP_RAY, 0);

ObjectSet(label, OBJPROP_COLOR, lineColor);

ObjectSet(label, OBJPROP_STYLE, style);