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.
Z-Z1 Audible with alert
alert is on next bar open.
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.
Here it is
Simple Indicator Modification Request for i_trend
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.
Here is what needed to be done
if (tmpPrevious > tmp) //change the wt[?] number will change when the signal will trigger based on # of last bars
Alert ("Buy Entry - "+(Symbol())+" "+"EMA "+(aRperiodf())," - Price: "+DoubleToStr(Ask(),4));
aTurnedUp = true;
aTurnedDown = false;
if (tmpPrevious < tmp) //change the wt[?] number will change when the signal will trigger based on # of last bars
Alert ("Sell Entry - "+(Symbol())+" "+"EMA "+(aRperiodf())," - Price: "+DoubleToStr(Bid(),4));
aTurnedDown = true;
aTurnedUp = false;
tmp = tmpPrevious;
static datetime dt = 0;
if (dt != Time)
dt = Time;
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.
Static and "Global" variables
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?
I highly recommend that you read the book "Fibonacci Ratios with Pattern Recognition" by Larry Pesavento.
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?
Thank you very much for your help