Indicators with alerts/signal - page 28

Lon
42
Lon  

Here's a very handy indicator called "HistoBands". Its a great help in indicating the current trend but needs some fine tuning in the code. It was posted in the Money Tec forum and seems to work for some people but more often hogs computer processes and locks up the MT4 platform. Could someone take a look at it and make suggestions or adjustments in the code so that it runs more efficiently?

Second, if an optional alert could be added when the trend closes above or below zero line, that would be great.

Thanks in advance.

-MJ

Files:
ShadowWz
95
ShadowWz  

Z-Z1 Audible with alert

Hi,

alert is on next bar open.

Cheers.

Files:
z-z1.mq4 5 kb
panamamike
100
panamamike  

Need some help coding an Alarm

I use an AMA as part of my trading setup. I will post the indicator. Can someone please help me add an alarm for when the signal changes from "deep sky blue" to "magenta" and from "magenta" to "deep sky blue"....also, is it possible to make it so that within the signal properties the alarm can be turned on or off? This would surely help me get some decent sleep during the week.

Thanks

Files:
mangman
118
mangman  

Here it is

ligerny
117
ligerny  

Simple Indicator Modification Request for i_trend

Hi,

I need a simple modification to the i_trend indicator attached to show alert box when the lines cross.

Buy Alert: When green line crosses up thru red

Sell Alert: when red crosses up thru green.

Thanks

Files:
i_trend.mq4 4 kb
WRR
72
WRR  

BarChanged() Function

elihayun:
The problem is that u are not testing for new bar before u create an alert.

Here is what needed to be done

if (aAlerts)

{

if (tmpPrevious > tmp) //change the wt[?] number will change when the signal will trigger based on # of last bars

{

if (!aTurnedUp)

{

if (!BarChanged())

{

Alert ("Buy Entry - "+(Symbol())+" "+"EMA "+(aRperiodf())," - Price: "+DoubleToStr(Ask(),4));

PlaySound("alert.wav");

}

aTurnedUp = true;

aTurnedDown = false;

}

}

if (tmpPrevious < tmp) //change the wt[?] number will change when the signal will trigger based on # of last bars

{

if (!aTurnedDown)

{

if (!BarChanged())

{

Alert ("Sell Entry - "+(Symbol())+" "+"EMA "+(aRperiodf())," - Price: "+DoubleToStr(Bid(),4));

PlaySound("alert.wav");

}

aTurnedDown = true;

aTurnedUp = false;

}

}

}

tmp = tmpPrevious;

}

//---- done

return(0);

}

bool BarChanged()

{

static datetime dt = 0;

if (dt != Time[0])

{

dt = Time[0];

return(true);

}

return(false);

}

Hello elihayun,

I looked at your code in the copy of the message above together with the correction you made to the code in the next message - i.e. "!BarChanged()" should be "BarChanged()".

I am running build 192 of MT4 and do not see any reference in any documentation I have regarding the BarChanged() function. Would you please point me to some documentation on this function.

WRR

WRR
72
WRR  

Static and "Global" variables

newdigital:
Alert Once Per bar: Codersguru aticle Alert Once Per Bar | www.metatrader.info

Hello codersguru,

I just read your article on once per bar.

Why do you use static variables in the code instead of normal variables? Please explain the difference between these two variable types.

Also, on another topic, I have coded functions where I call variables into a function (defined previously in the program outside the function) that are not created with GlobalVariableSet, are not local "global" variables (e.g. Global), and are not in the list of variables to import into the function. Sometimes the function recognizes the variable and other times it says the variable is not defined. If I add the unrecognized variable to the variable list imported into the function with the Set command, of course it works fine.

Why is it that the function sometimes recognizes a non-global variable without calling it into the function, and other times it does not?

WRR

WRR
72
WRR  
dollyjen:
Hey hey forex people!! i'm building my strategy right now, testing some indicators on the MT4. I would like to get an introduction to the fibonacci analysis method. been reading a little...any helping hand? going to bed right now...i hope to have an reply tomorrow!

dollyjen,

I highly recommend that you read the book "Fibonacci Ratios with Pattern Recognition" by Larry Pesavento.

WRR

soto888
7
soto888  

Alert for pivot point indicator

Is there a pivot point indicator that has an alert for when the price goes through a support/resistance level?

soto888
7
soto888  

Thank you very much for your help