# Indicators with alerts/signal - page 130 23

Can someone program/code the Parabolic SAR indiacator with EMAIL Alert options.... THANKS 58

In the default expert "Moving Average.mq4" have you a sample:

//+------------------------------------------------------------------+

//| Calculate optimal lot size |

//+------------------------------------------------------------------+

double LotsOptimized()

{

double lot=Lots;

int orders=HistoryTotal(); // history orders total

int losses=0; // number of losses orders without a break

//---- select lot size

lot=NormalizeDouble(AccountFreeMargin()*MaximumRisk/1000.0,1);

//---- calculate number of losses orders without a break

if(DecreaseFactor>0)

{

for(int i=orders-1;i>=0;i--)

{

if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==false) { Print("Error in history!"); break; }

if(OrderSymbol()!=Symbol() || OrderType()>OP_SELL) continue;

//----

if(OrderProfit()>0) break;

if(OrderProfit()<0) losses++;

}

if(losses>1) lot=NormalizeDouble(lot-lot*losses/DecreaseFactor,1);

}

//---- return lot size

if(lot<0.1) lot=0.1;

return(lot);

} 200

I need an alert for MT4 which will pop-up when price reaches my predefined point and SIMULTANEOUSLY IF fast stocastic reaches 20/80 levels.

On MT4 I can create only the price alerts but found no option for any indicator along with that.

Thank you. 10

ADX Indicator in need of tweaking

Can anyone help fine tune this indicator? Its an ADX cross signal that really works pretty good but the only problem is it gives a signal at the end of every bar. It shows a buy or sell signal at each cross, but then it continues to send out the same signal after every bar. Also, you can only have one chart open at a time with the indicator attached, otherwise the signals seem to cross, cancelling one another out in the journal. Any help anyone can provide would be muc appreciated!!

//+------------------------------------------------------------------+

//| Amir

//| Modified to give alert and send email by MrPip

//+------------------------------------------------------------------+

#property indicator_chart_window

#property indicator_buffers 2

#property indicator_color1 Lime

#property indicator_color2 Red

//---- input parameters

extern int CountBars=350;

extern bool SoundON=true;

extern bool EmailON=true;

//---- buffers

double val1[];

double val2[];

int flagval1 = 0;

int flagval2 = 0;

double b4plusdi,nowplusdi,b4minusdi,nowminusdi;

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

string short_name;

//---- indicator line

IndicatorBuffers(2);

SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(0,108);

SetIndexStyle(1,DRAW_ARROW);

SetIndexArrow(1,108);

SetIndexBuffer(0,val1);

SetIndexBuffer(1,val2);

GlobalVariableSet("SignalType"+Symbol()+Period(),OP_SELLSTOP);

//----

return(0);

}

int deinit()

{

GlobalVariableDel("SignalType"+Symbol()+Period());

return(0);

}

//+------------------------------------------------------------------+

//+------------------------------------------------------------------+

int start()

{

double tmp=0;

if (CountBars>=Bars) CountBars=Bars;

if (CountBars>=1000) CountBars=950;

SetIndexDrawBegin(0,Bars-CountBars + 12);

SetIndexDrawBegin(1,Bars-CountBars + 12);

int i,shift,counted_bars=IndicatorCounted();

//---- check for possible errors

if(counted_bars<0) return(-1);

//---- initial zero

if(counted_bars<1)

{

for(i=1;i<=CountBars;i++) val1[CountBars-i]=0.0;

for(i=1;i<=CountBars;i++) val2[CountBars-i]=0.0;

}

for (shift = CountBars; shift>=0; shift--)

{

if (b4plusdi>b4minusdi && nowplusdi<nowminusdi)

{

if (shift == 1 && flagval1==0){ flagval1=1; flagval2=0; }

val1[shift]=Low[shift]-5*Point;

}

if (b4plusdinowminusdi)

{

if (shift == 1 && flagval2==0) { flagval2=1; flagval1=0; }

val2[shift]=High[shift]+5*Point;

}

}

{

// {

// }

tmp = CurTime() + (Period()-MathMod(Minute(),Period()))*60;

GlobalVariableSet("SignalType"+Symbol()+Period(),OP_SELL);

}

if (flagval2==1 && CurTime() > GlobalVariableGet("AlertTime"+Symbol()+Period()) && GlobalVariableGet("SignalType"+Symbol()+Period())!=OP_SELL)

{

// {

// }

tmp = CurTime() + (Period()-MathMod(Minute(),Period()))*60;

}

return(0);

}

//+------------------------------------------------------------------+ 1733

Thanks 1733

Indicator challange

Not sure if this has been done yet but is it possible to combine Stochastic and Accelerator so that when Stochastic lines move above AC 0 (Zero) line make Long signal and when Stochastic lines move below AC 0 (Zero) line make Short signal? (see pic) 1733

Stochastic plus AC

Not sure if this has been done yet but is it possible to combine Stochastic and Accelerator so that when Stochastic lines move above AC 0 (Zero) line make Long signal and when Stochastic lines move below AC 0 (Zero) line make Short signal? (see pic) 1733

FerruFx:
AO and Stoch don't have the same verticale scale. There's no 0 line in the stoch. Becarefull when you apply both in the same window.

Basically, it may be possible by changing some code in the stoch.

FerruFx

OK, maybe Stoch Histogram and AC might work better. 182

EA wanted for sound alert depending on fractals condition

EA wanted for sound alert depending on fractals condition

Is anyone experienced enough to offer an EA or indicator giving up a sound alert for MT4 platform, when a specific fractals condition ( a very easy one, it just needs 1-2 command lines, nothing complicated) fullfills ? I would be prepared to pay for that if too complicated to write. For any offers you can also write me a PM. 182

it repaints

mememe: