Please help me add Alerts to an Indicator

swigga

Newbie
Jun 18, 2021
4
0
1
30
it would help to know just how many candles you are talking about covering..... the script below goes in the scripts folder......
//-------

it uses the highest high and lowest low during the period back set by bar......

it will change the chart fore/back ground setting.....

it first deletes prior rectangle of same name.....

color is selectable......

it is draggable....

it is simple......h
//------
nzdusdts-d1-topstepfx-rect.png
yes, but probably not in the manner you are wanting.....

that is just a simple example of a way to cover/block off candlesticks on the hard right edge......

to adjust the width or height, click or double click on the rectangle to select it.... once selected, click and hold on any of the corners and drag out or up....

clicking and holding on the center squares allows you to move the square around.......

other than that, there is not much which can be done as the code is quite simple without adjustments......h
//-----

nzdusdts-d1-equiti-capital-uk-height.png
okay, I understand, however, the indicator doesn't want to open on my mt4. when I add by ''Ctrl+N'' it doesn't do anything. when I manually try to insert it going through the thru top-down menu it does the same thing. Nothing. And thank you for your effort.
 

pkoolc1

Active Trader
Feb 26, 2012
12
0
32
Hi @Envid

I tried adding an alert to this indicator but getting errors. I followed the instructions on adding an alert
 

Attachments

  • AbsoluteStrength_v2 _A.mq5
    36.5 KB · Views: 14

pkoolc1

Active Trader
Feb 26, 2012
12
0
32
Your OnCalculate uses capitalized "Time" for a time timeseries, so your alert checks should also use "Time" instead of "time".
Thank you so much, sorted.
Please can you help..... after some time the indicator lines are distorted or upon initializing MT5, I have to switch between timeframes to get it back to normal.
 

YanNaungSoe

Newbie
Jan 19, 2022
2
0
1
34
I want this MT5 indicator with Alert.
If anyone has, please give me.

Untitled.jpg
 

Attachments

  • support-and-resistance-indicator.ex5
    16 KB · Views: 0

cedlere

Newbie
Feb 25, 2022
9
0
2
48
Hello,
I did follow the guide :
https://www.earnforex.com/guides/how-to-add-alerts-to-metatrader-indicators/
But it doesn't work very well...
First, if I change the code of my indicator, save, compile, i'm not sure it takes effect in real time on all my windows of forex pairs opened in MT4 plateform on my computer...
Second, even if I delete my custom indicator (the old) and add it again (the new) it doesn't alert any better... but when I change the time frame in MT4 on a symbol then I have a lots of alerts and push on my phone but all seems wrong... the time is often wrong and somes are missing... and when I wait after for a new alert often it doen't work...
First of all, why when I change the timeframe on my computer I have some push alerts on my phone and not when the condition happens at a given time?
Thanks you
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,530
1,355
144
Odesa
www.earnforex.com
Sorry, I attach it now. Thanks you
All instances of Time[rates_total - 1] should be replaced with Time[0] as the native Time array is set as series by default in MT4.

Also, both instances of this: ExtRSIBuffer[TriggerCandle + 1] should be this: ExtRSIBuffer[rates_total - 2 - TriggerCandle].
 

cedlere

Newbie
Feb 25, 2022
9
0
2
48
All instances of Time[rates_total - 1] should be replaced with Time[0] as the native Time array is set as series by default in MT4.

Also, both instances of this: ExtRSIBuffer[TriggerCandle + 1] should be this: ExtRSIBuffer[rates_total - 2 - TriggerCandle].
Ok, thank you, I test it monday and tell you inform, no Forex the weekend...
 

cedlere

Newbie
Feb 25, 2022
9
0
2
48
All instances of Time[rates_total - 1] should be replaced with Time[0] as the native Time array is set as series by default in MT4.

Also, both instances of this: ExtRSIBuffer[TriggerCandle + 1] should be this: ExtRSIBuffer[rates_total - 2 - TriggerCandle].
It seems to work, thanks you very much
 

cedlere

Newbie
Feb 25, 2022
9
0
2
48
Sorry, I did ask myself... if I change the 30-70 levels of the input variables... so if I change the input variables I will don't need to change my code... but it is a #property, and in my case : indicator_level1 and indicator_level2 instead of of 30 and 70 levels... I don't really know again about the #property in the code... so how to do?
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,530
1,355
144
Odesa
www.earnforex.com
Sorry, I did ask myself... if I change the 30-70 levels of the input variables... so if I change the input variables I will don't need to change my code... but it is a #property, and in my case : indicator_level1 and indicator_level2 instead of of 30 and 70 levels... I don't really know again about the #property in the code... so how to do?
You need to use input parameters for your 30 and 70 checks in the alerts. Then you will be able to change them via the input parameters window of the indicators.
 

cedlere

Newbie
Feb 25, 2022
9
0
2
48
Hello,
Sorry but I must change to MT5 plateforme and have new errors in my code , as with the time variable for sample...
Thanks you for help
 

Attachments

  • RSI_drixe.mq5
    6.5 KB · Views: 1

cedlere

Newbie
Feb 25, 2022
9
0
2
48
False alerts or more than one alert on the same event?
Can you attach the current code?
Also, do you run it with default parameters?
Hello, in fact I did close MT5 and lauch it again and it give me an alert which happens 30 hours in the past, is it normal?
Also, when I apply my indicator I just change my RSI period.
 

Attachments

  • RSI_drixe.mq5
    6.5 KB · Views: 4