Re: MT4 Indicator requests and ideas

10269
Good Day Mr Tools,
Do you have in your collection of tools, an Indicator which Alerts to a Moving Average - SMA, EMA, LWMA,HMA crossing of The Daily Open Level or a Fixed Price Level?
If you have not one on hand, would you please be kind enough to code a Non Lagging MA (from a selection of the above Moving averages) when the Ma Cross and/or Price Candle open either on the Upside or the Downside of the Daily Open Level or selected Fixed Price Level?

Your assistance in this regard would be much appreciated.

Thank you.

Re: MT4 Indicator requests and ideas

10270
mrtools wrote: Mon Jun 01, 2020 4:30 am

This version I changed from trend colored bars to candles colored by trend, and seems to be better, hopefully fixing the problem you had.
Hi mrtools
Wonder if you can fix the alarm code of this indi since the mql4 was not released (i think, i didnt find it).
I use some indis in Renko charts, and I detected sometimes it keeps giving the alarm+alert on every price movement. I also found that other indis coded the same way dont have this issue, so I checked 2 open source indis with and without the issue and found and fixed the code that keeps the alert repeating forever at least in Renko charts.

The ones having the issue are indis with alert code as follow (as example):

Code: Select all

doAlert(" Buy")
and found that adding the "loop bar" fixes the issue:

Code: Select all

doAlert(whichBar," BUY");
and of course, the corrections on the functions code.

Code: Select all

void doAlert(int forBar, string doWhat)
{
   static string   previousAlert="nothing";
   static datetime previousTime;
   string message;
   
      if (previousAlert != doWhat || previousTime != Time[forBar]) {
       previousAlert  = doWhat;
       previousTime   = Time[forBar];
I think you will catch me hahahA
I didnt test them in normal candles, maybe this is only happening with renko/offline charts but if you can fix it I will appreciate it.
Thank you
Damian


Who is online

Users browsing this forum: ChatGPT [Bot], Grapeshot [Bot], PaperLi [Bot], TransparentTrader and 22 guests